truflow 1.3.1 → 1.52.0
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/API/Allmoxy/IGeneric.d.ts +1 -0
- package/dist/API/Allmoxy/IOrderInventoryItems.d.ts +27 -0
- package/dist/API/Allmoxy/IOrderInventoryItems.js +2 -0
- package/dist/API/Allmoxy/index.d.ts +1 -0
- package/dist/API/Allmoxy/index.js +1 -0
- package/dist/API/IQualityControlNotification.d.ts +0 -24
- package/dist/Helpers/IExporters.d.ts +1 -42
- package/dist/Helpers/ITotals.d.ts +1 -0
- package/dist/Helpers/IZapier/index.d.ts +0 -24
- package/dist/IAllmoxy.d.ts +0 -24
- package/dist/IAutomation.d.ts +25 -26
- package/dist/IBackorder.d.ts +79 -0
- package/dist/IBackorder.js +2 -0
- package/dist/IDailyTotal.d.ts +0 -24
- package/dist/IDepartment.d.ts +0 -24
- package/dist/IDocumentType.d.ts +12 -0
- package/dist/IDocumentType.js +2 -0
- package/dist/IEmailTemplate.d.ts +0 -24
- package/dist/IEvent.d.ts +0 -24
- package/dist/IExporter.d.ts +0 -24
- package/dist/IExpress.d.ts +0 -1
- package/dist/IIntegration.d.ts +28 -24
- package/dist/IInventory.d.ts +0 -24
- package/dist/IJobRole.d.ts +32 -0
- package/dist/IJobRole.js +2 -0
- package/dist/IMailCache.d.ts +1 -24
- package/dist/INotification.d.ts +0 -24
- package/dist/IOrder.d.ts +15 -24
- package/dist/IQualityControl.d.ts +0 -24
- package/dist/IRedo.d.ts +0 -24
- package/dist/ISMTPServerConfig.d.ts +17 -0
- package/dist/ISMTPServerConfig.js +2 -0
- package/dist/ISOP.d.ts +30 -0
- package/dist/ISchedule.d.ts +27 -27
- package/dist/IScript.d.ts +0 -24
- package/dist/ISetting.d.ts +0 -24
- package/dist/IShipment.d.ts +47 -0
- package/dist/IShipment.js +2 -0
- package/dist/ISupplier.d.ts +0 -24
- package/dist/ITrainingMatrix.d.ts +0 -24
- package/dist/IUser.d.ts +12 -24
- package/dist/Inventory/IInventoryTransfer.d.ts +0 -24
- package/dist/Inventory/ILocation.d.ts +0 -24
- package/dist/Inventory/ISelectFieldDefinition.d.ts +0 -24
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
- package/src/API/Allmoxy/IGeneric.ts +1 -0
- package/src/API/Allmoxy/IOrderInventoryItems.ts +28 -0
- package/src/API/Allmoxy/index.ts +1 -0
- package/src/Helpers/IExporters.ts +3 -45
- package/src/Helpers/ITotals.ts +1 -0
- package/src/IAutomation.ts +35 -0
- package/src/IDocumentType.ts +14 -0
- package/src/IIntegration.ts +36 -0
- package/src/IJobRole.ts +36 -0
- package/src/IMailCache.ts +1 -0
- package/src/IOrder.ts +16 -0
- package/src/ISMTPServerConfig.ts +19 -0
- package/src/ISOP.ts +33 -0
- package/src/ISchedule.ts +31 -3
- package/src/IUser.ts +14 -1
- package/src/index.ts +3 -0
package/dist/IUser.d.ts
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
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
1
|
import mongoose, { Document } from "mongoose";
|
|
26
2
|
import { NotificationTag } from "./INotification";
|
|
27
3
|
export type IUser = ILeanUser & Document;
|
|
@@ -34,11 +10,18 @@ export interface ILeanUser {
|
|
|
34
10
|
permissions: any[];
|
|
35
11
|
groups: any[];
|
|
36
12
|
pushSubscriptions?: PushSubscription[];
|
|
13
|
+
expoPushTokens?: ExpoPushToken[];
|
|
37
14
|
pushNotificationTags?: NotificationTag[];
|
|
38
15
|
enableSignin?: boolean;
|
|
39
16
|
position?: string;
|
|
40
17
|
department?: mongoose.Types.ObjectId | string;
|
|
18
|
+
departments?: (mongoose.Types.ObjectId | string)[];
|
|
41
19
|
employeeId?: string;
|
|
20
|
+
startupPage?: string;
|
|
21
|
+
jobRoleId?: mongoose.Types.ObjectId | string;
|
|
22
|
+
isOrgRoot?: boolean;
|
|
23
|
+
reportsTo?: mongoose.Types.ObjectId | string;
|
|
24
|
+
hideFromOrgChartUnassigned?: boolean;
|
|
42
25
|
}
|
|
43
26
|
export interface PushSubscription {
|
|
44
27
|
endpoint: string;
|
|
@@ -49,3 +32,8 @@ export interface PushSubscription {
|
|
|
49
32
|
device?: string;
|
|
50
33
|
createdAt?: Date;
|
|
51
34
|
}
|
|
35
|
+
export interface ExpoPushToken {
|
|
36
|
+
token: string;
|
|
37
|
+
device?: string;
|
|
38
|
+
createdAt?: Date;
|
|
39
|
+
}
|
|
@@ -1,27 +1,3 @@
|
|
|
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
1
|
import { Document, Types } from "mongoose";
|
|
26
2
|
/**
|
|
27
3
|
* Single item in a bulk transfer
|
|
@@ -1,27 +1,3 @@
|
|
|
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
1
|
import { Document, Model, Types } from "mongoose";
|
|
26
2
|
/**
|
|
27
3
|
* Base interface for location components with common fields
|
|
@@ -1,27 +1,3 @@
|
|
|
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
1
|
import { Document, Types } from "mongoose";
|
|
26
2
|
/**
|
|
27
3
|
* Select field definition option
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -56,3 +56,6 @@ __exportStar(require("./ISchedule"), exports);
|
|
|
56
56
|
__exportStar(require("./IAutomation"), exports);
|
|
57
57
|
__exportStar(require("./IEmailTemplate"), exports);
|
|
58
58
|
__exportStar(require("./ISOP"), exports);
|
|
59
|
+
__exportStar(require("./IDocumentType"), exports);
|
|
60
|
+
__exportStar(require("./ISMTPServerConfig"), exports);
|
|
61
|
+
__exportStar(require("./IJobRole"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IOrderInventoryItemsQuery {
|
|
2
|
+
order_id?: number;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface IOrderInventoryItemsResponse {
|
|
6
|
+
supply_id: number;
|
|
7
|
+
order_id: number;
|
|
8
|
+
location_id: number | null;
|
|
9
|
+
item_id: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
/** Allmoxy returns price as a numeric string (e.g. "0E-8"). Parsed to number when storing internally. */
|
|
12
|
+
price: string | number;
|
|
13
|
+
type: string | null;
|
|
14
|
+
allocated_by: string | null;
|
|
15
|
+
timestamp: string | null;
|
|
16
|
+
createdby: string | null;
|
|
17
|
+
createdbyid: number | null;
|
|
18
|
+
createddate: string | null;
|
|
19
|
+
updatedby: string | null;
|
|
20
|
+
updatedbyid: number | null;
|
|
21
|
+
updateddate: string | null;
|
|
22
|
+
inventory_item_name: string;
|
|
23
|
+
inventory_item_piece_size: string;
|
|
24
|
+
inventory_item_status: number;
|
|
25
|
+
order_name: string;
|
|
26
|
+
order_type: string;
|
|
27
|
+
order_status: string;
|
|
28
|
+
}
|
package/src/API/Allmoxy/index.ts
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
password: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface ICloudPanelAPIRequest {
|
|
8
|
-
DisplayName: string;
|
|
9
|
-
Company: string;
|
|
10
|
-
Username: string;
|
|
11
|
-
Domain: string;
|
|
12
|
-
Pwd: string;
|
|
13
|
-
confirmPwd: string;
|
|
14
|
-
PasswordNeverExpires: boolean;
|
|
15
|
-
EnableMailbox: boolean;
|
|
16
|
-
LocalPart: string;
|
|
17
|
-
DomainPart: string;
|
|
18
|
-
MailboxPlan: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IPosteBox {
|
|
22
|
-
address: string;
|
|
23
|
-
user: string;
|
|
24
|
-
home: string;
|
|
25
|
-
name: string;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
domain_admin: boolean;
|
|
28
|
-
super_admin: boolean;
|
|
29
|
-
strict_from_disabled: boolean;
|
|
30
|
-
created: string;
|
|
31
|
-
updated: string;
|
|
32
|
-
redirect_only: boolean;
|
|
33
|
-
redirect_to: [];
|
|
34
|
-
discard: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface ICreatePosteBox {
|
|
38
|
-
name: string;
|
|
39
|
-
email: string;
|
|
40
|
-
passwordPlaintext: string;
|
|
41
|
-
disabled: boolean;
|
|
42
|
-
superAdmin: boolean;
|
|
43
|
-
redirectTo?: ["string"];
|
|
44
|
-
referenceId?: "string";
|
|
45
|
-
}
|
|
1
|
+
// No interfaces needed in this file after removing legacy email account creation
|
|
2
|
+
// All exporter types are in IExporter.ts
|
|
3
|
+
export {};
|
package/src/Helpers/ITotals.ts
CHANGED
package/src/IAutomation.ts
CHANGED
|
@@ -20,8 +20,11 @@ export type AutomationActionType =
|
|
|
20
20
|
| "webhook" // Trigger a webhook (HTTP request)
|
|
21
21
|
| "email" // Send an email
|
|
22
22
|
| "notification" // Send in-app notification to user(s)
|
|
23
|
+
| "push_notification" // Send Expo push notification to mobile app
|
|
23
24
|
| "sms" // Send SMS/text message
|
|
24
25
|
| "slack" // Post to Slack channel
|
|
26
|
+
| "google_chat" // Send a Google Chat message
|
|
27
|
+
| "clickup" // Post a ClickUp Chat message
|
|
25
28
|
| "update_field" // Update order or schedule entry field
|
|
26
29
|
| "add_note"; // Add a note to the order
|
|
27
30
|
|
|
@@ -129,6 +132,23 @@ export interface IAutomationSlackAction {
|
|
|
129
132
|
iconEmoji?: string; // Optional emoji icon (e.g., ":robot_face:")
|
|
130
133
|
}
|
|
131
134
|
|
|
135
|
+
// Google Chat action configuration
|
|
136
|
+
export interface IAutomationGoogleChatAction {
|
|
137
|
+
type: "google_chat";
|
|
138
|
+
integrationId: string; // References the GoogleChat integration _id
|
|
139
|
+
spaceId: string; // References a space _id within the integration's spaces array
|
|
140
|
+
message: string; // Message text (can use template variables)
|
|
141
|
+
threadKey?: string; // Optional thread key for grouping messages into a thread
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ClickUp Chat action configuration
|
|
145
|
+
export interface IAutomationClickUpAction {
|
|
146
|
+
type: "clickup";
|
|
147
|
+
integrationId: string; // References the ClickUp integration _id
|
|
148
|
+
channelId: string; // ClickUp channel ID (from the integration's channels array)
|
|
149
|
+
message: string; // Message text (can use template variables)
|
|
150
|
+
}
|
|
151
|
+
|
|
132
152
|
// Update field action configuration
|
|
133
153
|
export interface IAutomationUpdateFieldAction {
|
|
134
154
|
type: "update_field";
|
|
@@ -144,13 +164,28 @@ export interface IAutomationAddNoteAction {
|
|
|
144
164
|
mentionUserIds?: string[]; // Optional user IDs to mention
|
|
145
165
|
}
|
|
146
166
|
|
|
167
|
+
// Push notification action configuration (for Expo mobile app)
|
|
168
|
+
export interface IAutomationPushNotificationAction {
|
|
169
|
+
type: "push_notification";
|
|
170
|
+
userIds: string[]; // Array of user IDs to notify (can use "all" for all users with matching tags)
|
|
171
|
+
title: string; // Notification title (can use template variables)
|
|
172
|
+
message: string; // Notification message (can use template variables)
|
|
173
|
+
/** Optional deep-link payload. Supports template variables in string values.
|
|
174
|
+
* e.g. { screen: "Walkthroughs", templateId: "{{walkthrough.templateId}}" }
|
|
175
|
+
*/
|
|
176
|
+
data?: Record<string, string>;
|
|
177
|
+
}
|
|
178
|
+
|
|
147
179
|
// Union type for all action configurations
|
|
148
180
|
export type IAutomationAction =
|
|
149
181
|
| IAutomationWebhookAction
|
|
150
182
|
| IAutomationEmailAction
|
|
151
183
|
| IAutomationNotificationAction
|
|
184
|
+
| IAutomationPushNotificationAction
|
|
152
185
|
| IAutomationSMSAction
|
|
153
186
|
| IAutomationSlackAction
|
|
187
|
+
| IAutomationGoogleChatAction
|
|
188
|
+
| IAutomationClickUpAction
|
|
154
189
|
| IAutomationUpdateFieldAction
|
|
155
190
|
| IAutomationAddNoteAction;
|
|
156
191
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILeanDocumentType {
|
|
4
|
+
_id?: mongoose.Types.ObjectId;
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
isSystem: boolean;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type IDocumentType = ILeanDocumentType & Document;
|
package/src/IIntegration.ts
CHANGED
|
@@ -25,6 +25,13 @@ export interface ILeanAllmoxyIntegration extends ILeanIntegration {
|
|
|
25
25
|
authToken: string;
|
|
26
26
|
}[];
|
|
27
27
|
saveSelectedAttributesInOrder?: boolean;
|
|
28
|
+
enableShipDateSync?: boolean;
|
|
29
|
+
shipDateWebhook?: {
|
|
30
|
+
id: string;
|
|
31
|
+
url: string;
|
|
32
|
+
event: string;
|
|
33
|
+
authToken: string;
|
|
34
|
+
};
|
|
28
35
|
webhook?: {
|
|
29
36
|
id: string;
|
|
30
37
|
url: string;
|
|
@@ -37,3 +44,32 @@ export interface ILeanAllmoxyIntegration extends ILeanIntegration {
|
|
|
37
44
|
|
|
38
45
|
export type IAllmoxyIntegration = ILeanAllmoxyIntegration & Document;
|
|
39
46
|
|
|
47
|
+
// A single configured target (space, DM, or group) in a Google Chat integration
|
|
48
|
+
export interface IGoogleChatSpace {
|
|
49
|
+
_id: mongoose.Types.ObjectId;
|
|
50
|
+
name: string; // User-defined display name (e.g. "Engineering Space")
|
|
51
|
+
type: "space" | "dm" | "group"; // Target type
|
|
52
|
+
webhookUrl: string; // Google Chat incoming webhook URL
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ILeanGoogleChatIntegration extends ILeanIntegration {
|
|
56
|
+
spaces: IGoogleChatSpace[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type IGoogleChatIntegration = ILeanGoogleChatIntegration & Document;
|
|
60
|
+
|
|
61
|
+
// A single configured channel or DM in a ClickUp integration
|
|
62
|
+
export interface IClickUpChannel {
|
|
63
|
+
_id: mongoose.Types.ObjectId;
|
|
64
|
+
name: string; // User-defined display name (e.g. "Engineering")
|
|
65
|
+
type: "channel" | "dm"; // Target type
|
|
66
|
+
channelId: string; // ClickUp Chat channel ID
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ILeanClickUpIntegration extends ILeanIntegration {
|
|
70
|
+
apiKey: string; // ClickUp Personal API Key
|
|
71
|
+
channels: IClickUpChannel[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type IClickUpIntegration = ILeanClickUpIntegration & Document;
|
|
75
|
+
|
package/src/IJobRole.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export type IJobRole = ILeanJobRole & Document;
|
|
4
|
+
|
|
5
|
+
export interface ILeanJobRole {
|
|
6
|
+
_id: mongoose.Types.ObjectId;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
responsibilities?: string;
|
|
10
|
+
tasks?: IJobRoleTask[];
|
|
11
|
+
metrics?: IJobRoleMetric[];
|
|
12
|
+
qualifications?: string;
|
|
13
|
+
safetyNotes?: string;
|
|
14
|
+
tools?: string;
|
|
15
|
+
reportingTo?: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
assignedMachineIds?: (mongoose.Types.ObjectId | string)[];
|
|
18
|
+
assignedDepartmentIds?: (mongoose.Types.ObjectId | string)[];
|
|
19
|
+
assignedSOPIds?: (mongoose.Types.ObjectId | string)[];
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
createdAt?: Date;
|
|
22
|
+
updatedAt?: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IJobRoleTask {
|
|
26
|
+
title: string;
|
|
27
|
+
frequency: "daily" | "weekly" | "biweekly" | "monthly" | "asNeeded";
|
|
28
|
+
description?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IJobRoleMetric {
|
|
32
|
+
name: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
unit?: string;
|
|
35
|
+
target?: string;
|
|
36
|
+
}
|
package/src/IMailCache.ts
CHANGED
package/src/IOrder.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface ILineItem {
|
|
|
40
40
|
width: number;
|
|
41
41
|
height: number;
|
|
42
42
|
thickness: number;
|
|
43
|
+
price?: number;
|
|
43
44
|
attributes: IProductAttribute[];
|
|
44
45
|
measurements?: IMeasurement[];
|
|
45
46
|
}
|
|
@@ -72,6 +73,9 @@ export interface ILeanOrder {
|
|
|
72
73
|
status: string;
|
|
73
74
|
notes?: INote[];
|
|
74
75
|
shippingComplete?: boolean;
|
|
76
|
+
subtotal?: number;
|
|
77
|
+
total?: number;
|
|
78
|
+
inventoryItems?: IOrderInventoryItem[];
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
export interface IMeasurement {
|
|
@@ -81,3 +85,15 @@ export interface IMeasurement {
|
|
|
81
85
|
outOfSquare: number;
|
|
82
86
|
comments: string;
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
export interface IOrderInventoryItem {
|
|
90
|
+
supply_id: number;
|
|
91
|
+
item_id: number;
|
|
92
|
+
location_id?: number | null;
|
|
93
|
+
quantity: number;
|
|
94
|
+
price?: number;
|
|
95
|
+
inventory_item_name: string;
|
|
96
|
+
inventory_item_piece_size: string;
|
|
97
|
+
/** Whether this is a quote (pre-allocation) or initial (confirmed allocation) entry */
|
|
98
|
+
type: "quote" | "initial";
|
|
99
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILeanSMTPServerConfig {
|
|
4
|
+
_id?: mongoose.Types.ObjectId;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
host: string;
|
|
7
|
+
port: number;
|
|
8
|
+
secure: boolean;
|
|
9
|
+
domain: string;
|
|
10
|
+
maxSize: number;
|
|
11
|
+
requireAuth: boolean;
|
|
12
|
+
authUsername?: string;
|
|
13
|
+
authPassword?: string;
|
|
14
|
+
rejectUnauthorized: boolean;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type ISMTPServerConfig = ILeanSMTPServerConfig & Document;
|
package/src/ISOP.ts
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
* SOP (Standard Operating Procedure) Type Definitions
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Linked SOP reference
|
|
7
|
+
*/
|
|
8
|
+
export interface ILinkedSOP {
|
|
9
|
+
sopId: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* External link
|
|
15
|
+
*/
|
|
16
|
+
export interface IExternalLink {
|
|
17
|
+
url: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Linked machine check reference
|
|
23
|
+
*/
|
|
24
|
+
export interface ILinkedMachineCheck {
|
|
25
|
+
checkId: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
5
29
|
/**
|
|
6
30
|
* Step in a step-based SOP
|
|
7
31
|
*/
|
|
@@ -10,6 +34,9 @@ export interface ISOPStep {
|
|
|
10
34
|
title: string;
|
|
11
35
|
description?: string;
|
|
12
36
|
imageUrl?: string;
|
|
37
|
+
linkedSOPs?: ILinkedSOP[];
|
|
38
|
+
externalLinks?: IExternalLink[];
|
|
39
|
+
linkedMachineChecks?: ILinkedMachineCheck[];
|
|
13
40
|
}
|
|
14
41
|
|
|
15
42
|
/**
|
|
@@ -45,6 +72,9 @@ export interface ISOP {
|
|
|
45
72
|
machineIds?: string[];
|
|
46
73
|
folderId?: string;
|
|
47
74
|
trainingStep?: string;
|
|
75
|
+
linkedSOPs?: ILinkedSOP[];
|
|
76
|
+
externalLinks?: IExternalLink[];
|
|
77
|
+
linkedMachineChecks?: ILinkedMachineCheck[];
|
|
48
78
|
enabled: boolean;
|
|
49
79
|
version: number;
|
|
50
80
|
note?: string;
|
|
@@ -64,6 +94,9 @@ export interface ISOPRevisionData {
|
|
|
64
94
|
parameters?: ISOPParameters;
|
|
65
95
|
machineIds?: string[];
|
|
66
96
|
trainingStep?: string;
|
|
97
|
+
linkedSOPs?: ILinkedSOP[];
|
|
98
|
+
externalLinks?: IExternalLink[];
|
|
99
|
+
linkedMachineChecks?: ILinkedMachineCheck[];
|
|
67
100
|
enabled: boolean;
|
|
68
101
|
}
|
|
69
102
|
|