@cravery/core 0.0.52 → 0.0.54

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 (60) hide show
  1. package/dist/config/subscription.d.ts +2 -2
  2. package/dist/config/subscription.d.ts.map +1 -1
  3. package/dist/config/subscription.js +2 -2
  4. package/dist/config/subscription.js.map +1 -1
  5. package/dist/types/core/errors.d.ts +9 -0
  6. package/dist/types/core/errors.d.ts.map +1 -1
  7. package/dist/types/core/errors.js +22 -1
  8. package/dist/types/core/errors.js.map +1 -1
  9. package/dist/types/core/index.d.ts +1 -0
  10. package/dist/types/core/index.d.ts.map +1 -1
  11. package/dist/types/core/index.js +1 -0
  12. package/dist/types/core/index.js.map +1 -1
  13. package/dist/types/core/price.d.ts +5 -0
  14. package/dist/types/core/price.d.ts.map +1 -0
  15. package/dist/types/core/price.js +3 -0
  16. package/dist/types/core/price.js.map +1 -0
  17. package/dist/types/equipment/equipment_entity.d.ts +2 -1
  18. package/dist/types/equipment/equipment_entity.d.ts.map +1 -1
  19. package/dist/types/equipment/index.d.ts +1 -0
  20. package/dist/types/equipment/index.d.ts.map +1 -1
  21. package/dist/types/equipment/index.js +1 -0
  22. package/dist/types/equipment/index.js.map +1 -1
  23. package/dist/types/equipment/user_equipment.d.ts +9 -0
  24. package/dist/types/equipment/user_equipment.d.ts.map +1 -0
  25. package/dist/types/equipment/user_equipment.js +3 -0
  26. package/dist/types/equipment/user_equipment.js.map +1 -0
  27. package/dist/types/iam/subscription.d.ts +1 -1
  28. package/dist/types/iam/subscription.d.ts.map +1 -1
  29. package/dist/types/ingredient/group.d.ts +3 -0
  30. package/dist/types/ingredient/group.d.ts.map +1 -0
  31. package/dist/types/ingredient/group.js +11 -0
  32. package/dist/types/ingredient/group.js.map +1 -0
  33. package/dist/types/ingredient/index.d.ts +2 -0
  34. package/dist/types/ingredient/index.d.ts.map +1 -1
  35. package/dist/types/ingredient/index.js +2 -0
  36. package/dist/types/ingredient/index.js.map +1 -1
  37. package/dist/types/ingredient/ingredient_entity.d.ts +4 -1
  38. package/dist/types/ingredient/ingredient_entity.d.ts.map +1 -1
  39. package/dist/types/ingredient/user_ingredient.d.ts +14 -0
  40. package/dist/types/ingredient/user_ingredient.d.ts.map +1 -0
  41. package/dist/types/ingredient/user_ingredient.js +3 -0
  42. package/dist/types/ingredient/user_ingredient.js.map +1 -0
  43. package/dist/types/report/report_target_type.d.ts +1 -1
  44. package/dist/types/report/report_target_type.d.ts.map +1 -1
  45. package/dist/types/report/report_target_type.js +1 -0
  46. package/dist/types/report/report_target_type.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/config/subscription.ts +5 -2
  49. package/src/types/core/errors.ts +26 -0
  50. package/src/types/core/index.ts +1 -0
  51. package/src/types/core/price.ts +4 -0
  52. package/src/types/equipment/equipment_entity.ts +2 -1
  53. package/src/types/equipment/index.ts +1 -0
  54. package/src/types/equipment/user_equipment.ts +9 -0
  55. package/src/types/iam/subscription.ts +1 -1
  56. package/src/types/ingredient/group.ts +8 -0
  57. package/src/types/ingredient/index.ts +2 -0
  58. package/src/types/ingredient/ingredient_entity.ts +4 -1
  59. package/src/types/ingredient/user_ingredient.ts +14 -0
  60. package/src/types/report/report_target_type.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { Price, SubscriptionTier } from "../types";
1
+ import { SubscriptionCost, SubscriptionTier } from "../types";
2
2
  export declare const MAX_MEMBERS_FAMILY_PLAN = 4;
3
- export declare const PRICING: Record<Exclude<SubscriptionTier, "free">, Price>;
3
+ export declare const SUBSCRIPTIONCOSTS: Record<Exclude<SubscriptionTier, "free">, SubscriptionCost>;
4
4
  //# sourceMappingURL=subscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/config/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,KAAK,CAWpE,CAAC"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/config/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,EACjC,gBAAgB,CAYjB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PRICING = exports.MAX_MEMBERS_FAMILY_PLAN = void 0;
