@pastelarai/pastelarai-shared-types 1.0.16 → 1.0.17
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface IdName {
|
|
2
2
|
_id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
@@ -12,9 +12,10 @@ export interface IngredientInBill {
|
|
|
12
12
|
unit_price: number;
|
|
13
13
|
}
|
|
14
14
|
export interface Bill {
|
|
15
|
-
supplier:
|
|
15
|
+
supplier: IdName;
|
|
16
16
|
date: string;
|
|
17
17
|
total_price: number;
|
|
18
18
|
ingredients_list: IngredientInBill[];
|
|
19
|
+
external_id: string;
|
|
19
20
|
_id?: string;
|
|
20
21
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Bill, IdName } from "./bill";
|
|
1
2
|
export interface Category {
|
|
2
3
|
key: string;
|
|
3
4
|
}
|
|
@@ -17,4 +18,10 @@ export interface Ingredient {
|
|
|
17
18
|
forecast?: string;
|
|
18
19
|
[key: string]: string | number | boolean | any;
|
|
19
20
|
_id?: string;
|
|
21
|
+
using?: {
|
|
22
|
+
bills_list: BillWithoutIngredientsList[];
|
|
23
|
+
recipes_list: IdName[];
|
|
24
|
+
products_list: IdName[];
|
|
25
|
+
};
|
|
20
26
|
}
|
|
27
|
+
export type BillWithoutIngredientsList = Omit<Bill, 'ingredients_list'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IdName } from "./bill";
|
|
1
2
|
import { ProductInRange, RangeAvatar } from "./ranges";
|
|
2
3
|
export interface Format {
|
|
3
4
|
_id: string;
|
|
@@ -62,11 +63,10 @@ export interface Product {
|
|
|
62
63
|
composition: Composition[];
|
|
63
64
|
tasks_list: TaskProduct[];
|
|
64
65
|
using?: {
|
|
65
|
-
ranges_list:
|
|
66
|
+
ranges_list: IdNameAvatar[];
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
|
-
export interface
|
|
69
|
-
_id: string;
|
|
69
|
+
export interface IdNameAvatar extends IdName {
|
|
70
70
|
avatar: RangeAvatar;
|
|
71
71
|
}
|
|
72
72
|
export interface DestructuredProduct extends Omit<Product, "composition" | "_id">, ProductInRange {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CONTENTTYPE, UNIT } from "src/data/types";
|
|
2
|
+
import { IdName } from "./bill";
|
|
2
3
|
export interface RecipeContent {
|
|
3
4
|
_id: string;
|
|
4
5
|
name: string;
|
|
@@ -37,7 +38,7 @@ export interface Recipe {
|
|
|
37
38
|
costs: RecipeCost;
|
|
38
39
|
_id?: string;
|
|
39
40
|
using?: {
|
|
40
|
-
products_list:
|
|
41
|
-
recipes_list:
|
|
41
|
+
products_list: IdName[];
|
|
42
|
+
recipes_list: IdName[];
|
|
42
43
|
};
|
|
43
44
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BillWithoutIngredientsList } from "./ingredients";
|
|
1
2
|
export interface Supplier {
|
|
2
3
|
name: string;
|
|
3
4
|
account?: {
|
|
@@ -11,4 +12,7 @@ export interface Supplier {
|
|
|
11
12
|
number?: string;
|
|
12
13
|
};
|
|
13
14
|
_id?: string;
|
|
15
|
+
using?: {
|
|
16
|
+
bills_list: BillWithoutIngredientsList[];
|
|
17
|
+
};
|
|
14
18
|
}
|