@cravery/types 0.0.2 → 0.0.3

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 (79) hide show
  1. package/dist/core/api.d.ts.map +1 -1
  2. package/dist/core/api.js.map +1 -1
  3. package/dist/core/index.d.ts +1 -1
  4. package/dist/core/index.d.ts.map +1 -1
  5. package/dist/core/index.js +1 -1
  6. package/dist/core/index.js.map +1 -1
  7. package/dist/core/region.d.ts +3 -0
  8. package/dist/core/region.d.ts.map +1 -0
  9. package/dist/core/region.js +13 -0
  10. package/dist/core/region.js.map +1 -0
  11. package/dist/equipment/recipe.d.ts +2 -2
  12. package/dist/equipment/recipe.d.ts.map +1 -1
  13. package/dist/equipment/user.d.ts +1 -1
  14. package/dist/equipment/user.d.ts.map +1 -1
  15. package/dist/feed/category.d.ts +1 -1
  16. package/dist/feed/category.d.ts.map +1 -1
  17. package/dist/feed/category.js +11 -25
  18. package/dist/feed/category.js.map +1 -1
  19. package/dist/feed/index.d.ts +1 -0
  20. package/dist/feed/index.d.ts.map +1 -1
  21. package/dist/feed/index.js +1 -0
  22. package/dist/feed/index.js.map +1 -1
  23. package/dist/feed/recipe.d.ts +7 -1
  24. package/dist/feed/recipe.d.ts.map +1 -1
  25. package/dist/feed/recipe.js +0 -40
  26. package/dist/feed/recipe.js.map +1 -1
  27. package/dist/ingredients/entity.d.ts +2 -2
  28. package/dist/ingredients/entity.d.ts.map +1 -1
  29. package/dist/ingredients/recipe.d.ts +3 -3
  30. package/dist/ingredients/recipe.d.ts.map +1 -1
  31. package/dist/ingredients/user.d.ts +2 -2
  32. package/dist/ingredients/user.d.ts.map +1 -1
  33. package/dist/interactions/event.d.ts +3 -2
  34. package/dist/interactions/event.d.ts.map +1 -1
  35. package/dist/interactions/saved.d.ts +1 -1
  36. package/dist/interactions/saved.d.ts.map +1 -1
  37. package/dist/mealplan/plan.d.ts +3 -3
  38. package/dist/mealplan/plan.d.ts.map +1 -1
  39. package/dist/recipes/content.d.ts +2 -2
  40. package/dist/recipes/content.d.ts.map +1 -1
  41. package/dist/recipes/instruction.d.ts +3 -3
  42. package/dist/recipes/instruction.d.ts.map +1 -1
  43. package/dist/reports/target.d.ts.map +1 -1
  44. package/dist/shopping/equipment.d.ts +7 -0
  45. package/dist/shopping/equipment.d.ts.map +1 -0
  46. package/dist/shopping/equipment.js +3 -0
  47. package/dist/shopping/equipment.js.map +1 -0
  48. package/dist/shopping/index.d.ts +2 -1
  49. package/dist/shopping/index.d.ts.map +1 -1
  50. package/dist/shopping/index.js +2 -1
  51. package/dist/shopping/index.js.map +1 -1
  52. package/dist/shopping/ingredient.d.ts +9 -0
  53. package/dist/shopping/ingredient.d.ts.map +1 -0
  54. package/dist/shopping/ingredient.js +3 -0
  55. package/dist/shopping/ingredient.js.map +1 -0
  56. package/dist/shopping/list.d.ts +5 -3
  57. package/dist/shopping/list.d.ts.map +1 -1
  58. package/package.json +1 -1
  59. package/src/core/index.ts +1 -1
  60. package/src/core/region.ts +11 -0
  61. package/src/equipment/recipe.ts +2 -2
  62. package/src/equipment/user.ts +1 -1
  63. package/src/feed/category.ts +14 -0
  64. package/src/feed/index.ts +1 -0
  65. package/src/feed/recipe.ts +15 -41
  66. package/src/ingredients/entity.ts +2 -2
  67. package/src/ingredients/recipe.ts +3 -3
  68. package/src/ingredients/user.ts +2 -2
  69. package/src/interactions/event.ts +3 -2
  70. package/src/interactions/saved.ts +1 -1
  71. package/src/mealplan/plan.ts +3 -3
  72. package/src/recipes/content.ts +2 -2
  73. package/src/recipes/instruction.ts +3 -3
  74. package/src/reports/target.ts +1 -4
  75. package/src/shopping/equipment.ts +7 -0
  76. package/src/shopping/index.ts +2 -1
  77. package/src/shopping/{item.ts → ingredient.ts} +1 -1
  78. package/src/shopping/list.ts +5 -3
  79. package/src/core/api.ts +0 -30
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/core/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,YAAY,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC;AAEtE,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAEzD;AAED,wBAAgB,OAAO,CACrB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,GACd,gBAAgB,CAKlB"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/core/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,YAAY,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC;AAEtE,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAEzD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAK7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/core/api.ts"],"names":[],"mappings":";;AAiBA,0BAEC;AAED,0BAQC;AAZD,SAAgB,OAAO,CAAI,IAAO;IAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,SAAgB,OAAO,CACrB,IAAkB,EAClB,OAAe;IAEf,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KACzB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/core/api.ts"],"names":[],"mappings":";;AAiBA,0BAEC;AAED,0BAKC;AATD,SAAgB,OAAO,CAAI,IAAO;IAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,SAAgB,OAAO,CAAC,IAAkB,EAAE,OAAe;IACzD,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KACzB,CAAC;AACJ,CAAC"}
@@ -1,8 +1,8 @@
1
- export * from "./api";
2
1
  export * from "./entity";
