@pastelarai/pastelarai-shared-types 1.0.8 → 1.0.10

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.
@@ -32,3 +32,12 @@ export declare enum TMSTATUS {
32
32
  AVAILABLE = "available",
33
33
  UNAVAILABLE = "unavailable"
34
34
  }
35
+ export declare enum UNIT {
36
+ GRAM = "g",
37
+ PIECE = "piece"
38
+ }
39
+ export declare enum CONTENTTYPE {
40
+ REC = "REC",
41
+ ING = "ING",
42
+ LAM = "LAM"
43
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TMSTATUS = exports.TASKACTIONTYPE = exports.CURRENCYDISPLAYTYPE = exports.VALUETYPE = exports.STATUS = exports.FORECASTVIEWTYPE = exports.VIEWTYPE = void 0;
3
+ exports.CONTENTTYPE = exports.UNIT = exports.TMSTATUS = exports.TASKACTIONTYPE = exports.CURRENCYDISPLAYTYPE = exports.VALUETYPE = exports.STATUS = exports.FORECASTVIEWTYPE = exports.VIEWTYPE = void 0;
4
4
  var VIEWTYPE;
5
5
  (function (VIEWTYPE) {
6
6
  VIEWTYPE["VIEW"] = "viewMode";
@@ -42,3 +42,14 @@ var TMSTATUS;
42
42
  TMSTATUS["AVAILABLE"] = "available";
43
43
  TMSTATUS["UNAVAILABLE"] = "unavailable";
44
44
  })(TMSTATUS || (exports.TMSTATUS = TMSTATUS = {}));
45
+ var UNIT;
46
+ (function (UNIT) {
47
+ UNIT["GRAM"] = "g";
48
+ UNIT["PIECE"] = "piece";
49
+ })(UNIT || (exports.UNIT = UNIT = {}));
50
+ var CONTENTTYPE;
51
+ (function (CONTENTTYPE) {
52
+ CONTENTTYPE["REC"] = "REC";
53
+ CONTENTTYPE["ING"] = "ING";
54
+ CONTENTTYPE["LAM"] = "LAM";
55
+ })(CONTENTTYPE || (exports.CONTENTTYPE = CONTENTTYPE = {}));
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./interfaces/bill";
1
2
  export * from "./interfaces/ingredients";
2
3
  export * from "./interfaces/productions";
3
4
  export * from "./interfaces/products";
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./interfaces/bill"), exports);
17
18
  __exportStar(require("./interfaces/ingredients"), exports);
18
19
  __exportStar(require("./interfaces/productions"), exports);
19
20
  __exportStar(require("./interfaces/products"), exports);
@@ -0,0 +1,20 @@
1
+ export interface SupplierInBill {
2
+ _id: string;
3
+ name: string;
4
+ }
5
+ export interface IngredientInBill {
6
+ _id: string;
7
+ name: string;
8
+ description?: string;
9
+ weight: number;
10
+ unit: string;
11
+ price: number;
12
+ unit_price: number;
13
+ }
14
+ export interface Bill {
15
+ supplier: SupplierInBill;
16
+ date: string;
17
+ total_price: number;
18
+ ingredients_list: IngredientInBill[];
19
+ _id?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,16 +10,17 @@ export interface TaskProduction extends TaskProduct {
10
10
  };
11
11
  current_quantity?: number;
12
12
  }
13
+ export interface TMInProduction {
14
+ _id: string;
15
+ minutes_assigned: number;
16
+ minutes_unassigned: number;
17
+ conflict: boolean;
18
+ }
13
19
  export interface ProductionDay {
14
20
  date: string;
15
21
  model: boolean;
16
22
  tasks_list: TaskProduction[];
17
- team_members_list: {
18
- _id: string;
19
- minutes_assigned: number;
20
- minutes_unassigned: number;
21
- conflict: boolean;
22
- }[];
23
+ team_members_list: TMInProduction[];
23
24
  total_durations: {
24
25
  team: {
25
26
  assigned: number;
@@ -50,7 +50,7 @@ export interface Pricing {
50
50
  export interface Product {
51
51
  _id?: string;
52
52
  name: string;
53
- category: "CP01" | "CP02" | "CP03" | "CP04" | "CP05" | "CP06" | "CP07" | "CP08" | "CP09";
53
+ category: "CP01" | "CP02" | "CP03" | "CP04" | "CP05" | "CP06" | "CP07" | "CP08" | "CP09" | null;
54
54
  holidays: string;
55
55
  storage: {
56
56
  unit: "days" | "weeks" | "months";
@@ -84,4 +84,5 @@ export interface TaskProduct {
84
84
  action_type: "REC" | "ACT";
85
85
  duration: number;
86
86
  cost: number;
87
+ recipe_id?: string;
87
88
  }
@@ -1,11 +1,12 @@
1
+ import { CONTENTTYPE, UNIT } from "src/data/types";
1
2
  export interface RecipeContent {
2
3
  _id: string;
3
4
  name: string;
4
5
  weight: number;
5
6
  cost: number;
6
7
  quantity?: number;
7
- unit: 'g' | 'piece';
8
- type: 'ING' | 'REC' | 'LAM';
8
+ unit: UNIT;
9
+ type: CONTENTTYPE;
9
10
  }
10
11
  export interface LaminatedDough {
11
12
  weight_unit_dough: number;
@@ -19,7 +20,7 @@ export interface RecipeCost {
19
20
  per_kg: number;
20
21
  }
21
22
  export interface Storage {
22
- unit: string;
23
+ unit: UNIT;
23
24
  value: number;
24
25
  }
25
26
  export interface Recipe {
@@ -28,11 +29,11 @@ export interface Recipe {
28
29
  storage: Storage;
29
30
  category: 'CR01' | 'CR02' | 'CR03' | 'CR04' | 'CR05' | 'CR06' | null;
30
31
  description: string;
31
- prep_time: number;
32
+ prep_time?: number;
32
33
  stock: number;
33
34
  ingredients_list: RecipeContent[];
34
35
  steps_list: string[];
35
- laminated_dough: LaminatedDough;
36
+ laminated_dough?: LaminatedDough;
36
37
  costs: RecipeCost;
37
38
  _id?: string;
38
39
  using?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pastelarai/pastelarai-shared-types",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Shared types for PastelarAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",