3
+ exports.SUBSCRIPTIONCOSTS = exports.MAX_MEMBERS_FAMILY_PLAN = void 0;
4
4
  exports.MAX_MEMBERS_FAMILY_PLAN = 4;
5
- exports.PRICING = {
5
+ exports.SUBSCRIPTIONCOSTS = {
6
6
  pro: {
7
7
  currency: "USD",
8
8
  monthly: 12.99,
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/config/subscription.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAE5B,QAAA,OAAO,GAAqD;IACvE,GAAG,EAAE;QACH,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,KAAK;KACd;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,MAAM;KACf;CACF,CAAC"}
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/config/subscription.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAE5B,QAAA,iBAAiB,GAG1B;IACF,GAAG,EAAE;QACH,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,KAAK;KACd;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,MAAM;KACf;CACF,CAAC"}
@@ -34,4 +34,13 @@ export declare class DailyLimitError extends AppError {
34
34
  export declare class MonthlyLimitError extends AppError {
35
35
  constructor(message: string, context?: Record<string, unknown>);
36
36
  }
37
+ export declare class NoRecipeFoundError extends AppError {
38
+ constructor(reason: string, context?: Record<string, unknown>);
39
+ }
40
+ export declare class LowConfidenceError extends AppError {
41
+ constructor(confidence: number, context?: Record<string, unknown>);
42
+ }
43
+ export declare class UnsafeContentError extends AppError {
44
+ constructor(context?: Record<string, unknown>);
45
+ }
37
46
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/types/core/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,6NAaxB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGhD,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAY,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAanC,MAAM;;;;;;;CASP;AAED,qBAAa,eAAgB,SAAQ,QAAQ;gBAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED,qBAAa,aAAc,SAAQ,QAAQ;gBAC7B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AM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI9C"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonthlyLimitError = exports.DailyLimitError = exports.ConflictError = exports.ForbiddenError = exports.UnauthorizedError = exports.NotFoundError = exports.ValidationError = exports.AppError = exports.APP_ERROR_CODE_VALUES = void 0;
3
+ exports.UnsafeContentError = exports.LowConfidenceError = exports.NoRecipeFoundError = exports.MonthlyLimitError = exports.DailyLimitError = exports.ConflictError = exports.ForbiddenError = exports.UnauthorizedError = exports.NotFoundError = exports.ValidationError = exports.AppError = exports.APP_ERROR_CODE_VALUES = void 0;
4
4
  exports.APP_ERROR_CODE_VALUES = [
5
5
  "bad_request",
6
6
  "conflict",
@@ -86,4 +86,25 @@ class MonthlyLimitError extends AppError {
86
86
  }
87
87
  }
88
88
  exports.MonthlyLimitError = MonthlyLimitError;
89
+ class NoRecipeFoundError extends AppError {
90
+ constructor(reason, context) {
91
+ super("no_recipe_found", reason, 400, context);
92
+ this.name = "NoRecipeFoundError";
93
+ }
94
+ }
95
+ exports.NoRecipeFoundError = NoRecipeFoundError;
96
+ class LowConfidenceError extends AppError {
97
+ constructor(confidence, context) {
98
+ super("low_confidence", "We couldn't extract a complete recipe. Try a clearer image or more detailed text.", 400, Object.assign(Object.assign({}, context), { confidence }));
99
+ this.name = "LowConfidenceError";
100
+ }
101
+ }
102
+ exports.LowConfidenceError = LowConfidenceError;
103
+ class UnsafeContentError extends AppError {
104
+ constructor(context) {
105
+ super("unsafe_content", "This content cannot be processed.", 400, context);
106
+ this.name = "UnsafeContentError";
107
+ }
108
+ }
109
+ exports.UnsafeContentError = UnsafeContentError;
89
110
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/types/core/errors.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACnC,aAAa;IACb,UAAU;IACV,qBAA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nC,CAAC;CACF;AALD,gDAKC;AAED,MAAa,kBAAmB,SAAQ,QAAQ;IAC9C,YAAY,UAAkB,EAAE,OAAiC;QAC/D,KAAK,CACH,gBAAgB,EAChB,mFAAmF,EACnF,GAAG,kCACE,OAAO,KAAE,UAAU,IACzB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAVD,gDAUC;AAED,MAAa,kBAAmB,SAAQ,QAAQ;IAC9C,YAAY,OAAiC;QAC3C,KAAK,CAAC,gBAAgB,EAAE,mCAAmC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AALD,gDAKC"}
@@ -5,6 +5,7 @@ export * from "./errors";
5
5
  export * from "./locale";
6
6
  export * from "./measurement_system";
7
7
  export * from "./pagination";
8
+ export * from "./price";
8
9
  export * from "./settings";
9
10
  export * from "./theme";
10
11
  export * from "./timestamp";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -21,6 +21,7 @@ __exportStar(require("./errors"), exports);
21
21
  __exportStar(require("./locale"), exports);
22
22
  __exportStar(require("./measurement_system"), exports);
23
23
  __exportStar(require("./pagination"), exports);
24
+ __exportStar(require("./price"), exports);
24
25
  __exportStar(require("./settings"), exports);
25
26
  __exportStar(require("./theme"), exports);
26
27
  __exportStar(require("./timestamp"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
@@ -0,0 +1,5 @@
1
+ export interface Price {
2
+ amount: number;
3
+ currency: string;
4
+ }
5
+ //# sourceMappingURL=price.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../src/types/core/price.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=price.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price.js","sourceRoot":"","sources":["../../../src/types/core/price.ts"],"names":[],"mappings":""}
@@ -1,7 +1,8 @@
1
- import { Entity } from "../core";
1
+ import { Entity, Price } from "../core";
2
2
  import { EquipmentCategory } from "./category";
3
3
  export interface EquipmentEntityMeta extends Entity {
4
4
  category: EquipmentCategory;
5
+ price?: Price;
5
6
  slug: string;
6
7
  }
7
8
  export interface EquipmentEntityContent {
@@ -1 +1 @@
1
- {"version":3,"file":"equipment_entity.d.ts","sourceRoot":"","sources":["../../../src/types/equipment/equipment_entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,mBAAoB,SAAQ,MAAM;IACjD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eACf,SAAQ,mBAAmB,EAAE,sBAAsB;CAAG"}
1
+ {"version":3,"file":"equipment_entity.d.ts","sourceRoot":"","sources":["../../../src/types/equipment/equipment_entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,mBAAoB,SAAQ,MAAM;IACjD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eACf,SAAQ,mBAAmB,EAAE,sBAAsB;CAAG"}
@@ -1,4 +1,5 @@
1
1
  export * from "./category";
2
2
  export * from "./equipment_entity";
3
3
  export * from "./equipment";
4
+ export * from "./user_equipment";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/equipment/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/equipment/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./category"), exports);
18
18
  __exportStar(require("./equipment_entity"), exports);
19
19
  __exportStar(require("./equipment"), exports);
20
+ __exportStar(require("./user_equipment"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/equipment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/equipment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,qDAAmC;AACnC,8CAA4B;AAC5B,mDAAiC"}
@@ -0,0 +1,9 @@
1
+ import { Entity, Price } from "../core";
2
+ import { EquipmentCategory } from "./category";
3
+ export interface UserEquipment extends Entity {
4
+ category: EquipmentCategory;
5
+ price?: Price;
6
+ quantity?: number;
7
+ slug: string;
8
+ }
9
+ //# sourceMappingURL=user_equipment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user_equipment.d.ts","sourceRoot":"","sources":["../../../src/types/equipment/user_equipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user_equipment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user_equipment.js","sourceRoot":"","sources":["../../../src/types/equipment/user_equipment.ts"],"names":[],"mappings":""}
@@ -15,7 +15,7 @@ export interface Subscription extends Entity {
15
15
  providerId: string;
16
16
  tier: SubscriptionTier;
17
17
  }
18
- export interface Price {
18
+ export interface SubscriptionCost {
19
19
  currency: string;
20
20
  monthly: number;
21
21
  yearly: number;
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../src/types/iam/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../src/types/iam/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ export declare const INGREDIENT_GROUP_VALUES: readonly ["counter", "freezer", "fridge", "pantry", "spice"];
2
+ export type IngredientGroup = (typeof INGREDIENT_GROUP_VALUES)[number];
3
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/group.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,8DAM1B,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INGREDIENT_GROUP_VALUES = void 0;
4
+ exports.INGREDIENT_GROUP_VALUES = [
5
+ "counter",
6
+ "freezer",
7
+ "fridge",
8
+ "pantry",
9
+ "spice",
10
+ ];
11
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/types/ingredient/group.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACrC,SAAS;IACT,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,OAAO;CACC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export * from "./category";
2
+ export * from "./group";
2
3
  export * from "./ingredient_entity";
3
4
  export * from "./ingredient_section";
4
5
  export * from "./ingredient";
6
+ export * from "./user_ingredient";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
@@ -15,7 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./category"), exports);
18
+ __exportStar(require("./group"), exports);
18
19
  __exportStar(require("./ingredient_entity"), exports);
19
20
  __exportStar(require("./ingredient_section"), exports);
20
21
  __exportStar(require("./ingredient"), exports);
22
+ __exportStar(require("./user_ingredient"), exports);
21
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/ingredient/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,sDAAoC;AACpC,uDAAqC;AACrC,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/ingredient/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,sDAAoC;AACpC,uDAAqC;AACrC,+CAA6B;AAC7B,oDAAkC"}
@@ -1,7 +1,10 @@
1
- import { Entity } from "../core";
1
+ import { Entity, Price } from "../core";
2
2
  import { IngredientCategory } from "./category";
3
+ import { IngredientGroup } from "./group";
3
4
  export interface IngredientEntityMeta extends Entity {
4
5
  category: IngredientCategory;
6
+ group: IngredientGroup;
7
+ price?: Price;
5
8
  slug: string;
6
9
  }
7
10
  export interface IngredientEntityContent {
@@ -1 +1 @@
1
- {"version":3,"file":"ingredient_entity.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/ingredient_entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,oBAAqB,SAAQ,MAAM;IAClD,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;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":"ingredient_entity.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/ingredient_entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,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,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAAE,uBAAuB;CAAG"}
@@ -0,0 +1,14 @@
1
+ import { Entity, Price, Timestamp } from "../core";
2
+ import { Unit } from "../recipe";
3
+ import { IngredientCategory } from "./category";
4
+ import { IngredientGroup } from "./group";
5
+ export interface UserIngredient extends Entity {
6
+ category: IngredientCategory;
7
+ expiresAt?: Timestamp;
8
+ group: IngredientGroup;
9
+ price?: Price;
10
+ quantity?: number;
11
+ slug: string;
12
+ unit?: Unit;
13
+ }
14
+ //# sourceMappingURL=user_ingredient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user_ingredient.d.ts","sourceRoot":"","sources":["../../../src/types/ingredient/user_ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,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,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user_ingredient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user_ingredient.js","sourceRoot":"","sources":["../../../src/types/ingredient/user_ingredient.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- export declare const REPORT_TARGET_TYPE_VALUES: readonly ["image", "profile", "recipe"];
1
+ export declare const REPORT_TARGET_TYPE_VALUES: readonly ["extraction_attempt", "image", "profile", "recipe"];
2
2
  export type ReportTargetType = (typeof REPORT_TARGET_TYPE_VALUES)[number];
3
3
  //# sourceMappingURL=report_target_type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report_target_type.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,yCAI5B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"report_target_type.d.ts","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,+DAK5B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.REPORT_TARGET_TYPE_VALUES = void 0;
4
4
  exports.REPORT_TARGET_TYPE_VALUES = [
5
+ "extraction_attempt",
5
6
  "image",
6
7
  "profile",
7
8
  "recipe",
@@ -1 +1 @@
1
- {"version":3,"file":"report_target_type.js","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACvC,OAAO;IACP,SAAS;IACT,QAAQ;CACA,CAAC"}
1
+ {"version":3,"file":"report_target_type.js","sourceRoot":"","sources":["../../../src/types/report/report_target_type.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACvC,oBAAoB;IACpB,OAAO;IACP,SAAS;IACT,QAAQ;CACA,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/core",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "Clean architecture foundation for Cravery",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,8 +1,11 @@
1
- import { Price, SubscriptionTier } from "../types";
1
+ import { SubscriptionCost, SubscriptionTier } from "../types";
2
2
 
3
3
  export const MAX_MEMBERS_FAMILY_PLAN = 4;
4
4
 
5
- export const PRICING: Record<Exclude<SubscriptionTier, "free">, Price> = {
5
+ export const SUBSCRIPTIONCOSTS: Record<
6
+ Exclude<SubscriptionTier, "free">,
7
+ SubscriptionCost
8
+ > = {
6
9
  pro: {
7
10
  currency: "USD",
8
11
  monthly: 12.99,
@@ -96,3 +96,29 @@ export class MonthlyLimitError extends AppError {
96
96
  this.name = "MonthlyLimitError";
97
97
  }
98
98
  }
99
+
100
+ export class NoRecipeFoundError extends AppError {
101
+ constructor(reason: string, context?: Record<string, unknown>) {
102
+ super("no_recipe_found", reason, 400, context);
103
+ this.name = "NoRecipeFoundError";
104
+ }
105
+ }
106
+
107
+ export class LowConfidenceError extends AppError {
108
+ constructor(confidence: number, context?: Record<string, unknown>) {
109
+ super(
110
+ "low_confidence",
111
+ "We couldn't extract a complete recipe. Try a clearer image or more detailed text.",
112
+ 400,
113
+ { ...context, confidence },
114
+ );
115
+ this.name = "LowConfidenceError";
116
+ }
117
+ }
118
+
119
+ export class UnsafeContentError extends AppError {
120
+ constructor(context?: Record<string, unknown>) {
121
+ super("unsafe_content", "This content cannot be processed.", 400, context);
122
+ this.name = "UnsafeContentError";
123
+ }
124
+ }
@@ -5,6 +5,7 @@ export * from "./errors";
5
5
  export * from "./locale";
6
6
  export * from "./measurement_system";
7
7
  export * from "./pagination";
8
+ export * from "./price";
8
9
  export * from "./settings";
9
10
  export * from "./theme";
10
11
  export * from "./timestamp";
@@ -0,0 +1,4 @@
1
+ export interface Price {
2
+ amount: number;
3
+ currency: string;
4
+ }
@@ -1,8 +1,9 @@
1
- import { Entity } from "../core";
1
+ import { Entity, Price } from "../core";
2
2
  import { EquipmentCategory } from "./category";
3
3
 
4
4
  export interface EquipmentEntityMeta extends Entity {
5
5
  category: EquipmentCategory;
6
+ price?: Price;
6
7
  slug: string;
7
8
  }
8
9
 
@@ -1,3 +1,4 @@
1
1
  export * from "./category";
2
2
  export * from "./equipment_entity";
3
3
  export * from "./equipment";
4
+ export * from "./user_equipment";
@@ -0,0 +1,9 @@
1
+ import { Entity, Price } from "../core";
2
+ import { EquipmentCategory } from "./category";
3
+
4
+ export interface UserEquipment extends Entity {
5
+ category: EquipmentCategory;
6
+ price?: Price;
7
+ quantity?: number;
8
+ slug: string;
9
+ }
@@ -18,7 +18,7 @@ export interface Subscription extends Entity {
18
18
  tier: SubscriptionTier;
19
19
  }
20
20
 
21
- export interface Price {
21
+ export interface SubscriptionCost {
22
22
  currency: string;
23
23
  monthly: number;
24
24
  yearly: number;
@@ -0,0 +1,8 @@
1
+ export const INGREDIENT_GROUP_VALUES = [
2
+ "counter",
3
+ "freezer",
4
+ "fridge",
5
+ "pantry",
6
+ "spice",
7
+ ] as const;
8
+ export type IngredientGroup = (typeof INGREDIENT_GROUP_VALUES)[number];
@@ -1,4 +1,6 @@
1
1
  export * from "./category";
2
+ export * from "./group";
2
3
  export * from "./ingredient_entity";
3
4
  export * from "./ingredient_section";
4
5
  export * from "./ingredient";
6
+ export * from "./user_ingredient";
@@ -1,8 +1,11 @@
1
- import { Entity } from "../core";
1
+ import { Entity, Price } from "../core";
2
2
  import { IngredientCategory } from "./category";
3
+ import { IngredientGroup } from "./group";
3
4
 
4
5
  export interface IngredientEntityMeta extends Entity {
5
6
  category: IngredientCategory;
7
+ group: IngredientGroup;
8
+ price?: Price;
6
9
  slug: string;
7
10
  }
8
11
 
@@ -0,0 +1,14 @@
1
+ import { Entity, Price, Timestamp } from "../core";
2
+ import { Unit } from "../recipe";
3
+ import { IngredientCategory } from "./category";
4
+ import { IngredientGroup } from "./group";
5
+
6
+ export interface UserIngredient extends Entity {
7
+ category: IngredientCategory;
8
+ expiresAt?: Timestamp;
9
+ group: IngredientGroup;
10
+ price?: Price;
11
+ quantity?: number;
12
+ slug: string;
13
+ unit?: Unit;
14
+ }
@@ -1,4 +1,5 @@
1
1
  export const REPORT_TARGET_TYPE_VALUES = [
2
+ "extraction_attempt",
2
3
  "image",
3
4
  "profile",
4
5
  "recipe",