@cravery/core 0.0.67 → 0.0.69

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 (131) hide show
  1. package/dist/types/core/currency.d.ts +3 -0
  2. package/dist/types/core/currency.d.ts.map +1 -0
  3. package/dist/types/core/currency.js +13 -0
  4. package/dist/types/core/currency.js.map +1 -0
  5. package/dist/types/core/index.d.ts +2 -0
  6. package/dist/types/core/index.d.ts.map +1 -1
  7. package/dist/types/core/index.js +2 -0
  8. package/dist/types/core/index.js.map +1 -1
  9. package/dist/types/core/price.d.ts +2 -1
  10. package/dist/types/core/price.d.ts.map +1 -1
  11. package/dist/types/core/unit.d.ts.map +1 -0
  12. package/dist/types/core/unit.js.map +1 -0
  13. package/dist/types/equipment/equipment_entity.d.ts +1 -1
  14. package/dist/types/equipment/equipment_entity.d.ts.map +1 -1
  15. package/dist/types/index.d.ts +2 -1
  16. package/dist/types/index.d.ts.map +1 -1
  17. package/dist/types/index.js +2 -1
  18. package/dist/types/index.js.map +1 -1
  19. package/dist/types/ingredients/ingredient.d.ts +1 -1
  20. package/dist/types/ingredients/ingredient.d.ts.map +1 -1
  21. package/dist/types/ingredients/ingredient_entity.d.ts +2 -3
  22. package/dist/types/ingredients/ingredient_entity.d.ts.map +1 -1
  23. package/dist/types/ingredients/user_ingredient.d.ts +1 -2
  24. package/dist/types/ingredients/user_ingredient.d.ts.map +1 -1
  25. package/dist/types/interactions/cook.d.ts +6 -0
  26. package/dist/types/interactions/cook.d.ts.map +1 -0
  27. package/dist/types/{users/profile.js → interactions/cook.js} +1 -1
  28. package/dist/types/interactions/cook.js.map +1 -0
  29. package/dist/types/interactions/index.d.ts +4 -0
  30. package/dist/types/interactions/index.d.ts.map +1 -0
  31. package/dist/types/interactions/index.js +20 -0
  32. package/dist/types/interactions/index.js.map +1 -0
  33. package/dist/types/interactions/rate.d.ts +6 -0
  34. package/dist/types/interactions/rate.d.ts.map +1 -0
  35. package/dist/types/{users/bookmark.js → interactions/rate.js} +1 -1
  36. package/dist/types/interactions/rate.js.map +1 -0
  37. package/dist/types/interactions/save.d.ts +6 -0
  38. package/dist/types/interactions/save.d.ts.map +1 -0
  39. package/dist/types/interactions/save.js +3 -0
  40. package/dist/types/interactions/save.js.map +1 -0
  41. package/dist/types/limits/index.d.ts.map +1 -0
  42. package/dist/types/limits/index.js.map +1 -0
  43. package/dist/types/{access → limits}/limits.d.ts.map +1 -1
  44. package/dist/types/{access → limits}/limits.js.map +1 -1
  45. package/dist/types/limits/operation.d.ts +3 -0
  46. package/dist/types/limits/operation.d.ts.map +1 -0
  47. package/dist/types/{access → limits}/operation.js +2 -1
  48. package/dist/types/limits/operation.js.map +1 -0
  49. package/dist/types/{access → limits}/usage.d.ts.map +1 -1
  50. package/dist/types/{access → limits}/usage.js.map +1 -1
  51. package/dist/types/recipes/index.d.ts +0 -1
  52. package/dist/types/recipes/index.d.ts.map +1 -1
  53. package/dist/types/recipes/index.js +0 -1
  54. package/dist/types/recipes/index.js.map +1 -1
  55. package/dist/types/recipes/recipe.d.ts +8 -4
  56. package/dist/types/recipes/recipe.d.ts.map +1 -1
  57. package/dist/types/reports/target.d.ts.map +1 -1
  58. package/dist/types/subscriptions/cost.d.ts +2 -1
  59. package/dist/types/subscriptions/cost.d.ts.map +1 -1
  60. package/dist/types/subscriptions/index.d.ts +1 -0
  61. package/dist/types/subscriptions/index.d.ts.map +1 -1
  62. package/dist/types/subscriptions/index.js +1 -0
  63. package/dist/types/subscriptions/index.js.map +1 -1
  64. package/dist/types/subscriptions/member.d.ts +3 -2
  65. package/dist/types/subscriptions/member.d.ts.map +1 -1
  66. package/dist/types/subscriptions/member_status.d.ts +3 -0
  67. package/dist/types/subscriptions/member_status.d.ts.map +1 -0
  68. package/dist/types/subscriptions/member_status.js +10 -0
  69. package/dist/types/subscriptions/member_status.js.map +1 -0
  70. package/dist/types/subscriptions/subscription.d.ts +4 -3
  71. package/dist/types/subscriptions/subscription.d.ts.map +1 -1
  72. package/dist/types/users/index.d.ts +0 -2
  73. package/dist/types/users/index.d.ts.map +1 -1
  74. package/dist/types/users/index.js +0 -2
  75. package/dist/types/users/index.js.map +1 -1
  76. package/dist/types/users/request.d.ts +14 -4
  77. package/dist/types/users/request.d.ts.map +1 -1
  78. package/dist/types/users/user.d.ts +1 -0
  79. package/dist/types/users/user.d.ts.map +1 -1
  80. package/package.json +2 -2
  81. package/src/types/core/currency.ts +10 -0
  82. package/src/types/core/index.ts +2 -0
  83. package/src/types/core/price.ts +3 -1
  84. package/src/types/equipment/equipment_entity.ts +1 -1
  85. package/src/types/index.ts +2 -1
  86. package/src/types/ingredients/ingredient.ts +1 -1
  87. package/src/types/ingredients/ingredient_entity.ts +2 -3
  88. package/src/types/ingredients/user_ingredient.ts +1 -2
  89. package/src/types/interactions/cook.ts +6 -0
  90. package/src/types/interactions/index.ts +3 -0
  91. package/src/types/interactions/rate.ts +6 -0
  92. package/src/types/interactions/save.ts +6 -0
  93. package/src/types/{access → limits}/index.ts +3 -3
  94. package/src/types/{access → limits}/limits.ts +6 -6
  95. package/src/types/{access → limits}/operation.ts +10 -10
  96. package/src/types/{access → limits}/usage.ts +9 -9
  97. package/src/types/recipes/index.ts +0 -1
  98. package/src/types/recipes/recipe.ts +9 -4
  99. package/src/types/reports/target.ts +8 -1
  100. package/src/types/subscriptions/cost.ts +3 -1
  101. package/src/types/subscriptions/index.ts +1 -0
  102. package/src/types/subscriptions/member.ts +3 -2
  103. package/src/types/subscriptions/member_status.ts +7 -0
  104. package/src/types/subscriptions/subscription.ts +4 -3
  105. package/src/types/users/index.ts +0 -2
  106. package/src/types/users/request.ts +18 -4
  107. package/src/types/users/user.ts +1 -0
  108. package/dist/types/access/index.d.ts.map +0 -1
  109. package/dist/types/access/index.js.map +0 -1
  110. package/dist/types/access/operation.d.ts +0 -3
  111. package/dist/types/access/operation.d.ts.map +0 -1
  112. package/dist/types/access/operation.js.map +0 -1
  113. package/dist/types/recipes/unit.d.ts.map +0 -1
  114. package/dist/types/recipes/unit.js.map +0 -1
  115. package/dist/types/users/bookmark.d.ts +0 -5
  116. package/dist/types/users/bookmark.d.ts.map +0 -1
  117. package/dist/types/users/bookmark.js.map +0 -1
  118. package/dist/types/users/profile.d.ts +0 -8
  119. package/dist/types/users/profile.d.ts.map +0 -1
  120. package/dist/types/users/profile.js.map +0 -1
  121. package/src/types/users/bookmark.ts +0 -5
  122. package/src/types/users/profile.ts +0 -8
  123. /package/dist/types/{recipes → core}/unit.d.ts +0 -0
  124. /package/dist/types/{recipes → core}/unit.js +0 -0
  125. /package/dist/types/{access → limits}/index.d.ts +0 -0
  126. /package/dist/types/{access → limits}/index.js +0 -0
  127. /package/dist/types/{access → limits}/limits.d.ts +0 -0
  128. /package/dist/types/{access → limits}/limits.js +0 -0
  129. /package/dist/types/{access → limits}/usage.d.ts +0 -0
  130. /package/dist/types/{access → limits}/usage.js +0 -0
  131. /package/src/types/{recipes → core}/unit.ts +0 -0
