truflow 0.0.188 → 0.0.190
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/Helpers/IOrders/IMoveOrder.d.ts +1 -1
- package/dist/Helpers/IZapier/index.d.ts +7 -6
- package/dist/IAutomation.d.ts +197 -0
- package/dist/IDailyTotal.d.ts +6 -0
- package/dist/IExporter.d.ts +1 -0
- package/dist/IExpress.d.ts +2 -0
- package/dist/IExpress.js +1 -0
- package/dist/IInventory.d.ts +37 -2
- package/dist/IMailCache.d.ts +13 -0
- package/dist/IOrder.d.ts +1 -1
- package/dist/ISchedule.d.ts +119 -0
- package/dist/ISetting.d.ts +31 -2
- package/dist/ISupplier.d.ts +1 -0
- package/dist/Inventory/IInventoryTransfer.d.ts +122 -0
- package/dist/Inventory/IInventoryTransfer.js +2 -0
- package/dist/Inventory/ILocation.d.ts +6 -0
- package/dist/{IInventoryLocation.d.ts → Inventory/ISelectFieldDefinition.d.ts} +20 -34
- package/dist/Inventory/ISelectFieldDefinition.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package-lock.json +2180 -0
- package/package.json +13 -4
- package/src/Helpers/IOrders/IMoveOrder.ts +1 -1
- package/src/Helpers/IZapier/index.ts +9 -6
- package/src/IAutomation.ts +264 -0
- package/src/IDailyTotal.ts +7 -0
- package/src/IExporter.ts +1 -0
- package/src/IExpress.ts +1 -0
- package/src/IIntegration.ts +1 -0
- package/src/IInventory.ts +40 -2
- package/src/IMailCache.ts +14 -0
- package/src/IOrder.ts +1 -1
- package/src/ISchedule.ts +125 -0
- package/src/ISetting.ts +49 -2
- package/src/ISupplier.ts +1 -0
- package/src/Inventory/IInventoryTransfer.ts +108 -0
- package/src/Inventory/ILocation.ts +12 -0
- package/src/Inventory/ISelectFieldDefinition.ts +29 -0
- package/src/index.ts +4 -0
- package/dist/ILocation.d.ts +0 -75
- /package/dist/{IInventoryLocation.js → IAutomation.js} +0 -0
- /package/dist/{ILocation.js → ISchedule.js} +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
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, Types } from "mongoose";
|
|
26
|
+
/**
|
|
27
|
+
* Single item in a bulk transfer
|
|
28
|
+
*/
|
|
29
|
+
export interface ITransferItem {
|
|
30
|
+
itemId: Types.ObjectId;
|
|
31
|
+
fromLocation: Types.ObjectId;
|
|
32
|
+
fromLocationPath?: {
|
|
33
|
+
rackId?: Types.ObjectId;
|
|
34
|
+
shelfId?: Types.ObjectId;
|
|
35
|
+
binId?: Types.ObjectId;
|
|
36
|
+
};
|
|
37
|
+
toLocation: Types.ObjectId;
|
|
38
|
+
toLocationPath?: {
|
|
39
|
+
rackId?: Types.ObjectId;
|
|
40
|
+
shelfId?: Types.ObjectId;
|
|
41
|
+
binId?: Types.ObjectId;
|
|
42
|
+
};
|
|
43
|
+
quantity?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Inventory transfer - records movement of inventory between locations
|
|
47
|
+
* Supports both single and bulk transfers
|
|
48
|
+
*/
|
|
49
|
+
export interface IInventoryTransfer {
|
|
50
|
+
_id: Types.ObjectId;
|
|
51
|
+
itemId?: Types.ObjectId;
|
|
52
|
+
fromLocation?: Types.ObjectId;
|
|
53
|
+
fromLocationPath?: {
|
|
54
|
+
rackId?: Types.ObjectId;
|
|
55
|
+
shelfId?: Types.ObjectId;
|
|
56
|
+
binId?: Types.ObjectId;
|
|
57
|
+
};
|
|
58
|
+
toLocation?: Types.ObjectId;
|
|
59
|
+
toLocationPath?: {
|
|
60
|
+
rackId?: Types.ObjectId;
|
|
61
|
+
shelfId?: Types.ObjectId;
|
|
62
|
+
binId?: Types.ObjectId;
|
|
63
|
+
};
|
|
64
|
+
quantity?: number;
|
|
65
|
+
items?: ITransferItem[];
|
|
66
|
+
isBulk?: boolean;
|
|
67
|
+
notes?: string;
|
|
68
|
+
status: "pending" | "completed" | "cancelled";
|
|
69
|
+
initiatedBy: Types.ObjectId;
|
|
70
|
+
completedBy?: Types.ObjectId;
|
|
71
|
+
completedAt?: Date;
|
|
72
|
+
createdAt: Date;
|
|
73
|
+
updatedAt: Date;
|
|
74
|
+
}
|
|
75
|
+
export type IInventoryTransferDocument = IInventoryTransfer & Document;
|
|
76
|
+
/**
|
|
77
|
+
* Count session item - tracks counting of a single inventory item
|
|
78
|
+
*/
|
|
79
|
+
export interface ICountSessionItem {
|
|
80
|
+
itemId: Types.ObjectId;
|
|
81
|
+
expectedLocation?: Types.ObjectId;
|
|
82
|
+
expectedLocationPath?: {
|
|
83
|
+
rackId?: Types.ObjectId;
|
|
84
|
+
shelfId?: Types.ObjectId;
|
|
85
|
+
binId?: Types.ObjectId;
|
|
86
|
+
};
|
|
87
|
+
actualLocation?: Types.ObjectId;
|
|
88
|
+
actualLocationPath?: {
|
|
89
|
+
rackId?: Types.ObjectId;
|
|
90
|
+
shelfId?: Types.ObjectId;
|
|
91
|
+
binId?: Types.ObjectId;
|
|
92
|
+
};
|
|
93
|
+
expectedQuantity?: number;
|
|
94
|
+
countedQuantity?: number;
|
|
95
|
+
status: "pending" | "counted" | "discrepancy" | "resolved";
|
|
96
|
+
scannedAt?: Date;
|
|
97
|
+
notes?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Inventory counting session - guides users through rack-by-rack counting
|
|
101
|
+
*/
|
|
102
|
+
export interface IInventoryCountSession {
|
|
103
|
+
_id: Types.ObjectId;
|
|
104
|
+
name: string;
|
|
105
|
+
locationId: Types.ObjectId;
|
|
106
|
+
racks: Types.ObjectId[];
|
|
107
|
+
shelves?: Types.ObjectId[];
|
|
108
|
+
bins?: Types.ObjectId[];
|
|
109
|
+
currentRackIndex: number;
|
|
110
|
+
currentRackId?: Types.ObjectId;
|
|
111
|
+
items: ICountSessionItem[];
|
|
112
|
+
totalExpectedItems: number;
|
|
113
|
+
status: "not_started" | "in_progress" | "completed" | "cancelled";
|
|
114
|
+
startedBy: Types.ObjectId;
|
|
115
|
+
startedAt?: Date;
|
|
116
|
+
completedBy?: Types.ObjectId;
|
|
117
|
+
completedAt?: Date;
|
|
118
|
+
notes?: string;
|
|
119
|
+
createdAt: Date;
|
|
120
|
+
updatedAt: Date;
|
|
121
|
+
}
|
|
122
|
+
export type IInventoryCountSessionDocument = IInventoryCountSession & Document;
|
|
@@ -41,16 +41,21 @@ export interface ILocationComponentBase {
|
|
|
41
41
|
export interface IBin extends ILocationComponentBase {
|
|
42
42
|
capacity?: number;
|
|
43
43
|
currentStock?: number;
|
|
44
|
+
mergedWith?: Types.ObjectId[];
|
|
45
|
+
mergedInto?: Types.ObjectId;
|
|
46
|
+
allowedInventoryTypes?: Types.ObjectId[];
|
|
44
47
|
}
|
|
45
48
|
export interface IShelf extends ILocationComponentBase {
|
|
46
49
|
bins: IBin[];
|
|
47
50
|
capacity?: number;
|
|
48
51
|
currentStock?: number;
|
|
52
|
+
allowedInventoryTypes?: Types.ObjectId[];
|
|
49
53
|
}
|
|
50
54
|
export interface IRack extends ILocationComponentBase {
|
|
51
55
|
shelves: IShelf[];
|
|
52
56
|
capacity?: number;
|
|
53
57
|
currentStock?: number;
|
|
58
|
+
allowedInventoryTypes?: Types.ObjectId[];
|
|
54
59
|
}
|
|
55
60
|
export interface ILocationMethods {
|
|
56
61
|
generateUniqueCode(prefix: string): Promise<string>;
|
|
@@ -65,6 +70,7 @@ export interface ILocation extends Omit<Document, '_id'>, ILocationComponentBase
|
|
|
65
70
|
capacity?: number;
|
|
66
71
|
currentStock?: number;
|
|
67
72
|
isActive: boolean;
|
|
73
|
+
allowedInventoryTypes?: Types.ObjectId[];
|
|
68
74
|
}
|
|
69
75
|
export interface ILocationPath {
|
|
70
76
|
locationId: Types.ObjectId;
|
|
@@ -23,41 +23,27 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Document, Types } from "mongoose";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
createdById: number;
|
|
33
|
-
createdDate: Date;
|
|
34
|
-
updatedBy: string;
|
|
35
|
-
updatedById: number;
|
|
36
|
-
updatedDate: Date;
|
|
37
|
-
}
|
|
38
|
-
export interface IBin extends IInventoryBase {
|
|
39
|
-
_id: Types.ObjectId;
|
|
40
|
-
capacity?: number;
|
|
41
|
-
currentStock?: number;
|
|
42
|
-
}
|
|
43
|
-
export interface IShelf extends IInventoryBase {
|
|
44
|
-
_id: Types.ObjectId;
|
|
45
|
-
bins: IBin[];
|
|
46
|
-
capacity?: number;
|
|
47
|
-
currentStock?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Select field definition option
|
|
28
|
+
*/
|
|
29
|
+
export interface ISelectOption {
|
|
30
|
+
key: string;
|
|
31
|
+
value: string;
|
|
48
32
|
}
|
|
49
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Source type for select field data
|
|
35
|
+
*/
|
|
36
|
+
export type SelectFieldSource = "table";
|
|
37
|
+
/**
|
|
38
|
+
* Select field definition - defines a reusable select field with its options
|
|
39
|
+
*/
|
|
40
|
+
export interface ISelectFieldDefinition {
|
|
50
41
|
_id: Types.ObjectId;
|
|
51
|
-
|
|
52
|
-
capacity?: number;
|
|
53
|
-
currentStock?: number;
|
|
54
|
-
}
|
|
55
|
-
export interface IInventoryLocation extends Document, IInventoryBase {
|
|
56
|
-
racks: IRack[];
|
|
57
|
-
type: string;
|
|
42
|
+
name: string;
|
|
58
43
|
description?: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
source: SelectFieldSource;
|
|
45
|
+
options: ISelectOption[];
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
updatedAt: Date;
|
|
63
48
|
}
|
|
49
|
+
export type ISelectFieldDefinitionDocument = ISelectFieldDefinition & Document;
|
package/dist/index.d.ts
CHANGED
|
@@ -30,5 +30,9 @@ export * from "./Classes/IRoute";
|
|
|
30
30
|
export * from "./IApplication";
|
|
31
31
|
export * from "./IQualityControl";
|
|
32
32
|
export * from "./Inventory/ILocation";
|
|
33
|
+
export * from "./Inventory/ISelectFieldDefinition";
|
|
34
|
+
export * from "./Inventory/IInventoryTransfer";
|
|
33
35
|
export * from "./IInventory";
|
|
34
36
|
export * from "./ISupplier";
|
|
37
|
+
export * from "./ISchedule";
|
|
38
|
+
export * from "./IAutomation";
|
package/dist/index.js
CHANGED
|
@@ -46,5 +46,9 @@ __exportStar(require("./Classes/IRoute"), exports);
|
|
|
46
46
|
__exportStar(require("./IApplication"), exports);
|
|
47
47
|
__exportStar(require("./IQualityControl"), exports);
|
|
48
48
|
__exportStar(require("./Inventory/ILocation"), exports);
|
|
49
|
+
__exportStar(require("./Inventory/ISelectFieldDefinition"), exports);
|
|
50
|
+
__exportStar(require("./Inventory/IInventoryTransfer"), exports);
|
|
49
51
|
__exportStar(require("./IInventory"), exports);
|
|
50
52
|
__exportStar(require("./ISupplier"), exports);
|
|
53
|
+
__exportStar(require("./ISchedule"), exports);
|
|
54
|
+
__exportStar(require("./IAutomation"), exports);
|