truflow 0.0.154 → 0.0.156
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.
|
@@ -6,5 +6,5 @@ interface IOrderDetails {
|
|
|
6
6
|
}
|
|
7
7
|
export type IOrderMoved = (orderDetails: IOrderDetails, eventData: IMoveOrderEventData) => Promise<string>;
|
|
8
8
|
export type IDateEntryMoved = (orderDetails: IOrderDetails, eventData: IMoveDateEntryEventData) => Promise<string>;
|
|
9
|
-
export type IOrderProcessed = (input: any, message: string, status: "success" | "warning" | "error", order?: IOrder) => Promise<void>;
|
|
9
|
+
export type IOrderProcessed = (input: any, message: string, status: "success" | "warning" | "error", order?: IOrder, error?: any) => Promise<void>;
|
|
10
10
|
export {};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { DateTime } from "luxon";
|
|
26
26
|
import { ILimit } from "../../ISetting";
|
|
27
27
|
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
28
|
-
import { IDateEntry } from "../../IOrder";
|
|
28
|
+
import { IDateEntry, IOrder } from "../../IOrder";
|
|
29
29
|
import mongoose from "mongoose";
|
|
30
30
|
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
31
31
|
export type ICalculateInitialStartDate = (shipDate: DateTime, limits: ILimit) => Promise<{
|
|
@@ -47,5 +47,5 @@ export type ICalculateStartDates = (summary: string[], data: IZapierOrder) => Pr
|
|
|
47
47
|
shipDate?: DateTime;
|
|
48
48
|
}>;
|
|
49
49
|
export type IUpdateAllmoxyShipDate = (id: string | number, shipDate: DateTime, userID?: mongoose.Types.ObjectId) => void;
|
|
50
|
-
export type IPopulateDatabase = (entries: IDateEntry[], requestBody: IZapierOrder) => Promise<
|
|
50
|
+
export type IPopulateDatabase = (entries: IDateEntry[], requestBody: IZapierOrder) => Promise<IOrder>;
|
|
51
51
|
export type ICreateTotalsEntry = (startDate: string, dateEntry: IDateEntry) => Promise<void>;
|
package/package.json
CHANGED
package/src/Helpers/IEvents.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IOrder } from "../IOrder";
|
|
2
|
-
import { IZapierOrder } from "../Routes/IZapierRoutes";
|
|
3
2
|
import { IMoveDateEntryEventData, IMoveOrderEventData } from "./IOrders";
|
|
4
3
|
|
|
5
4
|
interface IOrderDetails {
|
|
@@ -21,5 +20,6 @@ export type IOrderProcessed = (
|
|
|
21
20
|
input: any,
|
|
22
21
|
message: string,
|
|
23
22
|
status: "success" | "warning" | "error",
|
|
24
|
-
order?: IOrder
|
|
23
|
+
order?: IOrder,
|
|
24
|
+
error?: any
|
|
25
25
|
) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DateTime } from "luxon";
|
|
2
2
|
import { ILimit } from "../../ISetting";
|
|
3
3
|
import { IZapierOrder } from "../../Routes/IZapierRoutes";
|
|
4
|
-
import { IDateEntry } from "../../IOrder";
|
|
4
|
+
import { IDateEntry, IOrder } from "../../IOrder";
|
|
5
5
|
import mongoose from "mongoose";
|
|
6
6
|
|
|
7
7
|
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
@@ -46,7 +46,7 @@ export type IUpdateAllmoxyShipDate = (
|
|
|
46
46
|
export type IPopulateDatabase = (
|
|
47
47
|
entries: IDateEntry[],
|
|
48
48
|
requestBody: IZapierOrder
|
|
49
|
-
) => Promise<
|
|
49
|
+
) => Promise<IOrder>;
|
|
50
50
|
|
|
51
51
|
export type ICreateTotalsEntry = (
|
|
52
52
|
startDate: string,
|