@@ -1,12 +1,22 @@
1
1
  import { EntityBase, Locale } from "../core";
2
2
  import { RequestStatus } from "./request_status";
3
- export interface Request extends EntityBase {
3
+ export interface RequestBase extends EntityBase {
4
4
  status: RequestStatus;
5
5
  locale: Locale;
6
- url?: string;
7
- images?: string[];
8
- text?: string;
9
6
  recipeId?: string;
10
7
  error?: string;
11
8
  }
9
+ export interface UrlRequest extends RequestBase {
10
+ type: "url";
11
+ url: string;
12
+ }
13
+ export interface ImageRequest extends RequestBase {
14
+ type: "image";
15
+ images: string[];
16
+ }
17
+ export interface TextRequest extends RequestBase {
18
+ type: "text";
19
+ text: string;
20
+ }
21
+ export type Request = UrlRequest | ImageRequest | TextRequest;
12
22
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/types/users/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/types/users/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC"}
@@ -5,6 +5,7 @@ export interface User extends Entity {
5
5
  name: string;
6
6
  role: UserRole;
7
7
  imageUrl?: string;
8
+ score?: number;
8
9
  subscriptionId?: string;
9
10
  verified?: boolean;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/users/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,IAAK,SAAQ,MAAM;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/users/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,IAAK,SAAQ,MAAM;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cravery/core",
3
- "version": "0.0.67",
4
- "description": "Clean architecture foundation for Cravery",
3
+ "version": "0.0.69",
4
+ "description": "Core types for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -0,0 +1,10 @@
1
+ export const CURRENCY_VALUES = [
2
+ "USD",
3
+ "CAD",
4
+ "GBP",
5
+ "EUR",
6
+ "EGP",
7
+ "AED",
8
+ "SAR",
9
+ ] as const;
10
+ export type Currency = (typeof CURRENCY_VALUES)[number];
@@ -1,3 +1,4 @@
1
+ export * from "./currency";
1
2
  export * from "./entity";
2
3
  export * from "./entity_status";
3
4
  export * from "./errors";
@@ -7,3 +8,4 @@ export * from "./pagination";
7
8
  export * from "./price";
8
9
  export * from "./theme";
9
10
  export * from "./timestamp";
11
+ export * from "./unit";
@@ -1,4 +1,6 @@
1
+ import { Currency } from "./currency";
2
+
1
3
  export interface Price {
2
4
  amount: number;
3
- currency: string;
5
+ currency: Currency;
4
6
  }
@@ -4,7 +4,7 @@ import { EquipmentCategory } from "./category";
4
4
  export interface EquipmentEntityMeta extends Entity {
5
5
  category: EquipmentCategory;
6
6
  slug: string;
7
- imageUrl?: string | null;
7
+ imageUrl: string | null;
8
8
  price?: Price;
9
9
  }
10
10
 
@@ -1,7 +1,8 @@
1
- export * from "./access";
2
1
  export * from "./core";
3
2
  export * from "./equipment";
4
3
  export * from "./ingredients";
4
+ export * from "./interactions";
5
+ export * from "./limits";
5
6
  export * from "./recipes";
6
7
  export * from "./reports";
7
8
  export * from "./settings";
@@ -1,4 +1,4 @@
1
- import { Unit } from "../recipes";
1
+ import { Unit } from "../core";
2
2
 
3
3
  export interface IngredientMeta {
4
4
  slug: string;
@@ -1,5 +1,4 @@
1
- import { Entity, Price } from "../core";
2
- import { Unit } from "../recipes";
1
+ import { Entity, Price, Unit } from "../core";
3
2
  import { IngredientCategory } from "./category";
4
3
  import { IngredientGroup } from "./group";
5
4
 
@@ -7,7 +6,7 @@ export interface IngredientEntityMeta extends Entity {
7
6
  category: IngredientCategory;
8
7
  group: IngredientGroup;
9
8
  slug: string;
10
- imageUrl?: string | null;
9
+ imageUrl: string | null;
11
10
  price?: Price;
12
11
  standardUnit?: Unit;
13
12
  }
@@ -1,5 +1,4 @@
1
- import { Entity, Price, Timestamp } from "../core";
2
- import { Unit } from "../recipes";
1
+ import { Entity, Price, Timestamp, Unit } from "../core";
3
2
  import { IngredientCategory } from "./category";
4
3
  import { IngredientGroup } from "./group";
5
4
 
@@ -0,0 +1,6 @@
1
+ import { Entity } from "../core";
2
+
3
+ export interface CookedRecipe extends Entity {
4
+ recipeId: string;
5
+ count: number;
6
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./cook";
2
+ export * from "./rate";
3
+ export * from "./save";
@@ -0,0 +1,6 @@
1
+ import { Entity } from "../core";
2
+
3
+ export interface RatedRecipe extends Entity {
4
+ recipeId: string;
5
+ value: number;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { Entity } from "../core";
2
+
3
+ export interface SavedRecipe extends Entity {
4
+ recipeId: string;
5
+ searchTerms?: string[];
6
+ }
@@ -1,3 +1,3 @@
1
- export * from "./limits";
2
- export * from "./operation";
3
- export * from "./usage";
1
+ export * from "./limits";
2
+ export * from "./operation";
3
+ export * from "./usage";
@@ -1,6 +1,6 @@
1
- import { SubscriptionTier } from "../subscriptions";
2
- import { Operation } from "./operation";
3
-
4
- export type TierLimits = Record<SubscriptionTier, number>;
5
-
6
- export type LimitsConfig = Record<Operation, TierLimits>;
1
+ import { SubscriptionTier } from "../subscriptions";
2
+ import { Operation } from "./operation";
3
+
4
+ export type TierLimits = Record<SubscriptionTier, number>;
5
+
6
+ export type LimitsConfig = Record<Operation, TierLimits>;
@@ -1,10 +1,10 @@
1
- export const OPERATION_VALUES = [
2
- "recipeFromUrl",
3
- "recipeFromImage",
4
- "recipeFromText",
5
- "scanIngredients",
6
- "scanEquipment",
7
- "mealPlan",
8
- ] as const;
9
-
10
- export type Operation = (typeof OPERATION_VALUES)[number];
1
+ export const OPERATION_VALUES = [
2
+ "assistant",
3
+ "mealPlan",
4
+ "recipeFromUrl",
5
+ "recipeFromImage",
6
+ "recipeFromText",
7
+ "scanIngredients",
8
+ "scanEquipment",
9
+ ] as const;
10
+ export type Operation = (typeof OPERATION_VALUES)[number];
@@ -1,9 +1,9 @@
1
- import { Timestamp } from "../core";
2
- import { Operation } from "./operation";
3
-
4
- export type UsageCounts = Partial<Record<Operation, number>>;
5
-
6
- export interface UsagePeriod {
7
- counts: UsageCounts;
8
- updatedAt: Timestamp;
9
- }
1
+ import { Timestamp } from "../core";
2
+ import { Operation } from "./operation";
3
+
4
+ export type UsageCounts = Partial<Record<Operation, number>>;
5
+
6
+ export interface UsagePeriod {
7
+ counts: UsageCounts;
8
+ updatedAt: Timestamp;
9
+ }
@@ -12,4 +12,3 @@ export * from "./recipe";
12
12
  export * from "./spiciness";
13
13
  export * from "./temperature_unit";
14
14
  export * from "./temperature";
15
- export * from "./unit";
@@ -1,4 +1,4 @@
1
- import { Entity } from "../core";
1
+ import { Entity, Price } from "../core";
2
2
  import { Locale } from "../core/locale";
3
3
  import { Allergen } from "./allergen";
4
4
  import { Cuisine } from "./cuisine";
@@ -34,6 +34,7 @@ export interface RecipeMeta extends Entity {
34
34
  mealTypes: MealType[];
35
35
  nutrition?: Nutrition;
36
36
  originalLocale: Locale;
37
+ price?: Price;
37
38
  searchTerms?: string[];
38
39
  servings: number;
39
40
  source: RecipeSource;
@@ -69,13 +70,17 @@ export interface Recipe extends Entity {
69
70
  mealTypes: MealType[];
70
71
  nutrition?: Nutrition;
71
72
  originalLocale: Locale;
72
- searchTerms?: string[];
73
+ price?: Price;
73
74
  servings: number;
74
- source: RecipeSource;
75
- sourceUrl?: string;
76
75
  spiciness: Spiciness;
77
76
  time: number;
78
77
  tips?: string[];
79
78
  title: string;
80
79
  videoUrl?: string;
81
80
  }
81
+
82
+ export interface AdminRecipe extends Recipe {
83
+ searchTerms?: string[];
84
+ source: RecipeSource;
85
+ sourceUrl?: string;
86
+ }
@@ -5,7 +5,14 @@ export interface AiTarget {
5
5
 
6
6
  export interface ExtractionTarget {
7
7
  type: "extraction";
8
- sourceType: "cobalt" | "image" | "pdf" | "text" | "tiktok" | "video" | "website";
8
+ sourceType:
9
+ | "cobalt"
10
+ | "image"
11
+ | "pdf"
12
+ | "text"
13
+ | "tiktok"
14
+ | "video"
15
+ | "website";
9
16
  sourceUrl?: string;
10
17
  }
11
18
 
@@ -1,5 +1,7 @@
1
+ import { Currency } from "../core";
2
+
1
3
  export interface SubscriptionCost {
2
- currency: string;
4
+ currency: Currency;
3
5
  monthly: number;
4
6
  yearly: number;
5
7
  }
@@ -1,5 +1,6 @@
1
1
  export * from "./billing_period";
2
2
  export * from "./cost";
3
+ export * from "./member_status";
3
4
  export * from "./member";
4
5
  export * from "./store";
5
6
  export * from "./subscription_role";
@@ -1,11 +1,12 @@
1
1
  import { Timestamp } from "../core";
2
+ import { MemberStatus } from "./member_status";
2
3
  import { SubscriptionRole } from "./subscription_role";
3
- import { SubscriptionStatus } from "./subscription_status";
4
4
 
5
5
  export interface Member {
6
6
  userId: string;
7
7
  role: SubscriptionRole;
8
- status: SubscriptionStatus;
8
+ status: MemberStatus;
9
9
  invitedAt: Timestamp;
10
10
  joinedAt?: Timestamp;
11
+ removedAt?: Timestamp;
11
12
  }
@@ -0,0 +1,7 @@
1
+ export const MEMBER_STATUS_VALUES = [
2
+ "invited",
3
+ "active",
4
+ "declined",
5
+ "removed",
6
+ ] as const;
7
+ export type MemberStatus = (typeof MEMBER_STATUS_VALUES)[number];
@@ -1,18 +1,19 @@
1
- import { Entity, Timestamp } from "../core";
1
+ import { EntityBase, Timestamp } from "../core";
2
2
  import { BillingPeriod } from "./billing_period";
3
3
  import { Member } from "./member";
4
4
  import { SubscriptionStore } from "./store";
5
+ import { SubscriptionStatus } from "./subscription_status";
5
6
  import { SubscriptionTier } from "./subscription_tier";
6
7
 
7
- export interface Subscription extends Entity {
8
+ export interface Subscription extends EntityBase {
8
9
  billingPeriod: BillingPeriod;
9
10
  customerId: string;
10
11
  entitlementId: string;
11
12
  expiresAt: Timestamp;
12
- inTrial: boolean;
13
13
  members: Member[];
14
14
  purchasedAt: Timestamp;
15
15
  renewable: boolean;
16
+ status: SubscriptionStatus;
16
17
  store: SubscriptionStore;
17
18
  tier: SubscriptionTier;
18
19
  cancelledAt?: Timestamp;
@@ -1,5 +1,3 @@
1
- export * from "./bookmark";
2
- export * from "./profile";
3
1
  export * from "./request_status";
4
2
  export * from "./request";
5
3
  export * from "./user_role";
@@ -1,12 +1,26 @@
1
1
  import { EntityBase, Locale } from "../core";
2
2
  import { RequestStatus } from "./request_status";
3
3
 
4
- export interface Request extends EntityBase {
4
+ export interface RequestBase extends EntityBase {
5
5
  status: RequestStatus;
6
6
  locale: Locale;
7
- url?: string;
8
- images?: string[];
9
- text?: string;
10
7
  recipeId?: string;
11
8
  error?: string;
12
9
  }
10
+
11
+ export interface UrlRequest extends RequestBase {
12
+ type: "url";
13
+ url: string;
14
+ }
15
+
16
+ export interface ImageRequest extends RequestBase {
17
+ type: "image";
18
+ images: string[];
19
+ }
20
+
21
+ export interface TextRequest extends RequestBase {
22
+ type: "text";
23
+ text: string;
24
+ }
25
+
26
+ export type Request = UrlRequest | ImageRequest | TextRequest;
@@ -6,6 +6,7 @@ export interface User extends Entity {
6
6
  name: string;
7
7
  role: UserRole;
8
8
  imageUrl?: string;
9
+ score?: number;
9
10
  subscriptionId?: string;
10
11
  verified?: boolean;
11
12
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/access/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/access/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB"}
@@ -1,3 +0,0 @@
1
- export declare const OPERATION_VALUES: readonly ["recipeFromUrl", "recipeFromImage", "recipeFromText", "scanIngredients", "scanEquipment", "mealPlan"];
2
- export type Operation = (typeof OPERATION_VALUES)[number];
3
- //# sourceMappingURL=operation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/types/access/operation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,iHAOnB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/types/access/operation.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,UAAU;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../../src/types/recipes/unit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6TA8Cd,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unit.js","sourceRoot":"","sources":["../../../src/types/recipes/unit.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,oBAAoB;IACpB,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,kBAAkB;IAClB,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,oBAAoB;IACpB,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,mBAAmB;IACnB,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,YAAY;IACZ,KAAK;IACL,SAAS;IACT,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { Entity } from "../core";
2
- export interface Bookmark extends Entity {
3
- recipeId: string;
4
- }
5
- //# sourceMappingURL=bookmark.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bookmark.d.ts","sourceRoot":"","sources":["../../../src/types/users/bookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bookmark.js","sourceRoot":"","sources":["../../../src/types/users/bookmark.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import { Entity } from "../core";
2
- export interface Profile extends Entity {
3
- bio?: string;
4
- email: string;
5
- imageUrl?: string;
6
- name: string;
7
- }
8
- //# sourceMappingURL=profile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/types/users/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,OAAQ,SAAQ,MAAM;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../src/types/users/profile.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { Entity } from "../core";
2
-
3
- export interface Bookmark extends Entity {
4
- recipeId: string;
5
- }
@@ -1,8 +0,0 @@
1
- import { Entity } from "../core";
2
-
3
- export interface Profile extends Entity {
4
- bio?: string;
5
- email: string;
6
- imageUrl?: string;
7
- name: string;
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes