truflow 0.0.179 → 0.0.181

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,6 +1,31 @@
1
- export interface IQualityControlNotification {
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import { Document } from "mongoose";
26
+ export interface ILeanQualityControlNotification {
2
27
  _id?: string;
3
- productId: string;
28
+ productId?: string;
4
29
  attributeName: string;
5
30
  operator: string;
6
31
  values: (string | number)[];
@@ -9,3 +34,4 @@ export interface IQualityControlNotification {
9
34
  createdBy?: string;
10
35
  createdAt?: string;
11
36
  }
37
+ export type IQualityControlNotification = ILeanQualityControlNotification & Document;
@@ -80,6 +80,8 @@ export interface ILeanTotalsGroup extends ILeanSetting {
80
80
  name: string;
81
81
  identifier: string;
82
82
  calculations?: ICalculation[];
83
+ dailyLimit?: number;
84
+ buffer?: number;
83
85
  }
84
86
  export interface ILeanKeyValue extends ILeanSetting {
85
87
  key: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truflow",
3
- "version": "0.0.179",
3
+ "version": "0.0.181",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -1,6 +1,8 @@
1
- export interface IQualityControlNotification {
1
+ import { Document } from "mongoose";
2
+
3
+ export interface ILeanQualityControlNotification {
2
4
  _id?: string;
3
- productId: string;
5
+ productId?: string; // Now optional for global rules
4
6
  attributeName: string; // Use attributeName instead of attributeId
5
7
  operator: string; // e.g., 'eq', 'ne', 'gt', 'lt', 'in', etc.
6
8
  values: (string | number)[];
@@ -9,3 +11,6 @@ export interface IQualityControlNotification {
9
11
  createdBy?: string;
10
12
  createdAt?: string;
11
13
  }
14
+
15
+ export type IQualityControlNotification = ILeanQualityControlNotification &
16
+ Document;
package/src/ISetting.ts CHANGED
@@ -61,10 +61,13 @@ export interface ICalculation {
61
61
  days: string;
62
62
  }
63
63
 
64
+
64
65
  export interface ILeanTotalsGroup extends ILeanSetting {
65
66
  name: string;
66
67
  identifier: string;
67
68
  calculations?: ICalculation[];
69
+ dailyLimit?: number;
70
+ buffer?: number;
68
71
  }
69
72
 
70
73
  export interface ILeanKeyValue extends ILeanSetting {