truflow 0.0.170 → 0.0.171
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/IOrderProductItems.d.ts +1 -12
- package/dist/Helpers/IOrders/IUpdateIndividualDailyTotal.d.ts +2 -2
- package/dist/Helpers/IZapier/index.d.ts +4 -4
- package/dist/IAllmoxy.d.ts +1 -1
- package/dist/IOrder.d.ts +20 -4
- package/package.json +1 -1
- package/src/API/Allmoxy/IOrderProductItems.ts +1 -12
- package/src/Helpers/IOrders/IUpdateIndividualDailyTotal.ts +2 -2
- package/src/Helpers/IZapier/index.ts +4 -4
- package/src/IAllmoxy.ts +1 -1
- package/src/IOrder.ts +22 -4
|
@@ -15,18 +15,7 @@ export interface IOrderProductItemsResponse {
|
|
|
15
15
|
op_id: number;
|
|
16
16
|
line_id: number | null;
|
|
17
17
|
data: {
|
|
18
|
-
|
|
19
|
-
is_dirty: string;
|
|
20
|
-
discount_is_dirty: string;
|
|
21
|
-
current_discount: string;
|
|
22
|
-
onload_discount: string;
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
cabinet_number: string;
|
|
26
|
-
hinge_drilling: string;
|
|
27
|
-
op3: string;
|
|
28
|
-
custom_info: string;
|
|
29
|
-
price_onload: string;
|
|
18
|
+
[key: string]: any;
|
|
30
19
|
};
|
|
31
20
|
part_data: {
|
|
32
21
|
[key: string]: any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITotalsData } from ".";
|
|
2
|
-
import {
|
|
3
|
-
export type IUpdateIndividualDailyTotal = (originalStartDate: string, data:
|
|
2
|
+
import { IOrderProduct, IOrder } from "../../IOrder";
|
|
3
|
+
export type IUpdateIndividualDailyTotal = (originalStartDate: string, data: IOrderProduct, order: IOrder) => Promise<ITotalsData[]>;
|
|
@@ -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 {
|
|
28
|
+
import { IOrderProduct, 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<{
|
|
@@ -43,9 +43,9 @@ export type ICalculateStartDate = (startDate: DateTime, isHighlighted: boolean)
|
|
|
43
43
|
export type ICalculateRPD = (requiredProductionDays: number, requestedShipDate: DateTime) => number;
|
|
44
44
|
export type ICalculateShipDate = (startDate: DateTime, limits: ILimit) => Promise<DateTime>;
|
|
45
45
|
export type ICalculateStartDates = (summary: string[], data: IZapierOrder) => Promise<{
|
|
46
|
-
entries:
|
|
46
|
+
entries: IOrderProduct[];
|
|
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:
|
|
51
|
-
export type ICreateTotalsEntry = (startDate: string, dateEntry:
|
|
50
|
+
export type IPopulateDatabase = (entries: IOrderProduct[], requestBody: IZapierOrder) => Promise<IOrder>;
|
|
51
|
+
export type ICreateTotalsEntry = (startDate: string, dateEntry: IOrderProduct) => Promise<void>;
|
package/dist/IAllmoxy.d.ts
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Document } from "mongoose";
|
|
26
26
|
export interface ILeanSavedAttribute {
|
|
27
|
-
attributeId: number;
|
|
28
27
|
attributeName: string;
|
|
29
28
|
productId: number;
|
|
30
29
|
displayName: string;
|
|
31
30
|
displayOn: [string];
|
|
31
|
+
showForAllProducts: boolean;
|
|
32
32
|
}
|
|
33
33
|
export type ISavedAttribute = ILeanSavedAttribute & Document;
|
package/dist/IOrder.d.ts
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Document } from "mongoose";
|
|
26
26
|
export interface IProductAttribute {
|
|
27
|
-
|
|
28
|
-
value: string;
|
|
27
|
+
attributeName: string;
|
|
28
|
+
value: string | number;
|
|
29
29
|
}
|
|
30
30
|
export interface IAllmoxyData {
|
|
31
31
|
groupId?: number;
|
|
@@ -33,8 +33,17 @@ export interface IAllmoxyData {
|
|
|
33
33
|
opiId?: number;
|
|
34
34
|
productId: number;
|
|
35
35
|
productAttributes?: IProductAttribute[];
|
|
36
|
+
lineItems?: ILineItem[];
|
|
36
37
|
}
|
|
37
|
-
export interface
|
|
38
|
+
export interface ILineItem {
|
|
39
|
+
id: number;
|
|
40
|
+
quantity: number;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
attributes: IProductAttribute[];
|
|
44
|
+
measurements?: IMeasurement[];
|
|
45
|
+
}
|
|
46
|
+
export interface IOrderProduct {
|
|
38
47
|
_id: string;
|
|
39
48
|
quantity: number;
|
|
40
49
|
type: string;
|
|
@@ -54,8 +63,15 @@ export interface ILeanOrder {
|
|
|
54
63
|
requestedShipDate: string;
|
|
55
64
|
companyId?: number;
|
|
56
65
|
summary?: string;
|
|
57
|
-
|
|
66
|
+
orderProducts: IOrderProduct[];
|
|
58
67
|
orderTags: string[];
|
|
59
68
|
companyTags: string[];
|
|
60
69
|
status: string;
|
|
61
70
|
}
|
|
71
|
+
export interface IMeasurement {
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
angle: number;
|
|
75
|
+
outOfSquare: number;
|
|
76
|
+
comments: string;
|
|
77
|
+
}
|
package/package.json
CHANGED
|
@@ -16,18 +16,7 @@ export interface IOrderProductItemsResponse {
|
|
|
16
16
|
op_id: number;
|
|
17
17
|
line_id: number | null;
|
|
18
18
|
data: {
|
|
19
|
-
|
|
20
|
-
is_dirty: string;
|
|
21
|
-
discount_is_dirty: string;
|
|
22
|
-
current_discount: string;
|
|
23
|
-
onload_discount: string;
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
cabinet_number: string;
|
|
27
|
-
hinge_drilling: string;
|
|
28
|
-
op3: string;
|
|
29
|
-
custom_info: string;
|
|
30
|
-
price_onload: string;
|
|
19
|
+
[key: string]: any;
|
|
31
20
|
};
|
|
32
21
|
part_data: {
|
|
33
22
|
[key: string]: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ITotalsData } from ".";
|
|
2
|
-
import {
|
|
2
|
+
import { IOrderProduct, IOrder } from "../../IOrder";
|
|
3
3
|
|
|
4
4
|
export type IUpdateIndividualDailyTotal = (
|
|
5
5
|
originalStartDate: string,
|
|
6
|
-
data:
|
|
6
|
+
data: IOrderProduct,
|
|
7
7
|
order: IOrder
|
|
8
8
|
) => Promise<ITotalsData[]>;
|
|
@@ -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 {
|
|
4
|
+
import { IOrderProduct, IOrder } from "../../IOrder";
|
|
5
5
|
import mongoose from "mongoose";
|
|
6
6
|
|
|
7
7
|
export type IFetchLimits = (type: string) => Promise<ILimit>;
|
|
@@ -35,7 +35,7 @@ export type ICalculateShipDate = (
|
|
|
35
35
|
export type ICalculateStartDates = (
|
|
36
36
|
summary: string[],
|
|
37
37
|
data: IZapierOrder
|
|
38
|
-
) => Promise<{ entries:
|
|
38
|
+
) => Promise<{ entries: IOrderProduct[]; shipDate?: DateTime }>;
|
|
39
39
|
|
|
40
40
|
export type IUpdateAllmoxyShipDate = (
|
|
41
41
|
id: string | number,
|
|
@@ -44,11 +44,11 @@ export type IUpdateAllmoxyShipDate = (
|
|
|
44
44
|
) => void;
|
|
45
45
|
|
|
46
46
|
export type IPopulateDatabase = (
|
|
47
|
-
entries:
|
|
47
|
+
entries: IOrderProduct[],
|
|
48
48
|
requestBody: IZapierOrder
|
|
49
49
|
) => Promise<IOrder>;
|
|
50
50
|
|
|
51
51
|
export type ICreateTotalsEntry = (
|
|
52
52
|
startDate: string,
|
|
53
|
-
dateEntry:
|
|
53
|
+
dateEntry: IOrderProduct
|
|
54
54
|
) => Promise<void>;
|
package/src/IAllmoxy.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
|
|
3
3
|
export interface ILeanSavedAttribute {
|
|
4
|
-
attributeId: number;
|
|
5
4
|
attributeName: string;
|
|
6
5
|
productId: number;
|
|
7
6
|
displayName: string;
|
|
8
7
|
displayOn: [string];
|
|
8
|
+
showForAllProducts: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export type ISavedAttribute = ILeanSavedAttribute & Document;
|
package/src/IOrder.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Document, Types } from "mongoose";
|
|
2
2
|
|
|
3
3
|
export interface IProductAttribute {
|
|
4
|
-
|
|
5
|
-
value: string;
|
|
4
|
+
attributeName: string;
|
|
5
|
+
value: string | number;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface IAllmoxyData {
|
|
@@ -11,9 +11,19 @@ export interface IAllmoxyData {
|
|
|
11
11
|
opiId?: number;
|
|
12
12
|
productId: number;
|
|
13
13
|
productAttributes?: IProductAttribute[];
|
|
14
|
+
lineItems?: ILineItem[];
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export interface
|
|
17
|
+
export interface ILineItem {
|
|
18
|
+
id: number;
|
|
19
|
+
quantity: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
attributes: IProductAttribute[];
|
|
23
|
+
measurements?: IMeasurement[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IOrderProduct {
|
|
17
27
|
_id: string;
|
|
18
28
|
quantity: number;
|
|
19
29
|
type: string;
|
|
@@ -35,8 +45,16 @@ export interface ILeanOrder {
|
|
|
35
45
|
requestedShipDate: string;
|
|
36
46
|
companyId?: number;
|
|
37
47
|
summary?: string;
|
|
38
|
-
|
|
48
|
+
orderProducts: IOrderProduct[];
|
|
39
49
|
orderTags: string[];
|
|
40
50
|
companyTags: string[];
|
|
41
51
|
status: string;
|
|
42
52
|
}
|
|
53
|
+
|
|
54
|
+
export interface IMeasurement {
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
angle: number;
|
|
58
|
+
outOfSquare: number;
|
|
59
|
+
comments: string;
|
|
60
|
+
}
|