@pastelarai/pastelarai-shared-types 1.0.6 → 1.0.8

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.
@@ -12,17 +12,18 @@ export interface Format {
12
12
  isSoldByPack: boolean;
13
13
  selected?: boolean;
14
14
  }
15
- export interface Composition {
15
+ export interface CompositionBase {
16
16
  format: Format;
17
17
  units_per_batch?: number;
18
18
  stock?: number;
19
19
  content_list?: ProductContent[];
20
20
  costs?: Costs;
21
- whole_pricing?: Pricing;
22
- portion_pricing?: Pricing;
23
- pack_pricing?: Pricing;
24
21
  selected?: boolean;
25
22
  }
23
+ export type PricingType = "whole_pricing" | "portion_pricing" | "pack_pricing";
24
+ export type Composition = CompositionBase & {
25
+ [key in PricingType]?: Pricing;
26
+ };
26
27
  export interface ProductContent {
27
28
  _id: string;
28
29
  name: string;
@@ -9,8 +9,9 @@ export interface RecipeContent {
9
9
  }
10
10
  export interface LaminatedDough {
11
11
  weight_unit_dough: number;
12
+ weight_fat: number;
12
13
  ingredient_id: string;
13
- weight: number;
14
+ ingredient_name: string;
14
15
  }
15
16
  export interface RecipeCost {
16
17
  ingredients: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pastelarai/pastelarai-shared-types",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Shared types for PastelarAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",