truflow 0.0.120 → 0.0.121
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/IProductProductAttribute.d.ts +22 -0
- package/dist/API/Allmoxy/IProductProductAttribute.js +2 -0
- package/dist/API/Allmoxy/index.d.ts +1 -0
- package/dist/API/Allmoxy/index.js +1 -0
- package/package.json +15 -15
- package/src/API/Allmoxy/IAnnouncement.ts +41 -41
- package/src/API/Allmoxy/ICompany.ts +199 -199
- package/src/API/Allmoxy/IGeneric.ts +13 -13
- package/src/API/Allmoxy/IInventoryItem.ts +56 -56
- package/src/API/Allmoxy/IInventoryOrder.ts +43 -43
- package/src/API/Allmoxy/ILocation.ts +19 -19
- package/src/API/Allmoxy/IOrder.ts +89 -89
- package/src/API/Allmoxy/IOrderProducts.ts +46 -46
- package/src/API/Allmoxy/IProduct.ts +72 -72
- package/src/API/Allmoxy/IProductAttribute.ts +21 -21
- package/src/API/Allmoxy/IProductAttributeOptions.ts +30 -30
- package/src/API/Allmoxy/IProductProductAttribute.ts +23 -0
- package/src/API/Allmoxy/index.ts +12 -11
- package/src/Classes/ICRUDRouter.ts +6 -6
- package/src/Classes/ILogger.ts +17 -17
- package/src/Events/IDateEntryMoved.ts +13 -13
- package/src/Events/INegativeValue.ts +10 -10
- package/src/Events/IOrderDetails.ts +12 -12
- package/src/Events/IOrderMoved.ts +14 -14
- package/src/Events/IOrderProcessed.ts +6 -6
- package/src/Helpers/IAdministration.ts +9 -9
- package/src/Helpers/IAllmoxy.ts +4 -4
- package/src/Helpers/IEvents.ts +23 -23
- package/src/Helpers/IExporters.ts +45 -45
- package/src/Helpers/IOrders/IMoveDateEntry.ts +21 -21
- package/src/Helpers/IOrders/IMoveOrder.ts +28 -28
- package/src/Helpers/IOrders/IUpdateFullDailyTotal.ts +13 -13
- package/src/Helpers/IOrders/IUpdateIndividualDailyTotal.ts +8 -8
- package/src/Helpers/IOrders/index.ts +10 -10
- package/src/Helpers/ITotals.ts +16 -16
- package/src/Helpers/IZapier/index.ts +54 -54
- package/src/IConfig.ts +11 -11
- package/src/IDailyTotal.ts +9 -9
- package/src/IEvent.ts +21 -21
- package/src/IExporter.ts +20 -20
- package/src/IExpress.ts +14 -14
- package/src/IIntegration.ts +17 -17
- package/src/IJWT.ts +4 -4
- package/src/IMailCache.ts +19 -19
- package/src/INotification.ts +11 -11
- package/src/IOrder.ts +27 -27
- package/src/IScript.ts +10 -10
- package/src/ISetting.ts +83 -83
- package/src/IUser.ts +13 -13
- package/src/IWebsocket.ts +7 -7
- package/src/Routes/IOrderRoutes.ts +37 -37
- package/src/Routes/IZapierRoutes.ts +12 -12
- package/src/Templates/IDailyTotals.ts +4 -4
- package/src/index.ts +27 -27
- package/tsconfig.json +11 -11
package/src/Helpers/ITotals.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ILeanDailyTotal } from "../IDailyTotal";
|
|
2
|
-
import { IOrder } from "../IOrder";
|
|
3
|
-
import { IUpdateOrder } from "../Routes/IOrderRoutes";
|
|
4
|
-
|
|
5
|
-
export type IFormattedHolidays = string[];
|
|
6
|
-
|
|
7
|
-
export interface IDateObject {
|
|
8
|
-
_id: string;
|
|
9
|
-
totals: number[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type ICheckForNegativeValue = (
|
|
13
|
-
totals: ILeanDailyTotal,
|
|
14
|
-
order: IOrder,
|
|
15
|
-
data: IUpdateOrder
|
|
16
|
-
) => Promise<boolean>;
|
|
1
|
+
import { ILeanDailyTotal } from "../IDailyTotal";
|
|
2
|
+
import { IOrder } from "../IOrder";
|
|
3
|
+
import { IUpdateOrder } from "../Routes/IOrderRoutes";
|
|
4
|
+
|
|
5
|
+
export type IFormattedHolidays = string[];
|
|
6
|
+
|
|
7
|
+
export interface IDateObject {
|
|
8
|
+
_id: string;
|
|
9
|
+
totals: number[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ICheckForNegativeValue = (
|
|
13
|
+
totals: ILeanDailyTotal,
|
|
14
|
+
order: IOrder,
|
|
15
|
+
data: IUpdateOrder
|
|
16
|
+
) => Promise<boolean>;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
|
-
import { ILimit } from "../../ISetting";
|
|
3
|
-
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
4
|
-
import { IDateEntry } from "../../IOrder";
|
|
5
|
-
import mongoose from "mongoose";
|
|
6
|
-
|
|
7
|
-
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
8
|
-
|
|
9
|
-
export type ICalculateInitialStartDate = (
|
|
10
|
-
shipDate: DateTime,
|
|
11
|
-
limits: ILimit
|
|
12
|
-
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
13
|
-
|
|
14
|
-
export type ICheckDailyTotals = (
|
|
15
|
-
date: string,
|
|
16
|
-
quantity: number,
|
|
17
|
-
limitData: ILimit
|
|
18
|
-
) => Promise<{ result: boolean; exists?: boolean } | boolean>;
|
|
19
|
-
|
|
20
|
-
export type ICalculateStartDate = (
|
|
21
|
-
startDate: DateTime,
|
|
22
|
-
isHighlighted: boolean
|
|
23
|
-
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
24
|
-
|
|
25
|
-
export type ICalculateRPD = (
|
|
26
|
-
requiredProductionDays: number,
|
|
27
|
-
requestedShipDate: DateTime
|
|
28
|
-
) => number;
|
|
29
|
-
|
|
30
|
-
export type ICalculateShipDate = (
|
|
31
|
-
startDate: DateTime,
|
|
32
|
-
limits: ILimit
|
|
33
|
-
) => Promise<DateTime>;
|
|
34
|
-
|
|
35
|
-
export type ICalculateStartDates = (
|
|
36
|
-
summary: string[],
|
|
37
|
-
data: IZapierOrder
|
|
38
|
-
) => Promise<{ entries: IDateEntry[]; shipDate?: DateTime }>;
|
|
39
|
-
|
|
40
|
-
export type IUpdateAllmoxyShipDate = (
|
|
41
|
-
id: string | number,
|
|
42
|
-
shipDate: DateTime,
|
|
43
|
-
userID?: mongoose.Types.ObjectId
|
|
44
|
-
) => void;
|
|
45
|
-
|
|
46
|
-
export type IPopulateDatabase = (
|
|
47
|
-
entries: IDateEntry[],
|
|
48
|
-
requestBody: IZapierOrder
|
|
49
|
-
) => Promise<void>;
|
|
50
|
-
|
|
51
|
-
export type ICreateTotalsEntry = (
|
|
52
|
-
startDate: string,
|
|
53
|
-
dateEntry: IDateEntry
|
|
54
|
-
) => Promise<void>;
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import { ILimit } from "../../ISetting";
|
|
3
|
+
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
4
|
+
import { IDateEntry } from "../../IOrder";
|
|
5
|
+
import mongoose from "mongoose";
|
|
6
|
+
|
|
7
|
+
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
8
|
+
|
|
9
|
+
export type ICalculateInitialStartDate = (
|
|
10
|
+
shipDate: DateTime,
|
|
11
|
+
limits: ILimit
|
|
12
|
+
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
13
|
+
|
|
14
|
+
export type ICheckDailyTotals = (
|
|
15
|
+
date: string,
|
|
16
|
+
quantity: number,
|
|
17
|
+
limitData: ILimit
|
|
18
|
+
) => Promise<{ result: boolean; exists?: boolean } | boolean>;
|
|
19
|
+
|
|
20
|
+
export type ICalculateStartDate = (
|
|
21
|
+
startDate: DateTime,
|
|
22
|
+
isHighlighted: boolean
|
|
23
|
+
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
24
|
+
|
|
25
|
+
export type ICalculateRPD = (
|
|
26
|
+
requiredProductionDays: number,
|
|
27
|
+
requestedShipDate: DateTime
|
|
28
|
+
) => number;
|
|
29
|
+
|
|
30
|
+
export type ICalculateShipDate = (
|
|
31
|
+
startDate: DateTime,
|
|
32
|
+
limits: ILimit
|
|
33
|
+
) => Promise<DateTime>;
|
|
34
|
+
|
|
35
|
+
export type ICalculateStartDates = (
|
|
36
|
+
summary: string[],
|
|
37
|
+
data: IZapierOrder
|
|
38
|
+
) => Promise<{ entries: IDateEntry[]; shipDate?: DateTime }>;
|
|
39
|
+
|
|
40
|
+
export type IUpdateAllmoxyShipDate = (
|
|
41
|
+
id: string | number,
|
|
42
|
+
shipDate: DateTime,
|
|
43
|
+
userID?: mongoose.Types.ObjectId
|
|
44
|
+
) => void;
|
|
45
|
+
|
|
46
|
+
export type IPopulateDatabase = (
|
|
47
|
+
entries: IDateEntry[],
|
|
48
|
+
requestBody: IZapierOrder
|
|
49
|
+
) => Promise<void>;
|
|
50
|
+
|
|
51
|
+
export type ICreateTotalsEntry = (
|
|
52
|
+
startDate: string,
|
|
53
|
+
dateEntry: IDateEntry
|
|
54
|
+
) => Promise<void>;
|
package/src/IConfig.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export interface IConfig {
|
|
2
|
-
DB_HOST: string;
|
|
3
|
-
DB_PORT: number;
|
|
4
|
-
DB_NAME: string;
|
|
5
|
-
VERSION: string;
|
|
6
|
-
DB_USER?: string;
|
|
7
|
-
DB_PASS?: string;
|
|
8
|
-
DB_URL: string;
|
|
9
|
-
PORT: number;
|
|
10
|
-
NODE_ENV: string;
|
|
11
|
-
}
|
|
1
|
+
export interface IConfig {
|
|
2
|
+
DB_HOST: string;
|
|
3
|
+
DB_PORT: number;
|
|
4
|
+
DB_NAME: string;
|
|
5
|
+
VERSION: string;
|
|
6
|
+
DB_USER?: string;
|
|
7
|
+
DB_PASS?: string;
|
|
8
|
+
DB_URL: string;
|
|
9
|
+
PORT: number;
|
|
10
|
+
NODE_ENV: string;
|
|
11
|
+
}
|
package/src/IDailyTotal.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export type IDailyTotal = ILeanDailyTotal & Document;
|
|
4
|
-
|
|
5
|
-
export interface ILeanDailyTotal {
|
|
6
|
-
_id: string;
|
|
7
|
-
locked: boolean;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export type IDailyTotal = ILeanDailyTotal & Document;
|
|
4
|
+
|
|
5
|
+
export interface ILeanDailyTotal {
|
|
6
|
+
_id: string;
|
|
7
|
+
locked: boolean;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
package/src/IEvent.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { IDateEntryMoved } from "./Events/IDateEntryMoved";
|
|
2
|
-
import { IOrderMoved } from "./Events/IOrderMoved";
|
|
3
|
-
import { IOrderProcessed } from "./Events/IOrderProcessed";
|
|
4
|
-
import { INegativeValue } from "./Events/INegativeValue";
|
|
5
|
-
import mongoose, { Document } from "mongoose";
|
|
6
|
-
|
|
7
|
-
export type IEvent = ILeanEvent & Document;
|
|
8
|
-
|
|
9
|
-
export interface ILeanEvent {
|
|
10
|
-
_id: mongoose.Types.ObjectId;
|
|
11
|
-
time: Date;
|
|
12
|
-
orderID: string;
|
|
13
|
-
companyName: string;
|
|
14
|
-
status: number;
|
|
15
|
-
_type?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface IDateEntryMovedEvent extends Event, IDateEntryMoved {}
|
|
19
|
-
export interface IOrderMovedEvent extends Event, IOrderMoved {}
|
|
20
|
-
export interface IOrderProcessedEvent extends Event, IOrderProcessed {}
|
|
21
|
-
export interface INegativeValueEvent extends Event, INegativeValue {}
|
|
1
|
+
import { IDateEntryMoved } from "./Events/IDateEntryMoved";
|
|
2
|
+
import { IOrderMoved } from "./Events/IOrderMoved";
|
|
3
|
+
import { IOrderProcessed } from "./Events/IOrderProcessed";
|
|
4
|
+
import { INegativeValue } from "./Events/INegativeValue";
|
|
5
|
+
import mongoose, { Document } from "mongoose";
|
|
6
|
+
|
|
7
|
+
export type IEvent = ILeanEvent & Document;
|
|
8
|
+
|
|
9
|
+
export interface ILeanEvent {
|
|
10
|
+
_id: mongoose.Types.ObjectId;
|
|
11
|
+
time: Date;
|
|
12
|
+
orderID: string;
|
|
13
|
+
companyName: string;
|
|
14
|
+
status: number;
|
|
15
|
+
_type?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IDateEntryMovedEvent extends Event, IDateEntryMoved {}
|
|
19
|
+
export interface IOrderMovedEvent extends Event, IOrderMoved {}
|
|
20
|
+
export interface IOrderProcessedEvent extends Event, IOrderProcessed {}
|
|
21
|
+
export interface INegativeValueEvent extends Event, INegativeValue {}
|
package/src/IExporter.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface IHeader {
|
|
4
|
-
name: string;
|
|
5
|
-
defaultValue?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type IExporter = ILeanExporter & Document;
|
|
9
|
-
|
|
10
|
-
export interface ILeanExporter {
|
|
11
|
-
_id: mongoose.Types.ObjectId;
|
|
12
|
-
exporterName: string;
|
|
13
|
-
programDirectory: string;
|
|
14
|
-
preProcessorScript: string;
|
|
15
|
-
emailAddress: string;
|
|
16
|
-
password: string;
|
|
17
|
-
csvGenerator?: IHeader[];
|
|
18
|
-
ignoreEmptyFiles: boolean;
|
|
19
|
-
firstLineHeaders: boolean;
|
|
20
|
-
}
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IHeader {
|
|
4
|
+
name: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type IExporter = ILeanExporter & Document;
|
|
9
|
+
|
|
10
|
+
export interface ILeanExporter {
|
|
11
|
+
_id: mongoose.Types.ObjectId;
|
|
12
|
+
exporterName: string;
|
|
13
|
+
programDirectory: string;
|
|
14
|
+
preProcessorScript: string;
|
|
15
|
+
emailAddress: string;
|
|
16
|
+
password: string;
|
|
17
|
+
csvGenerator?: IHeader[];
|
|
18
|
+
ignoreEmptyFiles: boolean;
|
|
19
|
+
firstLineHeaders: boolean;
|
|
20
|
+
}
|
package/src/IExpress.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Request, Response, NextFunction } from "express";
|
|
2
|
-
|
|
3
|
-
export type IRequestHandler = (
|
|
4
|
-
req: Request,
|
|
5
|
-
res: Response,
|
|
6
|
-
next: NextFunction
|
|
7
|
-
) => void | Promise<any>;
|
|
8
|
-
|
|
9
|
-
export enum IHTTPMethod {
|
|
10
|
-
GET = "get",
|
|
11
|
-
POST = "post",
|
|
12
|
-
PUT = "put",
|
|
13
|
-
DELETE = "delete",
|
|
14
|
-
}
|
|
1
|
+
import { Request, Response, NextFunction } from "express";
|
|
2
|
+
|
|
3
|
+
export type IRequestHandler = (
|
|
4
|
+
req: Request,
|
|
5
|
+
res: Response,
|
|
6
|
+
next: NextFunction
|
|
7
|
+
) => void | Promise<any>;
|
|
8
|
+
|
|
9
|
+
export enum IHTTPMethod {
|
|
10
|
+
GET = "get",
|
|
11
|
+
POST = "post",
|
|
12
|
+
PUT = "put",
|
|
13
|
+
DELETE = "delete",
|
|
14
|
+
}
|
package/src/IIntegration.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export type IIntegration = ILeanIntegration & Document;
|
|
4
|
-
export interface ILeanIntegration {
|
|
5
|
-
_id: mongoose.Types.ObjectId;
|
|
6
|
-
name: string;
|
|
7
|
-
any: any;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ILeanAllmoxyIntegration extends ILeanIntegration {
|
|
11
|
-
connectionInfo: {
|
|
12
|
-
client_id: string;
|
|
13
|
-
client_secret: string;
|
|
14
|
-
contact_key: string;
|
|
15
|
-
url: string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export type IIntegration = ILeanIntegration & Document;
|
|
4
|
+
export interface ILeanIntegration {
|
|
5
|
+
_id: mongoose.Types.ObjectId;
|
|
6
|
+
name: string;
|
|
7
|
+
any: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ILeanAllmoxyIntegration extends ILeanIntegration {
|
|
11
|
+
connectionInfo: {
|
|
12
|
+
client_id: string;
|
|
13
|
+
client_secret: string;
|
|
14
|
+
contact_key: string;
|
|
15
|
+
url: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
package/src/IJWT.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface IJWTToken {
|
|
2
|
-
id: string;
|
|
3
|
-
ip: string;
|
|
4
|
-
}
|
|
1
|
+
export interface IJWTToken {
|
|
2
|
+
id: string;
|
|
3
|
+
ip: string;
|
|
4
|
+
}
|
package/src/IMailCache.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface ILeanMailCache {
|
|
4
|
-
_id?: mongoose.Types.ObjectId;
|
|
5
|
-
time: Date;
|
|
6
|
-
subject: string;
|
|
7
|
-
attachments: IAttachment[];
|
|
8
|
-
saveDir: string;
|
|
9
|
-
state: string;
|
|
10
|
-
logs: string[];
|
|
11
|
-
exporterID: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface IAttachment {
|
|
15
|
-
fileName: string;
|
|
16
|
-
content: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type IMailCache = ILeanMailCache & Document;
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILeanMailCache {
|
|
4
|
+
_id?: mongoose.Types.ObjectId;
|
|
5
|
+
time: Date;
|
|
6
|
+
subject: string;
|
|
7
|
+
attachments: IAttachment[];
|
|
8
|
+
saveDir: string;
|
|
9
|
+
state: string;
|
|
10
|
+
logs: string[];
|
|
11
|
+
exporterID: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IAttachment {
|
|
15
|
+
fileName: string;
|
|
16
|
+
content: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type IMailCache = ILeanMailCache & Document;
|
package/src/INotification.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export type INotification = ILeanNotification & Document;
|
|
4
|
-
export interface ILeanNotification {
|
|
5
|
-
_id: mongoose.Types.ObjectId;
|
|
6
|
-
title: string;
|
|
7
|
-
message: string;
|
|
8
|
-
read: boolean;
|
|
9
|
-
target: mongoose.Types.ObjectId;
|
|
10
|
-
type: "error" | "warning" | "success" | "info";
|
|
11
|
-
}
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export type INotification = ILeanNotification & Document;
|
|
4
|
+
export interface ILeanNotification {
|
|
5
|
+
_id: mongoose.Types.ObjectId;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
read: boolean;
|
|
9
|
+
target: mongoose.Types.ObjectId;
|
|
10
|
+
type: "error" | "warning" | "success" | "info";
|
|
11
|
+
}
|
package/src/IOrder.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface IDateEntry {
|
|
4
|
-
_id: string;
|
|
5
|
-
quantity: number;
|
|
6
|
-
type: string;
|
|
7
|
-
limitsGroup: string;
|
|
8
|
-
startDate: string;
|
|
9
|
-
hasStarted: boolean;
|
|
10
|
-
highlight: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type IOrder = ILeanOrder & Document;
|
|
14
|
-
|
|
15
|
-
export interface ILeanOrder {
|
|
16
|
-
_id: number;
|
|
17
|
-
name?: string;
|
|
18
|
-
companyName: string;
|
|
19
|
-
date?: string;
|
|
20
|
-
shipDate: string;
|
|
21
|
-
requestedShipDate: string;
|
|
22
|
-
companyId?: number;
|
|
23
|
-
summary: string;
|
|
24
|
-
dateEntries: IDateEntry[];
|
|
25
|
-
orderTags: string[];
|
|
26
|
-
companyTags: string[];
|
|
27
|
-
}
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IDateEntry {
|
|
4
|
+
_id: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
type: string;
|
|
7
|
+
limitsGroup: string;
|
|
8
|
+
startDate: string;
|
|
9
|
+
hasStarted: boolean;
|
|
10
|
+
highlight: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type IOrder = ILeanOrder & Document;
|
|
14
|
+
|
|
15
|
+
export interface ILeanOrder {
|
|
16
|
+
_id: number;
|
|
17
|
+
name?: string;
|
|
18
|
+
companyName: string;
|
|
19
|
+
date?: string;
|
|
20
|
+
shipDate: string;
|
|
21
|
+
requestedShipDate: string;
|
|
22
|
+
companyId?: number;
|
|
23
|
+
summary: string;
|
|
24
|
+
dateEntries: IDateEntry[];
|
|
25
|
+
orderTags: string[];
|
|
26
|
+
companyTags: string[];
|
|
27
|
+
}
|
package/src/IScript.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export type IScript = ILeanScript & Document;
|
|
4
|
-
export interface ILeanScript {
|
|
5
|
-
_id: mongoose.Types.ObjectId;
|
|
6
|
-
name: string;
|
|
7
|
-
usage: string;
|
|
8
|
-
language: string;
|
|
9
|
-
parser: "csv2json" | "xml2json";
|
|
10
|
-
}
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export type IScript = ILeanScript & Document;
|
|
4
|
+
export interface ILeanScript {
|
|
5
|
+
_id: mongoose.Types.ObjectId;
|
|
6
|
+
name: string;
|
|
7
|
+
usage: string;
|
|
8
|
+
language: string;
|
|
9
|
+
parser: "csv2json" | "xml2json";
|
|
10
|
+
}
|
package/src/ISetting.ts
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import mongoose, { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface ILeanSetting {
|
|
4
|
-
_id: mongoose.Types.ObjectId;
|
|
5
|
-
modifiedAt: string;
|
|
6
|
-
_type: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ILeanAPIToken extends ILeanSetting {
|
|
10
|
-
name: string;
|
|
11
|
-
token: string;
|
|
12
|
-
permissions: string[];
|
|
13
|
-
expiry: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ILeanGroup extends ILeanSetting {
|
|
17
|
-
name: string;
|
|
18
|
-
permissions: string[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface ILeanHoliday extends ILeanSetting {
|
|
22
|
-
title: string;
|
|
23
|
-
date: string;
|
|
24
|
-
recurring?: boolean;
|
|
25
|
-
recurs?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ILeanLimit extends ILeanSetting {
|
|
29
|
-
name: string;
|
|
30
|
-
rpd: string;
|
|
31
|
-
limit: string;
|
|
32
|
-
enabled: boolean;
|
|
33
|
-
products?: string[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface ILeanOrderFlag extends ILeanSetting {
|
|
37
|
-
name: string;
|
|
38
|
-
highlightColor: string;
|
|
39
|
-
products?: string[];
|
|
40
|
-
tags?: string[];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface ILeanSorting extends ILeanSetting {
|
|
44
|
-
headerList?: string[];
|
|
45
|
-
itemList: string[];
|
|
46
|
-
usage: "totals-groups" | "limits";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ICalculation {
|
|
50
|
-
action: "add" | "subtract";
|
|
51
|
-
source: string;
|
|
52
|
-
calculation: "add" | "subtract" | "current";
|
|
53
|
-
days: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface ILeanTotalsGroup extends ILeanSetting {
|
|
57
|
-
name: string;
|
|
58
|
-
identifier: string;
|
|
59
|
-
calculations?: ICalculation[];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface ILeanKeyValue extends ILeanSetting {
|
|
63
|
-
key: string;
|
|
64
|
-
value: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export type ISetting = ILeanSetting & Document;
|
|
68
|
-
|
|
69
|
-
export type IAPIToken = ILeanAPIToken & Document;
|
|
70
|
-
|
|
71
|
-
export type IGroup = ILeanGroup & Document;
|
|
72
|
-
|
|
73
|
-
export type IHoliday = ILeanHoliday & Document;
|
|
74
|
-
|
|
75
|
-
export type ILimit = ILeanLimit & Document;
|
|
76
|
-
|
|
77
|
-
export type IOrderFlag = ILeanOrderFlag & Document;
|
|
78
|
-
|
|
79
|
-
export type ISorting = ILeanSorting & Document;
|
|
80
|
-
|
|
81
|
-
export type ITotalsGroup = ILeanTotalsGroup & Document;
|
|
82
|
-
|
|
83
|
-
export type IKeyValue = ILeanKeyValue & Document;
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILeanSetting {
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
modifiedAt: string;
|
|
6
|
+
_type: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ILeanAPIToken extends ILeanSetting {
|
|
10
|
+
name: string;
|
|
11
|
+
token: string;
|
|
12
|
+
permissions: string[];
|
|
13
|
+
expiry: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ILeanGroup extends ILeanSetting {
|
|
17
|
+
name: string;
|
|
18
|
+
permissions: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ILeanHoliday extends ILeanSetting {
|
|
22
|
+
title: string;
|
|
23
|
+
date: string;
|
|
24
|
+
recurring?: boolean;
|
|
25
|
+
recurs?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ILeanLimit extends ILeanSetting {
|
|
29
|
+
name: string;
|
|
30
|
+
rpd: string;
|
|
31
|
+
limit: string;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
products?: string[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ILeanOrderFlag extends ILeanSetting {
|
|
37
|
+
name: string;
|
|
38
|
+
highlightColor: string;
|
|
39
|
+
products?: string[];
|
|
40
|
+
tags?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ILeanSorting extends ILeanSetting {
|
|
44
|
+
headerList?: string[];
|
|
45
|
+
itemList: string[];
|
|
46
|
+
usage: "totals-groups" | "limits";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ICalculation {
|
|
50
|
+
action: "add" | "subtract";
|
|
51
|
+
source: string;
|
|
52
|
+
calculation: "add" | "subtract" | "current";
|
|
53
|
+
days: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ILeanTotalsGroup extends ILeanSetting {
|
|
57
|
+
name: string;
|
|
58
|
+
identifier: string;
|
|
59
|
+
calculations?: ICalculation[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ILeanKeyValue extends ILeanSetting {
|
|
63
|
+
key: string;
|
|
64
|
+
value: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ISetting = ILeanSetting & Document;
|
|
68
|
+
|
|
69
|
+
export type IAPIToken = ILeanAPIToken & Document;
|
|
70
|
+
|
|
71
|
+
export type IGroup = ILeanGroup & Document;
|
|
72
|
+
|
|
73
|
+
export type IHoliday = ILeanHoliday & Document;
|
|
74
|
+
|
|
75
|
+
export type ILimit = ILeanLimit & Document;
|
|
76
|
+
|
|
77
|
+
export type IOrderFlag = ILeanOrderFlag & Document;
|
|
78
|
+
|
|
79
|
+
export type ISorting = ILeanSorting & Document;
|
|
80
|
+
|
|
81
|
+
export type ITotalsGroup = ILeanTotalsGroup & Document;
|
|
82
|
+
|
|
83
|
+
export type IKeyValue = ILeanKeyValue & Document;
|