truflow 0.0.155 → 0.0.157

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.
@@ -3,4 +3,5 @@ export interface IOrderProcessed {
3
3
  input: any;
4
4
  createdOrder?: IOrder;
5
5
  message: string;
6
+ source: "allmoxy" | "zapier";
6
7
  }
@@ -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, error?: any) => Promise<void>;
9
+ export type IOrderProcessed = (input: any, message: string, status: "success" | "warning" | "error", source: "allmoxy" | "zapier", 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<void>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truflow",
3
- "version": "0.0.155",
3
+ "version": "0.0.157",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -4,4 +4,5 @@ export interface IOrderProcessed {
4
4
  input: any;
5
5
  createdOrder?: IOrder;
6
6
  message: string;
7
+ source: "allmoxy" | "zapier";
7
8
  }
@@ -20,6 +20,7 @@ export type IOrderProcessed = (
20
20
  input: any,
21
21
  message: string,
22
22
  status: "success" | "warning" | "error",
23
+ source: "allmoxy" | "zapier",
23
24
  order?: IOrder,
24
25
  error?: any
25
26
  ) => 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<void>;
49
+ ) => Promise<IOrder>;
50
50
 
51
51
  export type ICreateTotalsEntry = (
52
52
  startDate: string,