3
2
  export * from "./errors";
4
3
  export * from "./locale";
5
4
  export * from "./pagination";
5
+ export * from "./region";
6
6
  export * from "./theme";
7
7
  export * from "./timestamp";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -14,11 +14,11 @@ 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("./api"), exports);
18
17
  __exportStar(require("./entity"), exports);
19
18
  __exportStar(require("./errors"), exports);
20
19
  __exportStar(require("./locale"), exports);
21
20
  __exportStar(require("./pagination"), exports);
21
+ __exportStar(require("./region"), exports);
22
22
  __exportStar(require("./theme"), exports);
23
23
  __exportStar(require("./timestamp"), exports);
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B"}
@@ -0,0 +1,3 @@
1
+ export declare const REGION_VALUES: readonly ["north_america", "europe", "asia", "middle_east", "latin_america", "oceania", "africa"];
2
+ export type Region = (typeof REGION_VALUES)[number];
3
+ //# sourceMappingURL=region.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../../src/core/region.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,mGAQhB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REGION_VALUES = void 0;
4
+ exports.REGION_VALUES = [
5
+ "north_america",
6
+ "europe",
7
+ "asia",
8
+ "middle_east",
9
+ "latin_america",
10
+ "oceania",
11
+ "africa",
12
+ ];
13
+ //# sourceMappingURL=region.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../../src/core/region.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,eAAe;IACf,QAAQ;IACR,MAAM;IACN,aAAa;IACb,eAAe;IACf,SAAS;IACT,QAAQ;CACA,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export interface RecipeEquipmentMeta {
2
2
  slug: string;
3
- optional?: boolean;
4
- quantity?: number;
3
+ optional: boolean;
4
+ quantity: number;
5
5
  }
