truflow 0.0.103 → 0.0.105
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/IDailyTotal.d.ts +24 -0
- package/dist/IEvent.d.ts +24 -0
- package/dist/IExporter.d.ts +24 -0
- package/dist/IIntegration.d.ts +24 -0
- package/dist/INotification.d.ts +33 -0
- package/dist/INotification.js +2 -0
- package/dist/IOrder.d.ts +24 -0
- package/dist/IScript.d.ts +24 -0
- package/dist/ISetting.d.ts +24 -0
- package/dist/IUser.d.ts +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +15 -15
- 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/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 +52 -52
- package/src/IConfig.ts +11 -11
- package/src/IDailyTotal.ts +9 -9
- package/src/IEvent.ts +21 -21
- package/src/IExporter.ts +43 -43
- package/src/IExpress.ts +14 -14
- package/src/IIntegration.ts +8 -8
- package/src/IJWT.ts +4 -4
- package/src/INotification.ts +10 -0
- 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 +8 -8
- 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 +24 -23
- package/tsconfig.json +11 -11
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ITotalsData } from ".";
|
|
2
|
-
import { IOrder } from "../../IOrder";
|
|
3
|
-
import { IUpdateOrder } from "../../Routes/IOrderRoutes";
|
|
4
|
-
|
|
5
|
-
export interface IMoveDateEntryMoveData {
|
|
6
|
-
type: string;
|
|
7
|
-
quantity: number;
|
|
8
|
-
originalStartDate: string;
|
|
9
|
-
updatedStartDate: string;
|
|
10
|
-
applyToOrder: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IMoveDateEntryEventData {
|
|
14
|
-
moveData: IMoveDateEntryMoveData;
|
|
15
|
-
dailyTotalsData: ITotalsData[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type IMoveDateEntry = (
|
|
19
|
-
data: IUpdateOrder,
|
|
20
|
-
order: IOrder
|
|
21
|
-
) => Promise<{ eventData: IMoveDateEntryEventData; updatedOrder: IOrder }>;
|
|
1
|
+
import { ITotalsData } from ".";
|
|
2
|
+
import { IOrder } from "../../IOrder";
|
|
3
|
+
import { IUpdateOrder } from "../../Routes/IOrderRoutes";
|
|
4
|
+
|
|
5
|
+
export interface IMoveDateEntryMoveData {
|
|
6
|
+
type: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
originalStartDate: string;
|
|
9
|
+
updatedStartDate: string;
|
|
10
|
+
applyToOrder: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IMoveDateEntryEventData {
|
|
14
|
+
moveData: IMoveDateEntryMoveData;
|
|
15
|
+
dailyTotalsData: ITotalsData[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type IMoveDateEntry = (
|
|
19
|
+
data: IUpdateOrder,
|
|
20
|
+
order: IOrder
|
|
21
|
+
) => Promise<{ eventData: IMoveDateEntryEventData; updatedOrder: IOrder }>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { IOrder } from "../../IOrder";
|
|
2
|
-
import { IUpdateOrder } from "../../Routes/IOrderRoutes";
|
|
3
|
-
import { IUpdateFullDailyTotalReturnData } from "./IUpdateFullDailyTotal";
|
|
4
|
-
|
|
5
|
-
export interface IMoveOrderTotalsData {
|
|
6
|
-
startDate: string;
|
|
7
|
-
updatedStartDate: string;
|
|
8
|
-
entries: {
|
|
9
|
-
limitsGroup: string;
|
|
10
|
-
quantity: number;
|
|
11
|
-
}[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface IMoveOrderEventData {
|
|
15
|
-
moveData: {
|
|
16
|
-
types: string[];
|
|
17
|
-
quantity: number;
|
|
18
|
-
originalStartDates: string[];
|
|
19
|
-
updatedStartDate: string;
|
|
20
|
-
applyToOrder: boolean;
|
|
21
|
-
};
|
|
22
|
-
dailyTotalsData: IUpdateFullDailyTotalReturnData[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type IMoveOrder = (
|
|
26
|
-
data: IUpdateOrder,
|
|
27
|
-
order: IOrder
|
|
28
|
-
) => Promise<{ eventData: IMoveOrderEventData; updatedOrder: IOrder }>;
|
|
1
|
+
import { IOrder } from "../../IOrder";
|
|
2
|
+
import { IUpdateOrder } from "../../Routes/IOrderRoutes";
|
|
3
|
+
import { IUpdateFullDailyTotalReturnData } from "./IUpdateFullDailyTotal";
|
|
4
|
+
|
|
5
|
+
export interface IMoveOrderTotalsData {
|
|
6
|
+
startDate: string;
|
|
7
|
+
updatedStartDate: string;
|
|
8
|
+
entries: {
|
|
9
|
+
limitsGroup: string;
|
|
10
|
+
quantity: number;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IMoveOrderEventData {
|
|
15
|
+
moveData: {
|
|
16
|
+
types: string[];
|
|
17
|
+
quantity: number;
|
|
18
|
+
originalStartDates: string[];
|
|
19
|
+
updatedStartDate: string;
|
|
20
|
+
applyToOrder: boolean;
|
|
21
|
+
};
|
|
22
|
+
dailyTotalsData: IUpdateFullDailyTotalReturnData[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type IMoveOrder = (
|
|
26
|
+
data: IUpdateOrder,
|
|
27
|
+
order: IOrder
|
|
28
|
+
) => Promise<{ eventData: IMoveOrderEventData; updatedOrder: IOrder }>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IOrder } from "../../IOrder";
|
|
2
|
-
import { IMoveOrderTotalsData, ITotalsData } from ".";
|
|
3
|
-
|
|
4
|
-
export interface IUpdateFullDailyTotalReturnData {
|
|
5
|
-
oldStartDate: string;
|
|
6
|
-
updatedStartDate: string;
|
|
7
|
-
totalsData: ITotalsData[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type IUpdateFullDailyTotal = (
|
|
11
|
-
data: IMoveOrderTotalsData,
|
|
12
|
-
order: IOrder
|
|
13
|
-
) => Promise<IUpdateFullDailyTotalReturnData>;
|
|
1
|
+
import { IOrder } from "../../IOrder";
|
|
2
|
+
import { IMoveOrderTotalsData, ITotalsData } from ".";
|
|
3
|
+
|
|
4
|
+
export interface IUpdateFullDailyTotalReturnData {
|
|
5
|
+
oldStartDate: string;
|
|
6
|
+
updatedStartDate: string;
|
|
7
|
+
totalsData: ITotalsData[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type IUpdateFullDailyTotal = (
|
|
11
|
+
data: IMoveOrderTotalsData,
|
|
12
|
+
order: IOrder
|
|
13
|
+
) => Promise<IUpdateFullDailyTotalReturnData>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ITotalsData } from ".";
|
|
2
|
-
import { IDateEntry, IOrder } from "../../IOrder";
|
|
3
|
-
|
|
4
|
-
export type IUpdateIndividualDailyTotal = (
|
|
5
|
-
originalStartDate: string,
|
|
6
|
-
data: IDateEntry,
|
|
7
|
-
order: IOrder
|
|
8
|
-
) => Promise<ITotalsData[]>;
|
|
1
|
+
import { ITotalsData } from ".";
|
|
2
|
+
import { IDateEntry, IOrder } from "../../IOrder";
|
|
3
|
+
|
|
4
|
+
export type IUpdateIndividualDailyTotal = (
|
|
5
|
+
originalStartDate: string,
|
|
6
|
+
data: IDateEntry,
|
|
7
|
+
order: IOrder
|
|
8
|
+
) => Promise<ITotalsData[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ILeanDailyTotal } from "../../IDailyTotal";
|
|
2
|
-
|
|
3
|
-
export interface ITotalsData extends ILeanDailyTotal {
|
|
4
|
-
position: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export * from "./IMoveDateEntry";
|
|
8
|
-
export * from "./IMoveOrder";
|
|
9
|
-
export * from "./IUpdateFullDailyTotal";
|
|
10
|
-
export * from "./IUpdateIndividualDailyTotal";
|
|
1
|
+
import { ILeanDailyTotal } from "../../IDailyTotal";
|
|
2
|
+
|
|
3
|
+
export interface ITotalsData extends ILeanDailyTotal {
|
|
4
|
+
position: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export * from "./IMoveDateEntry";
|
|
8
|
+
export * from "./IMoveOrder";
|
|
9
|
+
export * from "./IUpdateFullDailyTotal";
|
|
10
|
+
export * from "./IUpdateIndividualDailyTotal";
|
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,52 +1,52 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
|
-
import { ILimit } from "../../ISetting";
|
|
3
|
-
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
4
|
-
import { IDateEntry } from "../../IOrder";
|
|
5
|
-
|
|
6
|
-
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
7
|
-
|
|
8
|
-
export type ICalculateInitialStartDate = (
|
|
9
|
-
shipDate: DateTime,
|
|
10
|
-
limits: ILimit
|
|
11
|
-
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
12
|
-
|
|
13
|
-
export type ICheckDailyTotals = (
|
|
14
|
-
date: string,
|
|
15
|
-
quantity: number,
|
|
16
|
-
limitData: ILimit
|
|
17
|
-
) => Promise<{ result: boolean; exists?: boolean } | boolean>;
|
|
18
|
-
|
|
19
|
-
export type ICalculateStartDate = (
|
|
20
|
-
startDate: DateTime,
|
|
21
|
-
isHighlighted: boolean
|
|
22
|
-
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
23
|
-
|
|
24
|
-
export type ICalculateRPD = (
|
|
25
|
-
requiredProductionDays: number,
|
|
26
|
-
requestedShipDate: DateTime
|
|
27
|
-
) => number;
|
|
28
|
-
|
|
29
|
-
export type ICalculateShipDate = (
|
|
30
|
-
startDate: DateTime,
|
|
31
|
-
limits: ILimit
|
|
32
|
-
) => Promise<DateTime>;
|
|
33
|
-
|
|
34
|
-
export type ICalculateStartDates = (
|
|
35
|
-
summary: string[],
|
|
36
|
-
data: IZapierOrder
|
|
37
|
-
) => Promise<{ entries: IDateEntry[]; shipDate?: DateTime }>;
|
|
38
|
-
|
|
39
|
-
export type IUpdateAllmoxyShipDate = (
|
|
40
|
-
id: string | number,
|
|
41
|
-
shipDate: DateTime
|
|
42
|
-
) => Promise<void>;
|
|
43
|
-
|
|
44
|
-
export type IPopulateDatabase = (
|
|
45
|
-
entries: IDateEntry[],
|
|
46
|
-
requestBody: IZapierOrder
|
|
47
|
-
) => Promise<void>;
|
|
48
|
-
|
|
49
|
-
export type ICreateTotalsEntry = (
|
|
50
|
-
startDate: string,
|
|
51
|
-
dateEntry: IDateEntry
|
|
52
|
-
) => Promise<void>;
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import { ILimit } from "../../ISetting";
|
|
3
|
+
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
4
|
+
import { IDateEntry } from "../../IOrder";
|
|
5
|
+
|
|
6
|
+
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
7
|
+
|
|
8
|
+
export type ICalculateInitialStartDate = (
|
|
9
|
+
shipDate: DateTime,
|
|
10
|
+
limits: ILimit
|
|
11
|
+
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
12
|
+
|
|
13
|
+
export type ICheckDailyTotals = (
|
|
14
|
+
date: string,
|
|
15
|
+
quantity: number,
|
|
16
|
+
limitData: ILimit
|
|
17
|
+
) => Promise<{ result: boolean; exists?: boolean } | boolean>;
|
|
18
|
+
|
|
19
|
+
export type ICalculateStartDate = (
|
|
20
|
+
startDate: DateTime,
|
|
21
|
+
isHighlighted: boolean
|
|
22
|
+
) => Promise<{ startDate: DateTime; isHighlighted: boolean }>;
|
|
23
|
+
|
|
24
|
+
export type ICalculateRPD = (
|
|
25
|
+
requiredProductionDays: number,
|
|
26
|
+
requestedShipDate: DateTime
|
|
27
|
+
) => number;
|
|
28
|
+
|
|
29
|
+
export type ICalculateShipDate = (
|
|
30
|
+
startDate: DateTime,
|
|
31
|
+
limits: ILimit
|
|
32
|
+
) => Promise<DateTime>;
|
|
33
|
+
|
|
34
|
+
export type ICalculateStartDates = (
|
|
35
|
+
summary: string[],
|
|
36
|
+
data: IZapierOrder
|
|
37
|
+
) => Promise<{ entries: IDateEntry[]; shipDate?: DateTime }>;
|
|
38
|
+
|
|
39
|
+
export type IUpdateAllmoxyShipDate = (
|
|
40
|
+
id: string | number,
|
|
41
|
+
shipDate: DateTime
|
|
42
|
+
) => Promise<void>;
|
|
43
|
+
|
|
44
|
+
export type IPopulateDatabase = (
|
|
45
|
+
entries: IDateEntry[],
|
|
46
|
+
requestBody: IZapierOrder
|
|
47
|
+
) => Promise<void>;
|
|
48
|
+
|
|
49
|
+
export type ICreateTotalsEntry = (
|
|
50
|
+
startDate: string,
|
|
51
|
+
dateEntry: IDateEntry
|
|
52
|
+
) => 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,43 +1,43 @@
|
|
|
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
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IAttachment {
|
|
23
|
-
fileName: string;
|
|
24
|
-
content: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IMailCacheObject {
|
|
28
|
-
_id?: mongoose.Types.ObjectId;
|
|
29
|
-
time: Date;
|
|
30
|
-
subject: string;
|
|
31
|
-
attachments: IAttachment[];
|
|
32
|
-
saveDir: string;
|
|
33
|
-
state: string;
|
|
34
|
-
logs: string[];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type IMailCache = ILeanMailCache & Document;
|
|
38
|
-
|
|
39
|
-
export interface ILeanMailCache {
|
|
40
|
-
_id: mongoose.Types.ObjectId;
|
|
41
|
-
exporterID?: string;
|
|
42
|
-
mailCache?: IMailCacheObject[];
|
|
43
|
-
}
|
|
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
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IAttachment {
|
|
23
|
+
fileName: string;
|
|
24
|
+
content: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IMailCacheObject {
|
|
28
|
+
_id?: mongoose.Types.ObjectId;
|
|
29
|
+
time: Date;
|
|
30
|
+
subject: string;
|
|
31
|
+
attachments: IAttachment[];
|
|
32
|
+
saveDir: string;
|
|
33
|
+
state: string;
|
|
34
|
+
logs: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type IMailCache = ILeanMailCache & Document;
|
|
38
|
+
|
|
39
|
+
export interface ILeanMailCache {
|
|
40
|
+
_id: mongoose.Types.ObjectId;
|
|
41
|
+
exporterID?: string;
|
|
42
|
+
mailCache?: IMailCacheObject[];
|
|
43
|
+
}
|
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,8 +1,8 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
date: string;
|
|
9
|
+
target?: mongoose.Types.ObjectId;
|
|
10
|
+
}
|
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
|
+
}
|