@pastelarai/pastelarai-shared-types 1.0.55 → 1.0.56

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.
@@ -18,6 +18,6 @@ export interface Bill {
18
18
  total_price: number;
19
19
  ingredients_list: IngredientInBill[];
20
20
  external_id?: string;
21
- _id?: string;
22
21
  photos?: string[];
22
+ _id?: string;
23
23
  }
@@ -1,6 +1,6 @@
1
1
  import { PRODUCTSALETYPE, TASKSTATUS, TASKUNIT } from "../data/types";
2
2
  import { IdNameAvatar, TaskProduct } from "./products";
3
- import { ProductInRange } from "./ranges";
3
+ import { ProductInSales } from "./ranges";
4
4
  export interface TaskProduction extends TaskProduct {
5
5
  assignees_list: IdNameAvatar[];
6
6
  urgent: boolean;
@@ -25,8 +25,8 @@ export interface TMInProduction {
25
25
  }
26
26
  export interface ProductionDay {
27
27
  date: string;
28
- tasks_list: TaskProduction[];
29
28
  team_members_list: TMInProduction[];
29
+ tasks_list: TaskProduction[];
30
30
  total_durations: {
31
31
  team: {
32
32
  assigned: number;
@@ -41,8 +41,12 @@ export interface ProductionDay {
41
41
  total: number;
42
42
  };
43
43
  }
44
+ export interface ProductInProduction extends ProductInSales {
45
+ model_id?: string;
46
+ model_quantity?: number;
47
+ }
44
48
  export interface ContentDayProd {
45
- products_list: ProductInRange[];
49
+ products_list: ProductInProduction[];
46
50
  }
47
51
  export interface ProductionWeek {
48
52
  start_date: string;
@@ -50,7 +54,7 @@ export interface ProductionWeek {
50
54
  model_name: string;
51
55
  source: string;
52
56
  content_per_day: ContentDayProd[];
53
- products_list: ProductInRange[];
57
+ products_list: ProductInProduction[];
54
58
  deck_tasks_list: TaskProduction[];
55
59
  production_per_day: ProductionDay[];
56
60
  _id?: string;
@@ -1,4 +1,4 @@
1
- import { CONTENTTYPE, TASKACTIONTYPE } from "src/data/types";
1
+ import { CONTENTTYPE, TASKACTIONTYPE, UNIT } from "src/data/types";
2
2
  import { IdName } from "./bill";
3
3
  import { Avatar, ProductInRange } from "./ranges";
4
4
  export interface Format {
@@ -19,6 +19,7 @@ export interface CompositionBase {
19
19
  units_per_batch?: number;
20
20
  stock?: number;
21
21
  content_list?: ProductContent[];
22
+ tasks_list: TaskProduct[];
22
23
  costs?: Costs;
23
24
  selected?: boolean;
24
25
  }
@@ -27,13 +28,13 @@ export type Composition = CompositionBase & {
27
28
  [key in PricingType]?: Pricing;
28
29
  };
29
30
  export interface ProductContent {
30
- _id: string;
31
+ _id?: string;
31
32
  name: string;
32
33
  weight?: number;
33
34
  quantity?: number;
34
35
  cost: number;
35
36
  type: CONTENTTYPE;
36
- unit: string;
37
+ unit: UNIT;
37
38
  }
38
39
  export interface Costs {
39
40
  content: number;
@@ -50,7 +51,6 @@ export interface Pricing {
50
51
  size_pack?: number;
51
52
  }
52
53
  export interface Product {
53
- _id?: string;
54
54
  name: string;
55
55
  category: "CP01" | "CP02" | "CP03" | "CP04" | "CP05" | "CP06" | "CP07" | "CP08" | "CP09" | null;
56
56
  holidays: string;
@@ -62,7 +62,7 @@ export interface Product {
62
62
  description: string;
63
63
  base_format: string;
64
64
  composition: Composition[];
65
- tasks_list: TaskProduct[];
65
+ _id?: string;
66
66
  using?: {
67
67
  ranges_list: IdNameAvatar[];
68
68
  };
@@ -4,23 +4,15 @@ export interface Avatar {
4
4
  color: string;
5
5
  initials: string;
6
6
  }
7
- export interface ProductInRange {
8
- _id: string;
7
+ export interface Range {
9
8
  name: string;
10
- format_id: string;
11
- nb_pers: number;
12
- sale_type: PRODUCTSALETYPE;
13
- nb_portions?: number;
14
- size_pack?: number;
15
- quantity?: number;
16
- margin?: number;
17
- }
18
- export interface ProductInSales extends ProductInRange {
19
- quantity_sold?: number;
20
- quantity_for_resale?: number;
21
- quantity_discarded?: number;
22
- ranges_list?: RangeInSalesDay[];
23
- custom?: boolean;
9
+ avatar: Avatar;
10
+ start_date: string;
11
+ end_date?: string;
12
+ description: string;
13
+ content_per_day: DayContent[];
14
+ total: TotalContent;
15
+ _id?: string;
24
16
  }
25
17
  export interface DayContent {
26
18
  products_list: ProductInRange[];
@@ -32,26 +24,29 @@ export interface TotalContent {
32
24
  week_quantity: number;
33
25
  week_margin: number;
34
26
  }
35
- export interface Range {
36
- _id?: string;
27
+ export interface ProductInRange {
28
+ _id: string;
37
29
  name: string;
38
- start_date: string;
39
- end_date?: string;
40
- avatar: Avatar;
41
- description: string;
42
- content_per_day: DayContent[];
43
- total: TotalContent;
30
+ format_id: string;
31
+ nb_pers: number;
32
+ sale_type: PRODUCTSALETYPE;
33
+ nb_portions?: number;
34
+ size_pack?: number;
35
+ quantity?: number;
36
+ margin?: number;
44
37
  }
45
- export interface RangeInSalesDay {
46
- range: IdNameAvatar;
47
- margin: number;
48
- quantity: number;
38
+ export interface SalesPlanMonth {
39
+ start_date: string;
40
+ month_margin: number;
41
+ month_quantity: number;
42
+ sales_per_day: SimplifiedSalesPlanDay[];
49
43
  }
50
- export interface SalesPlanDay {
44
+ export interface SimplifiedSalesPlanDay {
51
45
  date: string;
52
46
  day_margin: number;
53
47
  day_quantity: number;
54
- products_list: ProductInSales[];
48
+ ranges_list: IdNameAvatar[];
49
+ customers_list: Customer[];
55
50
  }
56
51
  export interface SalesPlanWeek {
57
52
  start_date: string;
@@ -59,16 +54,30 @@ export interface SalesPlanWeek {
59
54
  week_quantity: number;
60
55
  sales_per_day: SalesPlanDay[];
61
56
  ranges_list: IdNameAvatar[];
57
+ customers_list: Customer[];
62
58
  }
63
- export interface SimplifiedSalesPlanDay {
59
+ export interface SalesPlanDay {
64
60
  date: string;
65
61
  day_margin: number;
66
62
  day_quantity: number;
67
- ranges_list: IdNameAvatar[];
63
+ products_list: ProductInSales[];
68
64
  }
69
- export interface SalesPlanMonth {
70
- start_date: string;
71
- month_margin: number;
72
- month_quantity: number;
73
- sales_per_day: SimplifiedSalesPlanDay[];
65
+ export interface ProductInSales extends ProductInRange {
66
+ quantity_sold?: number;
67
+ quantity_for_resale?: number;
68
+ quantity_discarded?: number;
69
+ sources_list?: ProductSource[];
70
+ custom?: boolean;
71
+ }
72
+ export interface ProductSource {
73
+ range?: IdNameAvatar;
74
+ customer?: Customer;
75
+ margin: number;
76
+ quantity: number;
77
+ }
78
+ export interface Customer {
79
+ name: string;
80
+ phone?: string;
81
+ email?: string;
82
+ description?: string;
74
83
  }
@@ -1,7 +1,7 @@
1
1
  import { CONTENTTYPE, UNIT, STORAGEUNIT } from "../data/types";
2
2
  import { IdName } from "./bill";
3
3
  export interface RecipeContent {
4
- _id: string;
4
+ _id?: string;
5
5
  name: string;
6
6
  weight: number;
7
7
  cost: number;
@@ -16,6 +16,14 @@ export interface TeamMember {
16
16
  late_list?: OvertimeOrLate[];
17
17
  absences_list?: Absence[];
18
18
  }
19
+ export interface ShiftList {
20
+ time_in: string | null;
21
+ time_out: string | null;
22
+ }
23
+ export interface Additional {
24
+ key: string | null;
25
+ value: string | null;
26
+ }
19
27
  export interface DayOff {
20
28
  start_date: string;
21
29
  end_date: string;
@@ -38,20 +46,11 @@ export interface TeamExceptions {
38
46
  description?: string;
39
47
  _id?: string;
40
48
  }
41
- export interface Additional {
42
- key: string | null;
43
- value: string | null;
44
- }
45
- export interface ShiftList {
46
- time_in: string | null;
47
- time_out: string | null;
48
- }
49
- export interface EmployeesShift {
50
- team_member: IdNameAvatar;
51
- scheduled_off: boolean;
52
- shifts_list: ShiftList[];
53
- duration: number;
54
- labor_cost: number;
49
+ export interface TeamSchedule {
50
+ schedule_per_day: TeamScheduleDay[];
51
+ start_date: string;
52
+ total_duration: number;
53
+ total_labor_cost: number;
55
54
  }
56
55
  export interface TeamScheduleDay {
57
56
  date: string;
@@ -60,9 +59,10 @@ export interface TeamScheduleDay {
60
59
  total_duration: number;
61
60
  total_labor_cost: number;
62
61
  }
63
- export interface TeamSchedule {
64
- schedule_per_day: TeamScheduleDay[];
65
- start_date: string;
66
- total_duration: number;
67
- total_labor_cost: number;
62
+ export interface EmployeesShift {
63
+ team_member: IdNameAvatar;
64
+ scheduled_off: boolean;
65
+ shifts_list: ShiftList[];
66
+ duration: number;
67
+ labor_cost: number;
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pastelarai/pastelarai-shared-types",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Shared types for PastelarAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",