@pastelarai/pastelarai-shared-types 1.0.150 → 1.0.152

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.
@@ -3,7 +3,7 @@ export interface IdName {
3
3
  _id: string;
4
4
  name: string;
5
5
  }
6
- export interface IngredientInBill {
6
+ export interface IngredientInPurchase {
7
7
  _id?: string;
8
8
  name: string;
9
9
  description?: string;
@@ -18,16 +18,16 @@ export interface IngredientInBill {
18
18
  cost_per_kg: number;
19
19
  weight: number;
20
20
  }
21
- export interface Bill {
22
- supplier: IdName;
21
+ export interface Purchase {
22
+ vendor: IdName;
23
23
  date: string;
24
24
  total_price: number;
25
- ingredients_list: IngredientInBill[];
25
+ ingredients_list: IngredientInPurchase[];
26
26
  external_id?: string;
27
27
  photos?: string[];
28
28
  _id?: string;
29
29
  }
30
- export interface WorkingIngredientInBill {
30
+ export interface WorkingIngredientInPurchase {
31
31
  ingredientsOptions?: IdName[];
32
32
  _id?: string;
33
33
  name?: string;
@@ -46,11 +46,11 @@ export interface WorkingIngredientInBill {
46
46
  quantity: number;
47
47
  isWt?: boolean;
48
48
  }
49
- export interface WorkingBill {
50
- supplier?: IdName;
49
+ export interface WorkingPurchase {
50
+ vendor?: IdName;
51
51
  date: string;
52
52
  total_price: number;
53
- ingredients_list: WorkingIngredientInBill[];
53
+ ingredients_list: WorkingIngredientInPurchase[];
54
54
  external_id?: string;
55
55
  _id?: string;
56
56
  photos?: string[];
@@ -8,16 +8,16 @@ export interface IngredientDB {
8
8
  category: INGREDIENTCATEGORY;
9
9
  name: string;
10
10
  favorite_vendor?: IdName | null;
11
- user_weight: {
11
+ user_weight?: {
12
12
  weight: number;
13
13
  unit: USER_UNIT;
14
14
  cost_per_unit: number;
15
15
  };
16
- conversion_to_grams: number;
16
+ conversion_to_grams?: number;
17
17
  unit?: UNIT;
18
- cost_per_kg: number;
19
- weight: number;
20
- value: number;
18
+ cost_per_kg?: number;
19
+ weight?: number;
20
+ value?: number;
21
21
  risk?: RISK;
22
22
  forecast?: {
23
23
  duration: string;
@@ -11,9 +11,6 @@ export interface Format {
11
11
  diameter?: number;
12
12
  rect_width?: number;
13
13
  rect_length?: number;
14
- isSoldWhole: boolean;
15
- isSoldByPortion: boolean;
16
- isSoldByPack: boolean;
17
14
  }
18
15
  export interface FormatDB extends Omit<Format, 'selected'> {
19
16
  category?: PRODUCTCATEGORY;
@@ -108,7 +105,6 @@ export interface WorkingFormat extends Format {
108
105
  type: boolean;
109
106
  nb_pers: boolean;
110
107
  size: boolean;
111
- type_sale: boolean;
112
108
  duplicate: boolean;
113
109
  };
114
110
  }
@@ -1,5 +1,5 @@
1
- import { BillWithoutIngredientsList } from "./ingredients";
2
- export interface Supplier {
1
+ import { PurchaseWithoutIngredientsList } from "./ingredients";
2
+ export interface Vendor {
3
3
  name: string;
4
4
  account?: {
5
5
  user?: string;
@@ -13,6 +13,6 @@ export interface Supplier {
13
13
  };
14
14
  _id?: string;
15
15
  using?: {
16
- bills_list: BillWithoutIngredientsList[];
16
+ purchases_list: PurchaseWithoutIngredientsList[];
17
17
  };
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pastelarai/pastelarai-shared-types",
3
- "version": "1.0.150",
3
+ "version": "1.0.152",
4
4
  "description": "Shared types for PastelarAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",