@cravery/core 0.0.52 → 0.0.53

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 (50) 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/index.d.ts +1 -0
  6. package/dist/types/core/index.d.ts.map +1 -1
  7. package/dist/types/core/index.js +1 -0
  8. package/dist/types/core/index.js.map +1 -1
  9. package/dist/types/core/price.d.ts +5 -0
  10. package/dist/types/core/price.d.ts.map +1 -0
  11. package/dist/types/core/price.js +3 -0
  12. package/dist/types/core/price.js.map +1 -0
  13. package/dist/types/equipment/equipment_entity.d.ts +2 -1
  14. package/dist/types/equipment/equipment_entity.d.ts.map +1 -1
  15. package/dist/types/equipment/index.d.ts +1 -0
  16. package/dist/types/equipment/index.d.ts.map +1 -1
  17. package/dist/types/equipment/index.js +1 -0
  18. package/dist/types/equipment/index.js.map +1 -1
  19. package/dist/types/equipment/user_equipment.d.ts +9 -0
  20. package/dist/types/equipment/user_equipment.d.ts.map +1 -0
  21. package/dist/types/equipment/user_equipment.js +3 -0
  22. package/dist/types/equipment/user_equipment.js.map +1 -0
  23. package/dist/types/iam/subscription.d.ts +1 -1
  24. package/dist/types/iam/subscription.d.ts.map +1 -1
  25. package/dist/types/ingredient/group.d.ts +3 -0
  26. package/dist/types/ingredient/group.d.ts.map +1 -0
  27. package/dist/types/ingredient/group.js +11 -0
  28. package/dist/types/ingredient/group.js.map +1 -0
  29. package/dist/types/ingredient/index.d.ts +2 -0
  30. package/dist/types/ingredient/index.d.ts.map +1 -1
  31. package/dist/types/ingredient/index.js +2 -0
  32. package/dist/types/ingredient/index.js.map +1 -1
  33. package/dist/types/ingredient/ingredient_entity.d.ts +4 -1
  34. package/dist/types/ingredient/ingredient_entity.d.ts.map +1 -1
  35. package/dist/types/ingredient/user_ingredient.d.ts +14 -0
  36. package/dist/types/ingredient/user_ingredient.d.ts.map +1 -0
  37. package/dist/types/ingredient/user_ingredient.js +3 -0
  38. package/dist/types/ingredient/user_ingredient.js.map +1 -0
  39. package/package.json +1 -1
  40. package/src/config/subscription.ts +5 -2
  41. package/src/types/core/index.ts +1 -0
  42. package/src/types/core/price.ts +4 -0
  43. package/src/types/equipment/equipment_entity.ts +2 -1
  44. package/src/types/equipment/index.ts +1 -0
  45. package/src/types/equipment/user_equipment.ts +9 -0
  46. package/src/types/iam/subscription.ts +1 -1
  47. package/src/types/ingredient/group.ts +8 -0
  48. package/src/types/ingredient/index.ts +2 -0
  49. package/src/types/ingredient/ingredient_entity.ts +4 -1
  50. package/src/types/ingredient/user_ingredient.ts +14 -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"}
@@ -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":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cravery/core",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
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,
@@ -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
+ }