@pastelarai/pastelarai-shared-types 1.0.148 → 1.0.150
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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/interfaces/home.d.ts +1 -1
- package/dist/interfaces/ingredients.d.ts +8 -5
- package/dist/interfaces/openai.d.ts +1 -1
- package/dist/interfaces/products.d.ts +1 -1
- package/dist/interfaces/purchase.d.ts +57 -0
- package/dist/interfaces/purchase.js +2 -0
- package/dist/interfaces/ranges.d.ts +1 -1
- package/dist/interfaces/recipes.d.ts +1 -1
- package/dist/interfaces/search.d.ts +8 -8
- package/dist/interfaces/user.d.ts +1 -0
- package/dist/interfaces/vendors.d.ts +18 -0
- package/dist/interfaces/vendors.js +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./interfaces/analytics";
|
|
2
|
-
export * from "./interfaces/
|
|
2
|
+
export * from "./interfaces/purchase";
|
|
3
3
|
export * from "./interfaces/home";
|
|
4
4
|
export * from "./interfaces/ingredients";
|
|
5
5
|
export * from "./interfaces/openai";
|
|
@@ -9,7 +9,7 @@ export * from "./interfaces/ranges";
|
|
|
9
9
|
export * from "./interfaces/recipes";
|
|
10
10
|
export * from "./interfaces/search";
|
|
11
11
|
export * from "./interfaces/stripe";
|
|
12
|
-
export * from "./interfaces/
|
|
12
|
+
export * from "./interfaces/vendors";
|
|
13
13
|
export * from "./interfaces/team";
|
|
14
14
|
export * from "./interfaces/user";
|
|
15
15
|
export * from "./data/types";
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./interfaces/analytics"), exports);
|
|
18
|
-
__exportStar(require("./interfaces/
|
|
18
|
+
__exportStar(require("./interfaces/purchase"), exports);
|
|
19
19
|
__exportStar(require("./interfaces/home"), exports);
|
|
20
20
|
__exportStar(require("./interfaces/ingredients"), exports);
|
|
21
21
|
__exportStar(require("./interfaces/openai"), exports);
|
|
@@ -25,7 +25,7 @@ __exportStar(require("./interfaces/ranges"), exports);
|
|
|
25
25
|
__exportStar(require("./interfaces/recipes"), exports);
|
|
26
26
|
__exportStar(require("./interfaces/search"), exports);
|
|
27
27
|
__exportStar(require("./interfaces/stripe"), exports);
|
|
28
|
-
__exportStar(require("./interfaces/
|
|
28
|
+
__exportStar(require("./interfaces/vendors"), exports);
|
|
29
29
|
__exportStar(require("./interfaces/team"), exports);
|
|
30
30
|
__exportStar(require("./interfaces/user"), exports);
|
|
31
31
|
__exportStar(require("./data/types"), exports);
|
|
@@ -3,7 +3,7 @@ import { ContentDayProd, TaskProduction } from "./productions";
|
|
|
3
3
|
import { IdNameAvatar } from "./products";
|
|
4
4
|
import { ProductInRange, SalesPlanDay } from "./ranges";
|
|
5
5
|
import { ShiftList, TeamScheduleDay } from "./team";
|
|
6
|
-
import { IdName } from "./
|
|
6
|
+
import { IdName } from "./purchase";
|
|
7
7
|
export interface ProductionDayByTM {
|
|
8
8
|
team_member: IdNameAvatar;
|
|
9
9
|
scheduled_off: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { INGREDIENTCATEGORY, PRODUCTCATEGORY, RECIPECATEGORY } from "../data/categories";
|
|
2
2
|
import { RISK, UNIT, USER_UNIT } from "../data/types";
|
|
3
|
-
import {
|
|
3
|
+
import { Purchase, IdName } from "./purchase";
|
|
4
4
|
export interface Category {
|
|
5
5
|
key: string;
|
|
6
6
|
}
|
|
7
7
|
export interface IngredientDB {
|
|
8
8
|
category: INGREDIENTCATEGORY;
|
|
9
9
|
name: string;
|
|
10
|
-
|
|
10
|
+
favorite_vendor?: IdName | null;
|
|
11
11
|
user_weight: {
|
|
12
12
|
weight: number;
|
|
13
13
|
unit: USER_UNIT;
|
|
@@ -19,13 +19,16 @@ export interface IngredientDB {
|
|
|
19
19
|
weight: number;
|
|
20
20
|
value: number;
|
|
21
21
|
risk?: RISK;
|
|
22
|
-
forecast?:
|
|
22
|
+
forecast?: {
|
|
23
|
+
duration: string;
|
|
24
|
+
date: string;
|
|
25
|
+
};
|
|
23
26
|
}
|
|
24
27
|
export interface Ingredient extends Omit<IngredientDB, 'category'> {
|
|
25
28
|
category?: INGREDIENTCATEGORY | null;
|
|
26
29
|
_id?: string;
|
|
27
30
|
using?: {
|
|
28
|
-
|
|
31
|
+
purchases_list: PurchaseWithoutIngredientsList[];
|
|
29
32
|
recipes_list: (IdName & {
|
|
30
33
|
category: RECIPECATEGORY;
|
|
31
34
|
})[];
|
|
@@ -36,7 +39,7 @@ export interface Ingredient extends Omit<IngredientDB, 'category'> {
|
|
|
36
39
|
rate_products: number;
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
|
-
export type
|
|
42
|
+
export type PurchaseWithoutIngredientsList = Omit<Purchase, 'ingredients_list'>;
|
|
40
43
|
export interface AdminIngredient {
|
|
41
44
|
ingredient_id: string;
|
|
42
45
|
category: INGREDIENTCATEGORY;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONTENTTYPE, STATUS, STORAGEUNIT, TASKACTIONTYPE, TASKUNIT, UNIT } from "../data/types";
|
|
2
2
|
import { PRODUCTCATEGORY } from "../data/categories";
|
|
3
|
-
import { IdName } from "./
|
|
3
|
+
import { IdName } from "./purchase";
|
|
4
4
|
import { Avatar, Customer, ProductInRange } from "./ranges";
|
|
5
5
|
import { WorkingRecipe, Content, WorkingContent, SharableContent } from "./recipes";
|
|
6
6
|
export interface Format {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UNIT, USER_UNIT } from "../data/types";
|
|
2
|
+
export interface IdName {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IngredientInPurchase {
|
|
7
|
+
_id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
price: number;
|
|
11
|
+
user_weight: {
|
|
12
|
+
weight: number;
|
|
13
|
+
unit: USER_UNIT;
|
|
14
|
+
cost_per_unit: number;
|
|
15
|
+
};
|
|
16
|
+
conversion_to_grams: number;
|
|
17
|
+
unit?: UNIT;
|
|
18
|
+
cost_per_kg: number;
|
|
19
|
+
weight: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Purchase {
|
|
22
|
+
vendor: IdName;
|
|
23
|
+
date: string;
|
|
24
|
+
total_price: number;
|
|
25
|
+
ingredients_list: IngredientInPurchase[];
|
|
26
|
+
external_id?: string;
|
|
27
|
+
photos?: string[];
|
|
28
|
+
_id?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface WorkingIngredientInPurchase {
|
|
31
|
+
ingredientsOptions?: IdName[];
|
|
32
|
+
_id?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
user_weight: {
|
|
36
|
+
weight: number;
|
|
37
|
+
unit?: USER_UNIT;
|
|
38
|
+
cost_per_unit: number;
|
|
39
|
+
};
|
|
40
|
+
conversion_to_grams: number;
|
|
41
|
+
unit?: UNIT;
|
|
42
|
+
cost_per_kg: number;
|
|
43
|
+
weight: number;
|
|
44
|
+
price: number;
|
|
45
|
+
isDozen?: boolean;
|
|
46
|
+
quantity: number;
|
|
47
|
+
isWt?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface WorkingPurchase {
|
|
50
|
+
vendor?: IdName;
|
|
51
|
+
date: string;
|
|
52
|
+
total_price: number;
|
|
53
|
+
ingredients_list: WorkingIngredientInPurchase[];
|
|
54
|
+
external_id?: string;
|
|
55
|
+
_id?: string;
|
|
56
|
+
photos?: string[];
|
|
57
|
+
}
|
|
@@ -2,7 +2,7 @@ import { PRODUCTCATEGORY } from "../data/categories";
|
|
|
2
2
|
import { PRODUCTSALETYPE } from "../data/types";
|
|
3
3
|
import { IdNameAvatar } from "./products";
|
|
4
4
|
export interface Avatar {
|
|
5
|
-
|
|
5
|
+
color_avatar_1: string;
|
|
6
6
|
initials: string;
|
|
7
7
|
}
|
|
8
8
|
export interface Range {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IdName,
|
|
1
|
+
import { IdName, IngredientInPurchase } from "./purchase";
|
|
2
2
|
import { Ingredient } from "./ingredients";
|
|
3
3
|
import { Format, TaskProduct } from "./products";
|
|
4
4
|
import { LaminatedDough, Content } from "./recipes";
|
|
5
|
-
import {
|
|
5
|
+
import { Vendor } from "./vendors";
|
|
6
6
|
import { Additional } from "./team";
|
|
7
7
|
import { Avatar, ProductInRange } from "./ranges";
|
|
8
8
|
import { PRODUCTCATEGORY, RECIPECATEGORY } from "../data/categories";
|
|
@@ -11,7 +11,7 @@ export interface SuggestionsResults {
|
|
|
11
11
|
products?: IdName[];
|
|
12
12
|
recipes?: IdName[];
|
|
13
13
|
ranges?: IdName[];
|
|
14
|
-
|
|
14
|
+
vendors?: IdName[];
|
|
15
15
|
team_members?: IdName[];
|
|
16
16
|
}
|
|
17
17
|
export interface CompositionProductSearchResult {
|
|
@@ -55,12 +55,12 @@ export interface TeamMemberSearchResults {
|
|
|
55
55
|
position: string;
|
|
56
56
|
additionals?: Additional[];
|
|
57
57
|
}
|
|
58
|
-
export interface
|
|
58
|
+
export interface PurchaseSearchResults {
|
|
59
59
|
_id: string;
|
|
60
|
-
|
|
60
|
+
vendor: IdName;
|
|
61
61
|
date: string;
|
|
62
62
|
total_price: number;
|
|
63
|
-
ingredients_list?:
|
|
63
|
+
ingredients_list?: IngredientInPurchase[];
|
|
64
64
|
external_id?: string;
|
|
65
65
|
}
|
|
66
66
|
export interface DeepSearchResults {
|
|
@@ -68,7 +68,7 @@ export interface DeepSearchResults {
|
|
|
68
68
|
products?: ProductSearchResult[];
|
|
69
69
|
recipes?: RecipeSearchResult[];
|
|
70
70
|
ranges?: RangeSearchResult[];
|
|
71
|
-
|
|
71
|
+
vendors?: Vendor[];
|
|
72
72
|
team_members?: TeamMemberSearchResults[];
|
|
73
|
-
|
|
73
|
+
purchases?: PurchaseSearchResults[];
|
|
74
74
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PurchaseWithoutIngredientsList } from "./ingredients";
|
|
2
|
+
export interface Vendor {
|
|
3
|
+
name: string;
|
|
4
|
+
account?: {
|
|
5
|
+
user?: string;
|
|
6
|
+
pwd?: string;
|
|
7
|
+
};
|
|
8
|
+
website?: string;
|
|
9
|
+
contact?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
number?: string;
|
|
13
|
+
};
|
|
14
|
+
_id?: string;
|
|
15
|
+
using?: {
|
|
16
|
+
purchases_list: PurchaseWithoutIngredientsList[];
|
|
17
|
+
};
|
|
18
|
+
}
|