truflow 0.0.140 → 0.0.142
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/IAllmoxy.d.ts +2 -2
- package/dist/IOrder.d.ts +2 -3
- 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 +111 -111
- 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/IOrderProductItems.ts +92 -92
- package/src/API/Allmoxy/IOrderProducts.ts +46 -46
- package/src/API/Allmoxy/IProduct.ts +88 -88
- package/src/API/Allmoxy/IProductAttribute.ts +21 -21
- package/src/API/Allmoxy/IProductAttributeOptions.ts +30 -30
- package/src/API/Allmoxy/IProductProductAttribute.ts +23 -23
- package/src/API/Allmoxy/ITrigger.ts +52 -52
- package/src/API/Allmoxy/index.ts +14 -14
- 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/IAllmoxy.ts +12 -12
- 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 +30 -30
- package/src/IJWT.ts +4 -4
- package/src/IMailCache.ts +19 -19
- package/src/INotification.ts +11 -11
- package/src/IOrder.ts +41 -42
- 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 +28 -28
- 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/IAllmoxy.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface ILeanSavedAttribute {
|
|
4
|
-
|
|
5
|
-
attributeId: number;
|
|
6
|
-
attributeName: string;
|
|
7
|
-
productId: number;
|
|
8
|
-
displayName: string;
|
|
9
|
-
displayOn: [string];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type ISavedAttribute = ILeanSavedAttribute & Document;
|
|
1
|
+
import { Document, ObjectId } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILeanSavedAttribute {
|
|
4
|
+
_id: ObjectId;
|
|
5
|
+
attributeId: number;
|
|
6
|
+
attributeName: string;
|
|
7
|
+
productId: number;
|
|
8
|
+
displayName: string;
|
|
9
|
+
displayOn: [string];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ISavedAttribute = ILeanSavedAttribute & Document;
|
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,30 +1,30 @@
|
|
|
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
|
-
basePath: string;
|
|
13
|
-
clientId: string;
|
|
14
|
-
clientSecret: string;
|
|
15
|
-
contactKey: string;
|
|
16
|
-
};
|
|
17
|
-
settings: {
|
|
18
|
-
loadOrdersFromAPI?: boolean;
|
|
19
|
-
saveSelectedAttributesInOrder?: boolean;
|
|
20
|
-
webhook?: {
|
|
21
|
-
id: string;
|
|
22
|
-
url: string;
|
|
23
|
-
event: string;
|
|
24
|
-
condition: string;
|
|
25
|
-
authToken: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type IAllmoxyIntegration = ILeanAllmoxyIntegration & Document;
|
|
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
|
+
basePath: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
clientSecret: string;
|
|
15
|
+
contactKey: string;
|
|
16
|
+
};
|
|
17
|
+
settings: {
|
|
18
|
+
loadOrdersFromAPI?: boolean;
|
|
19
|
+
saveSelectedAttributesInOrder?: boolean;
|
|
20
|
+
webhook?: {
|
|
21
|
+
id: string;
|
|
22
|
+
url: string;
|
|
23
|
+
event: string;
|
|
24
|
+
condition: string;
|
|
25
|
+
authToken: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type IAllmoxyIntegration = ILeanAllmoxyIntegration & Document;
|
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,42 +1,41 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface IProductAttribute {
|
|
4
|
-
attributeId: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IProductAttribute {
|
|
4
|
+
attributeId: number;
|
|
5
|
+
value: string;
|
|
6
|
+
savedAttributeId: Types.ObjectId;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IAllmoxyData {
|
|
10
|
+
groupId?: number;
|
|
11
|
+
opId?: number;
|
|
12
|
+
opiId?: number;
|
|
13
|
+
productAttributes?: IProductAttribute[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IDateEntry {
|
|
17
|
+
_id: string;
|
|
18
|
+
quantity: number;
|
|
19
|
+
type: string;
|
|
20
|
+
limitsGroup: string;
|
|
21
|
+
startDate: string;
|
|
22
|
+
hasStarted: boolean;
|
|
23
|
+
highlight: boolean;
|
|
24
|
+
allmoxyData?: IAllmoxyData;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type IOrder = ILeanOrder & Document;
|
|
28
|
+
|
|
29
|
+
export interface ILeanOrder {
|
|
30
|
+
_id: number;
|
|
31
|
+
name?: string;
|
|
32
|
+
companyName: string;
|
|
33
|
+
date?: string;
|
|
34
|
+
shipDate: string;
|
|
35
|
+
requestedShipDate: string;
|
|
36
|
+
companyId?: number;
|
|
37
|
+
summary?: string;
|
|
38
|
+
dateEntries: IDateEntry[];
|
|
39
|
+
orderTags: string[];
|
|
40
|
+
companyTags: string[];
|
|
41
|
+
}
|
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
|
+
}
|