@pastelarai/pastelarai-shared-types 1.0.59 → 1.0.61

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.
@@ -0,0 +1,3 @@
1
+ export type INGREDIENTCATEGORY = "CI01" | "CI02" | "CI03" | "CI04" | "CI05" | "CI06" | "CI07" | "CI08" | "CI09" | "CI10" | "CI11" | null;
2
+ export type RECIPECATEGORY = "CR01" | "CR02" | "CR03" | "CR04" | "CR05" | "CR06" | null;
3
+ export type PRODUCTCATEGORY = "CP01" | "CP02" | "CP03" | "CP04" | "CP05" | "CP06" | "CP07" | "CP08" | "CP09" | null;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from "./interfaces/suppliers";
8
8
  export * from "./interfaces/team";
9
9
  export * from "./interfaces/user";
10
10
  export * from "./data/types";
11
+ export * from "./data/categories";
11
12
  export * from "./interfaces/openai";
12
13
  export * from "./interfaces/home";
13
14
  export * from "./utils/utils";
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __exportStar(require("./interfaces/suppliers"), exports);
24
24
  __exportStar(require("./interfaces/team"), exports);
25
25
  __exportStar(require("./interfaces/user"), exports);
26
26
  __exportStar(require("./data/types"), exports);
27
+ __exportStar(require("./data/categories"), exports);
27
28
  __exportStar(require("./interfaces/openai"), exports);
28
29
  __exportStar(require("./interfaces/home"), exports);
29
30
  __exportStar(require("./utils/utils"), exports);
@@ -1,10 +1,11 @@
1
+ import { INGREDIENTCATEGORY } from "src/data/categories";
1
2
  import { RISK, UNIT, USER_UNIT } from "../data/types";
2
3
  import { Bill, IdName } from "./bill";
3
4
  export interface Category {
4
5
  key: string;
5
6
  }
6
7
  export interface Ingredient {
7
- category: string | null;
8
+ category: INGREDIENTCATEGORY;
8
9
  name: string;
9
10
  favorite_supplier: string;
10
11
  user_weight: {
@@ -1,4 +1,5 @@
1
- import { CONTENTTYPE, TASKACTIONTYPE, TASKUNIT, UNIT } from "src/data/types";
1
+ import { CONTENTTYPE, STORAGEUNIT, TASKACTIONTYPE, TASKUNIT, UNIT } from "src/data/types";
2
+ import { PRODUCTCATEGORY } from "src/data/categories";
2
3
  import { IdName } from "./bill";
3
4
  import { Avatar, ProductInRange } from "./ranges";
4
5
  export interface Format {
@@ -14,6 +15,9 @@ export interface Format {
14
15
  isSoldByPack: boolean;
15
16
  selected?: boolean;
16
17
  }
18
+ export interface FormatDB extends Omit<Format, 'selected'> {
19
+ category?: PRODUCTCATEGORY;
20
+ }
17
21
  export interface CompositionBase {
18
22
  format: Format;
19
23
  units_per_batch?: number;
@@ -52,10 +56,10 @@ export interface Pricing {
52
56
  }
53
57
  export interface Product {
54
58
  name: string;
55
- category: "CP01" | "CP02" | "CP03" | "CP04" | "CP05" | "CP06" | "CP07" | "CP08" | "CP09" | null;
59
+ category: PRODUCTCATEGORY;
56
60
  holidays: string;
57
61
  storage: {
58
- unit: "days" | "weeks" | "months";
62
+ unit: STORAGEUNIT;
59
63
  value: number;
60
64
  };
61
65
  stock: number;
@@ -1,3 +1,4 @@
1
+ import { RECIPECATEGORY } from "src/data/categories";
1
2
  import { CONTENTTYPE, UNIT, STORAGEUNIT } from "../data/types";
2
3
  import { IdName } from "./bill";
3
4
  export interface RecipeContent {
@@ -28,7 +29,7 @@ export interface Recipe {
28
29
  name: string;
29
30
  recipe_base: boolean;
30
31
  storage: Storage;
31
- category: 'CR01' | 'CR02' | 'CR03' | 'CR04' | 'CR05' | 'CR06' | null;
32
+ category: RECIPECATEGORY;
32
33
  description: string;
33
34
  prep_time?: number;
34
35
  stock: number;
@@ -38,11 +38,11 @@ export interface Absence {
38
38
  }
39
39
  export interface TeamExceptions {
40
40
  tm_id: string;
41
- type: EXCEPTION;
41
+ type: EXCEPTION | null;
42
42
  start_date: string;
43
43
  end_date?: string;
44
- duration?: string;
45
- shift?: string;
44
+ duration?: number;
45
+ shifts?: number[];
46
46
  description?: string;
47
47
  _id?: string;
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pastelarai/pastelarai-shared-types",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "description": "Shared types for PastelarAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",