6
6
  export interface RecipeEquipmentContent {
7
7
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/equipment/recipe.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eACf,SAAQ,mBAAmB,EAAE,sBAAsB;CAAG"}
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/equipment/recipe.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eACf,SAAQ,mBAAmB,EAAE,sBAAsB;CAAG"}
@@ -4,7 +4,7 @@ import { EquipmentCategory } from "./category";
4
4
  export interface UserEquipment extends Entity {
5
5
  category: EquipmentCategory;
6
6
  cost: Currency;
7
+ quantity: number;
7
8
  slug: string;
8
- quantity?: number;
9
9
  }
10
10
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/equipment/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/equipment/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1,3 +1,3 @@
1
- export declare const FEED_CATEGORY_VALUES: readonly ["fruits", "vegetables", "meat", "poultry", "seafood", "dairy", "grains", "legumes", "spices", "nuts_seeds", "oils_fats", "sauces", "condiments", "sweeteners", "baking", "pantry", "canned", "frozen", "bakery", "prepared", "beverages", "snacks", "international", "specialty", "baby"];
1
+ export declare const FEED_CATEGORY_VALUES: readonly ["budget", "healthy", "new", "personal", "popular", "quick", "recommended", "regional", "regular", "seasonal", "trending"];
2
2
  export type FeedCategory = (typeof FEED_CATEGORY_VALUES)[number];
3
3
  //# sourceMappingURL=category.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/feed/category.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,qSA0BvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/feed/category.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,qIAYvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -2,30 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FEED_CATEGORY_VALUES = void 0;
4
4
  exports.FEED_CATEGORY_VALUES = [
5
- "fruits",
6
- "vegetables",
7
- "meat",
8
- "poultry",
9
- "seafood",
10
- "dairy",
11
- "grains",
12
- "legumes",
13
- "spices",
14
- "nuts_seeds",
15
- "oils_fats",
16
- "sauces",
17
- "condiments",
18
- "sweeteners",
19
- "baking",
20
- "pantry",
21
- "canned",
22
- "frozen",
23
- "bakery",
24
- "prepared",
25
- "beverages",
26
- "snacks",
27
- "international",
28
- "specialty",
29
- "baby",
5
+ "budget",
6
+ "healthy",
7
+ "new",
8
+ "personal",
9
+ "popular",
10
+ "quick",
11
+ "recommended",
12
+ "regional",
13
+ "regular",
14
+ "seasonal",
15
+ "trending",
30
16
  ];
31
17
  //# sourceMappingURL=category.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/feed/category.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,QAAQ;IACR,YAAY;IACZ,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,WAAW;IACX,QAAQ;IACR,eAAe;IACf,WAAW;IACX,MAAM;CACE,CAAC"}
1
+ {"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/feed/category.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAChC,QAAQ;IACR,SAAS;IACT,KAAK;IACL,UAAU;IACV,SAAS;IACT,OAAO;IACP,aAAa;IACb,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;CACJ,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./category";
1
2
  export * from "./recipe";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -14,5 +14,6 @@ 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("./category"), exports);
17
18
  __exportStar(require("./recipe"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB"}
@@ -1,6 +1,7 @@
1
1
  import { Allergen, Cuisine, Currency, DietaryTag, Difficulty, MealType, Spiciness } from "../common";
2
2
  import { Entity, Locale } from "../core";
3
3
  import { RecipeStats } from "../recipes";
4
+ import { FeedCategory } from "./category";
4
5
  export interface RecipeFeedItem extends Entity {
5
6
  allergens: Allergen[];
6
7
  cost: Currency;
@@ -11,9 +12,14 @@ export interface RecipeFeedItem extends Entity {
11
12
  images: string[];
12
13
  mealTypes: MealType[];
13
14
  spiciness: Spiciness;
14
- titles: Partial<Record<Locale, string>>;
15
+ titles: Record<Locale, string>;
15
16
  }
16
17
  export interface FeedRecipe extends RecipeFeedItem {
17
18
  stats: RecipeStats;
18
19
  }
20
+ export interface FeedGroup {
21
+ category: FeedCategory;
22
+ titles: Record<Locale, string>;
23
+ recipes: FeedRecipe[];
24
+ }
19
25
  //# sourceMappingURL=recipe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/feed/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,KAAK,EAAE,WAAW,CAAC;CACpB"}
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/feed/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB"}
@@ -1,43 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /*
4
- import { Cuisine } from "../recipes/cuisine";
5
- import { DietaryTag } from "../recipes/dietary_tag";
6
- import { Difficulty } from "../recipes/difficulty";
7
- import { RecipeStats } from "../recipes/recipe_stats";
8
- import { FeedReason } from "./feed_reason";
9
- import { Region } from "./region";
10
-
11
- export interface FeedItemBase {
12
- recipeId: string;
13
- rank: number;
14
- score: number;
15
- titles: Partial<Record<Locale, string>>;
16
- imageUrl?: string;
17
- difficulty: Difficulty;
18
- time: number;
19
- cuisines: Cuisine[];
20
- dietaryTags: DietaryTag[];
21
- stats: RecipeStats;
22
- computedAt: Timestamp;
23
- }
24
-
25
- export interface GlobalFeedItem extends FeedItemBase {
26
- type: "global";
27
- }
28
-
29
- export interface RegionalFeedItem extends FeedItemBase {
30
- type: "regional";
31
- region: Region;
32
- regionScore: number;
33
- }
34
-
35
- export interface PersonalFeedItem extends FeedItemBase {
36
- type: "personal";
37
- reason: FeedReason;
38
- similarityScore?: number;
39
- }
40
-
41
- export type FeedItem = GlobalFeedItem | RegionalFeedItem | PersonalFeedItem;
42
- */
43
3
  //# sourceMappingURL=recipe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/feed/recipe.ts"],"names":[],"mappings":";;AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCE"}
1
+ {"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/feed/recipe.ts"],"names":[],"mappings":""}
@@ -6,9 +6,9 @@ export interface IngredientEntityMeta extends Entity {
6
6
  category: IngredientCategory;
7
7
  cost: Currency;
8
8
  group: IngredientGroup;
9
- slug: string;
10
9
  imageUrl: string | null;
11
- standardUnit?: Unit;
10
+ slug: string;
11
+ standardUnit: Unit;
12
12
  }
13
13
  export interface IngredientEntityContent {
14
14
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/ingredients/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,oBAAqB,SAAQ,MAAM;IAClD,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/ingredients/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,oBAAqB,SAAQ,MAAM;IAClD,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
@@ -1,9 +1,9 @@
1
1
  import { Unit } from "../common";
2
2
  export interface RecipeIngredientMeta {
3
3
  slug: string;
4
- optional?: boolean;
5
- quantity?: number;
6
- unit?: Unit;
4
+ optional: boolean;
5
+ quantity: number;
6
+ unit: Unit;
7
7
  }
8
8
  export interface RecipeIngredientContent {
9
9
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/ingredients/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/ingredients/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
@@ -8,7 +8,7 @@ export interface UserIngredient extends Entity {
8
8
  expiresAt: Timestamp | null;
9
9
  group: IngredientGroup;
10
10
  slug: string;
11
- quantity?: number;
12
- unit?: Unit;
11
+ quantity: number;
12
+ unit: Unit;
13
13
  }
14
14
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/ingredients/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/ingredients/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -1,10 +1,11 @@
1
+ import { Region } from "../core";
1
2
  import { InteractionEventType } from "./event_type";
2
3
  export interface InteractionEvent {
3
4
  userId: string;
4
5
  recipeId: string;
5
6
  eventType: InteractionEventType;
6
- value?: number;
7
- region?: string;
7
+ region: Region;
8
8
  timestamp: number;
9
+ value?: number;
9
10
  }
10
11
  //# sourceMappingURL=event.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/interactions/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/interactions/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -1,6 +1,6 @@
1
1
  import { Entity } from "../core";
2
2
  export interface SavedRecipe extends Entity {
3
3
  recipeId: string;
4
- searchTerms?: string[];
4
+ searchTerms: string[];
5
5
  }
6
6
  //# sourceMappingURL=saved.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"saved.d.ts","sourceRoot":"","sources":["../../src/interactions/saved.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB"}
1
+ {"version":3,"file":"saved.d.ts","sourceRoot":"","sources":["../../src/interactions/saved.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
@@ -1,9 +1,9 @@
1
1
  import { Entity } from "../core";
2
2
  import { MealPlanDay } from "./day";
3
3
  export interface MealPlan extends Entity {
4
- startDate: string;
5
- endDate: string;
6
4
  days: MealPlanDay[];
7
- name?: string;
5
+ endDate: string;
6
+ name: string;
7
+ startDate: string;
8
8
  }
9
9
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/mealplan/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/mealplan/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -4,11 +4,11 @@ import { IngredientSectionContent } from "../ingredients";
4
4
  import { InstructionContent } from "./instruction";
5
5
  export interface RecipeContent {
6
6
  description: string;
7
- equipment?: RecipeEquipmentContent[];
7
+ equipment: RecipeEquipmentContent[];
8
8
  ingredientSections: IngredientSectionContent[];
9
9
  instructions: InstructionContent[];
10
10
  locale: Locale;
11
- tips?: string[];
11
+ tips: string[];
12
12
  title: string;
13
13
  }
14
14
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/recipes/content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACrC,kBAAkB,EAAE,wBAAwB,EAAE,CAAC;IAC/C,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/recipes/content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,kBAAkB,EAAE,wBAAwB,EAAE,CAAC;IAC/C,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,10 +1,10 @@
1
1
  import { Temperature } from "../common";
2
2
  export interface InstructionMeta {
3
3
  step: number;
4
+ equipment: string[];
5
+ ingredients: string[];
6
+ optional: boolean;
4
7
  duration?: number;
5
- equipment?: string[];
6
- ingredients?: string[];
7
- optional?: boolean;
8
8
  temperature?: Temperature;
9
9
  }
10
10
  export interface InstructionContent {
@@ -1 +1 @@
1
- {"version":3,"file":"instruction.d.ts","sourceRoot":"","sources":["../../src/recipes/instruction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,kBAAkB;CAAG"}
1
+ {"version":3,"file":"instruction.d.ts","sourceRoot":"","sources":["../../src/recipes/instruction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,kBAAkB;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../src/reports/target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAChB,WAAW,GACX,YAAY,CAAC"}
1
+ {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../src/reports/target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,WAAW,GAAG,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ShoppingItemStatus } from "./item_status";
2
+ export interface ShoppingEquipment {
3
+ slug: string;
4
+ quantity: number;
5
+ status: ShoppingItemStatus;
6
+ }
7
+ //# sourceMappingURL=equipment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment.d.ts","sourceRoot":"","sources":["../../src/shopping/equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=equipment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../src/shopping/equipment.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
+ export * from "./equipment";
2
+ export * from "./ingredient";
1
3
  export * from "./item_status";
2
- export * from "./item";
3
4
  export * from "./list";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shopping/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shopping/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -14,7 +14,8 @@ 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("./equipment"), exports);
18
+ __exportStar(require("./ingredient"), exports);
17
19
  __exportStar(require("./item_status"), exports);
18
- __exportStar(require("./item"), exports);
19
20
  __exportStar(require("./list"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shopping/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,yCAAuB;AACvB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shopping/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+CAA6B;AAC7B,gDAA8B;AAC9B,yCAAuB"}
@@ -0,0 +1,9 @@
1
+ import { Unit } from "../common";
2
+ import { ShoppingItemStatus } from "./item_status";
3
+ export interface ShoppingIngredient {
4
+ slug: string;
5
+ quantity: number;
6
+ unit: Unit;
7
+ status: ShoppingItemStatus;
8
+ }
9
+ //# sourceMappingURL=ingredient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ingredient.d.ts","sourceRoot":"","sources":["../../src/shopping/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,kBAAkB,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ingredient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ingredient.js","sourceRoot":"","sources":["../../src/shopping/ingredient.ts"],"names":[],"mappings":""}
@@ -1,8 +1,10 @@
1
1
  import { Entity } from "../core";
2
- import { ShoppingItem } from "./item";
2
+ import { ShoppingEquipment } from "./equipment";
3
+ import { ShoppingIngredient } from "./ingredient";
3
4
  export interface ShoppingList extends Entity {
4
- name?: string;
5
- items: ShoppingItem[];
5
+ name: string;
6
+ ingredients: ShoppingIngredient[];
7
+ equipment: ShoppingEquipment[];
6
8
  planId: string;
7
9
  archived: boolean;
8
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/shopping/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/shopping/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/types",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Core types for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/core/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./api";
2
1
  export * from "./entity";
3
2
  export * from "./errors";
4
3
  export * from "./locale";
5
4
  export * from "./pagination";
5
+ export * from "./region";
6
6
  export * from "./theme";
7
7
  export * from "./timestamp";
@@ -0,0 +1,11 @@
1
+ export const REGION_VALUES = [
2
+ "north_america",
3
+ "europe",
4
+ "asia",
5
+ "middle_east",
6
+ "latin_america",
7
+ "oceania",
8
+ "africa",
9
+ ] as const;
10
+
11
+ export type Region = (typeof REGION_VALUES)[number];
@@ -1,7 +1,7 @@
1
1
  export interface RecipeEquipmentMeta {
2
2
  slug: string;
3
- optional?: boolean;
4
- quantity?: number;
3
+ optional: boolean;
4
+ quantity: number;
5
5
  }
6
6
 
7
7
  export interface RecipeEquipmentContent {
@@ -5,6 +5,6 @@ import { EquipmentCategory } from "./category";
5
5
  export interface UserEquipment extends Entity {
6
6
  category: EquipmentCategory;
7
7
  cost: Currency;
8
+ quantity: number;
8
9
  slug: string;
9
- quantity?: number;
10
10
  }
@@ -0,0 +1,14 @@
1
+ export const FEED_CATEGORY_VALUES = [
2
+ "budget",
3
+ "healthy",
4
+ "new",
5
+ "personal",
6
+ "popular",
7
+ "quick",
8
+ "recommended",
9
+ "regional",
10
+ "regular",
11
+ "seasonal",
12
+ "trending",
13
+ ] as const;
14
+ export type FeedCategory = (typeof FEED_CATEGORY_VALUES)[number];
package/src/feed/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from "./category";
1
2
  export * from "./recipe";
@@ -1,6 +1,15 @@
1
- import { Allergen, Cuisine, Currency, DietaryTag, Difficulty, MealType, Spiciness } from "../common";
1
+ import {
2
+ Allergen,
3
+ Cuisine,
4
+ Currency,
5
+ DietaryTag,
6
+ Difficulty,
7
+ MealType,
8
+ Spiciness,
9
+ } from "../common";
2
10
  import { Entity, Locale } from "../core";
3
11
  import { RecipeStats } from "../recipes";
12
+ import { FeedCategory } from "./category";
4
13
 
5
14
  export interface RecipeFeedItem extends Entity {
6
15
  allergens: Allergen[];
@@ -12,50 +21,15 @@ export interface RecipeFeedItem extends Entity {
12
21
  images: string[];
13
22
  mealTypes: MealType[];
14
23
  spiciness: Spiciness;
15
- titles: Partial<Record<Locale, string>>;
24
+ titles: Record<Locale, string>;
16
25
  }
17
26
 
18
27
  export interface FeedRecipe extends RecipeFeedItem {
19
28
  stats: RecipeStats;
20
29
  }
21
30
 
22
- /*
23
- import { Cuisine } from "../recipes/cuisine";
24
- import { DietaryTag } from "../recipes/dietary_tag";
25
- import { Difficulty } from "../recipes/difficulty";
26
- import { RecipeStats } from "../recipes/recipe_stats";
27
- import { FeedReason } from "./feed_reason";
28
- import { Region } from "./region";
29
-
30
- export interface FeedItemBase {
31
- recipeId: string;
32
- rank: number;
33
- score: number;
34
- titles: Partial<Record<Locale, string>>;
35
- imageUrl?: string;
36
- difficulty: Difficulty;
37
- time: number;
38
- cuisines: Cuisine[];
39
- dietaryTags: DietaryTag[];
40
- stats: RecipeStats;
41
- computedAt: Timestamp;
42
- }
43
-
44
- export interface GlobalFeedItem extends FeedItemBase {
45
- type: "global";
46
- }
47
-
48
- export interface RegionalFeedItem extends FeedItemBase {
49
- type: "regional";
50
- region: Region;
51
- regionScore: number;
31
+ export interface FeedGroup {
32
+ category: FeedCategory;
33
+ titles: Record<Locale, string>;
34
+ recipes: FeedRecipe[];
52
35
  }
53
-
54
- export interface PersonalFeedItem extends FeedItemBase {
55
- type: "personal";
56
- reason: FeedReason;
57
- similarityScore?: number;
58
- }
59
-
60
- export type FeedItem = GlobalFeedItem | RegionalFeedItem | PersonalFeedItem;
61
- */
@@ -7,9 +7,9 @@ export interface IngredientEntityMeta extends Entity {
7
7
  category: IngredientCategory;
8
8
  cost: Currency;
9
9
  group: IngredientGroup;
10
- slug: string;
11
10
  imageUrl: string | null;
12
- standardUnit?: Unit;
11
+ slug: string;
12
+ standardUnit: Unit;
13
13
  }
14
14
 
15
15
  export interface IngredientEntityContent {
@@ -2,9 +2,9 @@ import { Unit } from "../common";
2
2
 
3
3
  export interface RecipeIngredientMeta {
4
4
  slug: string;
5
- optional?: boolean;
6
- quantity?: number;
7
- unit?: Unit;
5
+ optional: boolean;
6
+ quantity: number;
7
+ unit: Unit;
8
8
  }
9
9
 
10
10
  export interface RecipeIngredientContent {
@@ -9,6 +9,6 @@ export interface UserIngredient extends Entity {
9
9
  expiresAt: Timestamp | null;
10
10
  group: IngredientGroup;
11
11
  slug: string;
12
- quantity?: number;
13
- unit?: Unit;
12
+ quantity: number;
13
+ unit: Unit;
14
14
  }
@@ -1,10 +1,11 @@
1
+ import { Region } from "../core";
1
2
  import { InteractionEventType } from "./event_type";
2
3
 
3
4
  export interface InteractionEvent {
4
5
  userId: string;
5
6
  recipeId: string;
6
7
  eventType: InteractionEventType;
7
- value?: number;
8
- region?: string;
8
+ region: Region;
9
9
  timestamp: number;
10
+ value?: number;
10
11
  }
@@ -2,5 +2,5 @@ import { Entity } from "../core";
2
2
 
3
3
  export interface SavedRecipe extends Entity {
4
4
  recipeId: string;
5
- searchTerms?: string[];
5
+ searchTerms: string[];
6
6
  }
@@ -2,8 +2,8 @@ import { Entity } from "../core";
2
2
  import { MealPlanDay } from "./day";
3
3
 
4
4
  export interface MealPlan extends Entity {
5
- startDate: string;
6
- endDate: string;
7
5
  days: MealPlanDay[];
8
- name?: string;
6
+ endDate: string;
7
+ name: string;
8
+ startDate: string;
9
9
  }
@@ -5,10 +5,10 @@ import { InstructionContent } from "./instruction";
5
5
 
6
6
  export interface RecipeContent {
7
7
  description: string;
8
- equipment?: RecipeEquipmentContent[];
8
+ equipment: RecipeEquipmentContent[];
9
9
  ingredientSections: IngredientSectionContent[];
10
10
  instructions: InstructionContent[];
11
11
  locale: Locale;
12
- tips?: string[];
12
+ tips: string[];
13
13
  title: string;
14
14
  }
@@ -2,10 +2,10 @@ import { Temperature } from "../common";
2
2
 
3
3
  export interface InstructionMeta {
4
4
  step: number;
5
+ equipment: string[];
6
+ ingredients: string[];
7
+ optional: boolean;
5
8
  duration?: number;
6
- equipment?: string[];
7
- ingredients?: string[];
8
- optional?: boolean;
9
9
  temperature?: Temperature;
10
10
  }
11
11
 
@@ -16,7 +16,4 @@ export interface RecipeTarget {
16
16
  recipeId: string;
17
17
  }
18
18
 
19
- export type ReportTarget =
20
- | ExtractionTarget
21
- | ImageTarget
22
- | RecipeTarget;
19
+ export type ReportTarget = ExtractionTarget | ImageTarget | RecipeTarget;
@@ -0,0 +1,7 @@
1
+ import { ShoppingItemStatus } from "./item_status";
2
+
3
+ export interface ShoppingEquipment {
4
+ slug: string;
5
+ quantity: number;
6
+ status: ShoppingItemStatus;
7
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./equipment";
2
+ export * from "./ingredient";
1
3
  export * from "./item_status";
2
- export * from "./item";
3
4
  export * from "./list";
@@ -1,7 +1,7 @@
1
1
  import { Unit } from "../common";
2
2
  import { ShoppingItemStatus } from "./item_status";
3
3
 
4
- export interface ShoppingItem {
4
+ export interface ShoppingIngredient {
5
5
  slug: string;
6
6
  quantity: number;
7
7
  unit: Unit;
@@ -1,9 +1,11 @@
1
1
  import { Entity } from "../core";
2
- import { ShoppingItem } from "./item";
2
+ import { ShoppingEquipment } from "./equipment";
3
+ import { ShoppingIngredient } from "./ingredient";
3
4
 
4
5
  export interface ShoppingList extends Entity {
5
- name?: string;
6
- items: ShoppingItem[];
6
+ name: string;
7
+ ingredients: ShoppingIngredient[];
8
+ equipment: ShoppingEquipment[];
7
9
  planId: string;
8
10
  archived: boolean;
9
11
  }
package/src/core/api.ts DELETED
@@ -1,30 +0,0 @@
1
- import { AppErrorCode } from "./errors";
2
-
3
- export interface ApiSuccessResponse<T> {
4
- success: true;
5
- data: T;
6
- }
7
-
8
- export interface ApiErrorResponse {
9
- success: false;
10
- error: {
11
- code: AppErrorCode;
12
- message: string;
13
- };
14
- }
15
-
16
- export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
17
-
18
- export function success<T>(data: T): ApiSuccessResponse<T> {
19
- return { success: true, data };
20
- }
21
-
22
- export function failure(
23
- code: AppErrorCode,
24
- message: string,
25
- ): ApiErrorResponse {
26
- return {
27
- success: false,
28
- error: { code, message },
29
- };
30
- }