truflow 0.0.140 → 0.0.141

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.
Files changed (55) hide show
  1. package/dist/IOrder.d.ts +2 -3
  2. package/package.json +15 -15
  3. package/src/API/Allmoxy/IAnnouncement.ts +41 -41
  4. package/src/API/Allmoxy/ICompany.ts +199 -199
  5. package/src/API/Allmoxy/IGeneric.ts +111 -111
  6. package/src/API/Allmoxy/IInventoryItem.ts +56 -56
  7. package/src/API/Allmoxy/IInventoryOrder.ts +43 -43
  8. package/src/API/Allmoxy/ILocation.ts +19 -19
  9. package/src/API/Allmoxy/IOrder.ts +89 -89
  10. package/src/API/Allmoxy/IOrderProductItems.ts +92 -92
  11. package/src/API/Allmoxy/IOrderProducts.ts +46 -46
  12. package/src/API/Allmoxy/IProduct.ts +88 -88
  13. package/src/API/Allmoxy/IProductAttribute.ts +21 -21
  14. package/src/API/Allmoxy/IProductAttributeOptions.ts +30 -30
  15. package/src/API/Allmoxy/IProductProductAttribute.ts +23 -23
  16. package/src/API/Allmoxy/ITrigger.ts +52 -52
  17. package/src/API/Allmoxy/index.ts +14 -14
  18. package/src/Classes/ICRUDRouter.ts +6 -6
  19. package/src/Classes/ILogger.ts +17 -17
  20. package/src/Events/IDateEntryMoved.ts +13 -13
  21. package/src/Events/INegativeValue.ts +10 -10
  22. package/src/Events/IOrderDetails.ts +12 -12
  23. package/src/Events/IOrderMoved.ts +14 -14
  24. package/src/Events/IOrderProcessed.ts +6 -6
  25. package/src/Helpers/IAdministration.ts +9 -9
  26. package/src/Helpers/IAllmoxy.ts +4 -4
  27. package/src/Helpers/IEvents.ts +23 -23
  28. package/src/Helpers/IExporters.ts +45 -45
  29. package/src/Helpers/IOrders/IMoveDateEntry.ts +21 -21
  30. package/src/Helpers/IOrders/IMoveOrder.ts +28 -28
  31. package/src/Helpers/IOrders/IUpdateFullDailyTotal.ts +13 -13
  32. package/src/Helpers/IOrders/IUpdateIndividualDailyTotal.ts +8 -8
  33. package/src/Helpers/IOrders/index.ts +10 -10
  34. package/src/Helpers/ITotals.ts +16 -16
  35. package/src/Helpers/IZapier/index.ts +54 -54
  36. package/src/IAllmoxy.ts +12 -12
  37. package/src/IConfig.ts +11 -11
  38. package/src/IDailyTotal.ts +9 -9
  39. package/src/IEvent.ts +21 -21
  40. package/src/IExporter.ts +20 -20
  41. package/src/IExpress.ts +14 -14
  42. package/src/IIntegration.ts +30 -30
  43. package/src/IJWT.ts +4 -4
  44. package/src/IMailCache.ts +19 -19
  45. package/src/INotification.ts +11 -11
  46. package/src/IOrder.ts +41 -42
  47. package/src/IScript.ts +10 -10
  48. package/src/ISetting.ts +83 -83
  49. package/src/IUser.ts +13 -13
  50. package/src/IWebsocket.ts +7 -7
  51. package/src/Routes/IOrderRoutes.ts +37 -37
  52. package/src/Routes/IZapierRoutes.ts +12 -12
  53. package/src/Templates/IDailyTotals.ts +4 -4
  54. package/src/index.ts +28 -28
  55. package/tsconfig.json +11 -11
@@ -1,111 +1,111 @@
1
- export interface IAPISection<TData, TResponse> {
2
- get: (params?: Partial<TData>) => Promise<TResponse[]>;
3
- getOne: (id: string, params?: Partial<TData>) => Promise<TResponse>;
4
- add: (data: TData) => Promise<TResponse>;
5
- update: (id: string, data: TData) => Promise<TResponse>;
6
- }
7
-
8
- export interface ICreateAPIInstance {
9
- basePath?: string;
10
- clientId: string;
11
- clientSecret: string;
12
- contactKey: string;
13
- }
14
-
15
- export interface IStatusChangeTrigger {
16
- b2b_shipping: string | null;
17
- b2b_subtotal: string | null;
18
- charge_date: string | null;
19
- company_addresses: {
20
- billing_name: string;
21
- billing_address1: string;
22
- billing_address2: string | null;
23
- billing_address3: string | null;
24
- billing_city: string;
25
- billing_state: string;
26
- billing_zip: string;
27
- billing_country: string;
28
- };
29
- company_contact_email: string | null;
30
- company_contact_name: string;
31
- company_email: string;
32
- company_id: string;
33
- company_name: string;
34
- company_tags: { [key: string]: string };
35
- contact_addresses: any[];
36
- contact_email: string;
37
- contact_name: string;
38
- contact_phone_number_fax: string;
39
- contact_phone_number_home: string;
40
- contact_phone_number_mobile: string;
41
- contact_phone_number_office: string;
42
- contact_phone_number_other: string;
43
- contact_tags: any[];
44
- delivery_date: string;
45
- due_date: string;
46
- entered_date: string;
47
- exported: string;
48
- gst: string;
49
- input_by_name: string;
50
- instance_company_name: string;
51
- instance_url: string;
52
- invoice_date: string;
53
- is_remake: string;
54
- items: {
55
- products: {
56
- product_id: string;
57
- group_id: string;
58
- folder_id: string;
59
- folder_name: string;
60
- status: string;
61
- product_name: string;
62
- product_export_class: string | null;
63
- product_group_data: {
64
- id: string;
65
- current_status: string;
66
- folder_id: string;
67
- [key: string]: any;
68
- };
69
- items: {
70
- line_id: string;
71
- price: string;
72
- completed: string;
73
- qty: string;
74
- data: {
75
- current_status: string;
76
- width: number;
77
- height: number;
78
- [key: string]: any;
79
- };
80
- }[];
81
- }[];
82
- total_products: number;
83
- };
84
- job_status: string;
85
- order_name: string;
86
- order_num: string;
87
- order_total: string;
88
- paid: string;
89
- pst: string;
90
- requested_ship_date: string;
91
- ship_date: string | null;
92
- shipping: string;
93
- shipping_address1: string;
94
- shipping_address2: string;
95
- shipping_address3: string;
96
- shipping_attn: string;
97
- shipping_city: string;
98
- shipping_country: string;
99
- shipping_instructions: string;
100
- shipping_method: string;
101
- shipping_method_id: string;
102
- shipping_method_name: string;
103
- shipping_name: string;
104
- shipping_state: string;
105
- shipping_zip: string;
106
- subtotal: string;
107
- tags: string[];
108
- tax: string;
109
- tax_code: string | null;
110
- total: string;
111
- }
1
+ export interface IAPISection<TData, TResponse> {
2
+ get: (params?: Partial<TData>) => Promise<TResponse[]>;
3
+ getOne: (id: string, params?: Partial<TData>) => Promise<TResponse>;
4
+ add: (data: TData) => Promise<TResponse>;
5
+ update: (id: string, data: TData) => Promise<TResponse>;
6
+ }
7
+
8
+ export interface ICreateAPIInstance {
9
+ basePath?: string;
10
+ clientId: string;
11
+ clientSecret: string;
12
+ contactKey: string;
13
+ }
14
+
15
+ export interface IStatusChangeTrigger {
16
+ b2b_shipping: string | null;
17
+ b2b_subtotal: string | null;
18
+ charge_date: string | null;
19
+ company_addresses: {
20
+ billing_name: string;
21
+ billing_address1: string;
22
+ billing_address2: string | null;
23
+ billing_address3: string | null;
24
+ billing_city: string;
25
+ billing_state: string;
26
+ billing_zip: string;
27
+ billing_country: string;
28
+ };
29
+ company_contact_email: string | null;
30
+ company_contact_name: string;
31
+ company_email: string;
32
+ company_id: string;
33
+ company_name: string;
34
+ company_tags: { [key: string]: string };
35
+ contact_addresses: any[];
36
+ contact_email: string;
37
+ contact_name: string;
38
+ contact_phone_number_fax: string;
39
+ contact_phone_number_home: string;
40
+ contact_phone_number_mobile: string;
41
+ contact_phone_number_office: string;
42
+ contact_phone_number_other: string;
43
+ contact_tags: any[];
44
+ delivery_date: string;
45
+ due_date: string;
46
+ entered_date: string;
47
+ exported: string;
48
+ gst: string;
49
+ input_by_name: string;
50
+ instance_company_name: string;
51
+ instance_url: string;
52
+ invoice_date: string;
53
+ is_remake: string;
54
+ items: {
55
+ products: {
56
+ product_id: string;
57
+ group_id: string;
58
+ folder_id: string;
59
+ folder_name: string;
60
+ status: string;
61
+ product_name: string;
62
+ product_export_class: string | null;
63
+ product_group_data: {
64
+ id: string;
65
+ current_status: string;
66
+ folder_id: string;
67
+ [key: string]: any;
68
+ };
69
+ items: {
70
+ line_id: string;
71
+ price: string;
72
+ completed: string;
73
+ qty: string;
74
+ data: {
75
+ current_status: string;
76
+ width: number;
77
+ height: number;
78
+ [key: string]: any;
79
+ };
80
+ }[];
81
+ }[];
82
+ total_products: number;
83
+ };
84
+ job_status: string;
85
+ order_name: string;
86
+ order_num: string;
87
+ order_total: string;
88
+ paid: string;
89
+ pst: string;
90
+ requested_ship_date: string;
91
+ ship_date: string | null;
92
+ shipping: string;
93
+ shipping_address1: string;
94
+ shipping_address2: string;
95
+ shipping_address3: string;
96
+ shipping_attn: string;
97
+ shipping_city: string;
98
+ shipping_country: string;
99
+ shipping_instructions: string;
100
+ shipping_method: string;
101
+ shipping_method_id: string;
102
+ shipping_method_name: string;
103
+ shipping_name: string;
104
+ shipping_state: string;
105
+ shipping_zip: string;
106
+ subtotal: string;
107
+ tags: string[];
108
+ tax: string;
109
+ tax_code: string | null;
110
+ total: string;
111
+ }
@@ -1,56 +1,56 @@
1
- export interface IInventoryItem {
2
- item_id: number;
3
- line_id: number;
4
- name: string | null;
5
- piece_size: string | null;
6
- picture_filename: string | null;
7
- associate_to_orders: boolean;
8
- available_for_sale: boolean;
9
- allow_b2b: boolean;
10
- showcust: boolean;
11
- auto_checkout: boolean;
12
- sale_name: string | null;
13
- sale_desc: string;
14
- sale_sku: string | null;
15
- sale_price: number | null;
16
- sale_weight: number | null;
17
- sale_allocation: number | null;
18
- sale_price_precision: number;
19
- priority_sort: number | null;
20
- export_class: string | null;
21
- company_exclusive: string | null;
22
- status: number;
23
- }
24
-
25
- export interface IInventoryItemResponse {
26
- item_id: number;
27
- line_id: number;
28
- name: string;
29
- piece_size: string;
30
- picture_filename: string | null;
31
- associate_to_orders: boolean;
32
- available_for_sale: boolean;
33
- allow_b2b: boolean;
34
- showcust: boolean;
35
- auto_checkout: boolean;
36
- sale_name: string | null;
37
- sale_desc: string;
38
- sale_sku: string;
39
- sale_price: number | null;
40
- sale_weight: number | null;
41
- sale_allocation: number | null;
42
- sale_price_precision: number;
43
- priority_sort: number | null;
44
- export_class: string | null;
45
- company_exclusive: string | null;
46
- status: number;
47
- timestamp: string;
48
- createdby: string;
49
- createdbyid: number;
50
- createddate: string;
51
- updatedby: string;
52
- updatedbyid: number;
53
- updateddate: string;
54
- production_line_name: string;
55
- production_line_status: number;
56
- }
1
+ export interface IInventoryItem {
2
+ item_id: number;
3
+ line_id: number;
4
+ name: string | null;
5
+ piece_size: string | null;
6
+ picture_filename: string | null;
7
+ associate_to_orders: boolean;
8
+ available_for_sale: boolean;
9
+ allow_b2b: boolean;
10
+ showcust: boolean;
11
+ auto_checkout: boolean;
12
+ sale_name: string | null;
13
+ sale_desc: string;
14
+ sale_sku: string | null;
15
+ sale_price: number | null;
16
+ sale_weight: number | null;
17
+ sale_allocation: number | null;
18
+ sale_price_precision: number;
19
+ priority_sort: number | null;
20
+ export_class: string | null;
21
+ company_exclusive: string | null;
22
+ status: number;
23
+ }
24
+
25
+ export interface IInventoryItemResponse {
26
+ item_id: number;
27
+ line_id: number;
28
+ name: string;
29
+ piece_size: string;
30
+ picture_filename: string | null;
31
+ associate_to_orders: boolean;
32
+ available_for_sale: boolean;
33
+ allow_b2b: boolean;
34
+ showcust: boolean;
35
+ auto_checkout: boolean;
36
+ sale_name: string | null;
37
+ sale_desc: string;
38
+ sale_sku: string;
39
+ sale_price: number | null;
40
+ sale_weight: number | null;
41
+ sale_allocation: number | null;
42
+ sale_price_precision: number;
43
+ priority_sort: number | null;
44
+ export_class: string | null;
45
+ company_exclusive: string | null;
46
+ status: number;
47
+ timestamp: string;
48
+ createdby: string;
49
+ createdbyid: number;
50
+ createddate: string;
51
+ updatedby: string;
52
+ updatedbyid: number;
53
+ updateddate: string;
54
+ production_line_name: string;
55
+ production_line_status: number;
56
+ }
@@ -1,43 +1,43 @@
1
- export interface IInventoryOrderResponse {
2
- order_id: number;
3
- item_id: number;
4
- po_id: number;
5
- location_id: number;
6
- company_id: number;
7
- part_num: string;
8
- qty: number;
9
- received_qty: number;
10
- price: string;
11
- date_ordered: string;
12
- date_received: string;
13
- void: number;
14
- timestamp: string;
15
- createdby: string;
16
- createdbyid: number;
17
- createddate: string;
18
- updatedby: string;
19
- updatedbyid: number;
20
- updateddate: string;
21
- company_name: string;
22
- company_status: number;
23
- inventory_item_name: string;
24
- inventory_item_piece_size: string;
25
- location_name: string;
26
- location_status: number;
27
- purchase_order_name: string | null;
28
- }
29
-
30
- export interface IInventoryOrder {
31
- order_id: number;
32
- item_id: number | null;
33
- po_id: number | null;
34
- location_id: number | null;
35
- company_id: number;
36
- part_num: string | null;
37
- qty: number | null;
38
- received_qty: number;
39
- price: string | null;
40
- date_ordered: string | null;
41
- date_received: string | null;
42
- void: number;
43
- }
1
+ export interface IInventoryOrderResponse {
2
+ order_id: number;
3
+ item_id: number;
4
+ po_id: number;
5
+ location_id: number;
6
+ company_id: number;
7
+ part_num: string;
8
+ qty: number;
9
+ received_qty: number;
10
+ price: string;
11
+ date_ordered: string;
12
+ date_received: string;
13
+ void: number;
14
+ timestamp: string;
15
+ createdby: string;
16
+ createdbyid: number;
17
+ createddate: string;
18
+ updatedby: string;
19
+ updatedbyid: number;
20
+ updateddate: string;
21
+ company_name: string;
22
+ company_status: number;
23
+ inventory_item_name: string;
24
+ inventory_item_piece_size: string;
25
+ location_name: string;
26
+ location_status: number;
27
+ purchase_order_name: string | null;
28
+ }
29
+
30
+ export interface IInventoryOrder {
31
+ order_id: number;
32
+ item_id: number | null;
33
+ po_id: number | null;
34
+ location_id: number | null;
35
+ company_id: number;
36
+ part_num: string | null;
37
+ qty: number | null;
38
+ received_qty: number;
39
+ price: string | null;
40
+ date_ordered: string | null;
41
+ date_received: string | null;
42
+ void: number;
43
+ }
@@ -1,19 +1,19 @@
1
- export interface ILocationResponse {
2
- location_id: number;
3
- name: string;
4
- display_order: number;
5
- status: number;
6
- timestamp: string;
7
- createdby: string;
8
- createdbyid: number;
9
- createddate: string;
10
- updatedby: string;
11
- updatedbyid: number;
12
- updateddate: string;
13
- }
14
-
15
- export interface ILocation {
16
- name: string | null;
17
- display_order: number | null;
18
- status: number;
19
- }
1
+ export interface ILocationResponse {
2
+ location_id: number;
3
+ name: string;
4
+ display_order: number;
5
+ status: number;
6
+ timestamp: string;
7
+ createdby: string;
8
+ createdbyid: number;
9
+ createddate: string;
10
+ updatedby: string;
11
+ updatedbyid: number;
12
+ updateddate: string;
13
+ }
14
+
15
+ export interface ILocation {
16
+ name: string | null;
17
+ display_order: number | null;
18
+ status: number;
19
+ }
@@ -1,89 +1,89 @@
1
- interface IShippingData {
2
- fq_carrier_name: string;
3
- fq_quote_id: string;
4
- fq_carrier_option_id: string;
5
- fq_shipping_price: number;
6
- }
7
-
8
- interface ISavedPresets {
9
- top_rail_width: number;
10
- double_width: number;
11
- bottom_rail_width: number;
12
- left_stile_width: number;
13
- side_by_side_width: number;
14
- right_stile_width: number;
15
- finish_color: string;
16
- }
17
-
18
- export interface IOrderResponse {
19
- order_id: number;
20
- name: string;
21
- description: string | null;
22
- company_id: number;
23
- contact_id: number;
24
- entered_by_id: number;
25
- order_type: string;
26
- tax_rate: number | null;
27
- tax_rate_override: number | null;
28
- gst_rate: number;
29
- gst_rate_override: number | null;
30
- pst_rate: number;
31
- pst_rate_override: number | null;
32
- shipping: number;
33
- shipping_override: number | null;
34
- profit: number | null;
35
- discount_percent: number | null;
36
- price: number;
37
- b2b_subtotal: number | null;
38
- b2b_shipping: number | null;
39
- entered_date: string;
40
- last_edit_date: string;
41
- last_edit_id: number;
42
- last_edit_ip: string;
43
- start_date: string | null;
44
- finish_date: string | null;
45
- desired_delivery_date: string | null;
46
- actual_delivery_date: string;
47
- billing_name: string;
48
- billing_address1: string;
49
- billing_address2: string | null;
50
- billing_address3: string | null;
51
- billing_city: string;
52
- billing_state: string;
53
- billing_zip: string;
54
- billing_country: string;
55
- shipping_same_as_billing: boolean;
56
- shipping_name: string | null;
57
- shipping_attn: string | null;
58
- shipping_address1: string | null;
59
- shipping_address2: string | null;
60
- shipping_address3: string | null;
61
- shipping_city: string | null;
62
- shipping_state: string | null;
63
- shipping_zip: string | null;
64
- shipping_country: string | null;
65
- shipping_instructions: string | null;
66
- shipping_method: number;
67
- shipping_data: IShippingData;
68
- tracking_data: string | null;
69
- tax_shipping: boolean;
70
- is_remake: number;
71
- b2b_guest: string | null;
72
- b2b_dropship: boolean;
73
- b2b_reseller_agree: boolean;
74
- designer_project_id: string | null;
75
- saved_presets: ISavedPresets;
76
- status: string;
77
- timestamp: string;
78
- createdby: string;
79
- createdbyid: number;
80
- createddate: string;
81
- updatedby: string;
82
- updatedbyid: number;
83
- updateddate: string;
84
- contact_first_name: string;
85
- contact_last_name: string;
86
- company_name: string;
87
- entered_by_first_name: string;
88
- entered_by_last_name: string;
89
- }
1
+ interface IShippingData {
2
+ fq_carrier_name: string;
3
+ fq_quote_id: string;
4
+ fq_carrier_option_id: string;
5
+ fq_shipping_price: number;
6
+ }
7
+
8
+ interface ISavedPresets {
9
+ top_rail_width: number;
10
+ double_width: number;
11
+ bottom_rail_width: number;
12
+ left_stile_width: number;
13
+ side_by_side_width: number;
14
+ right_stile_width: number;
15
+ finish_color: string;
16
+ }
17
+
18
+ export interface IOrderResponse {
19
+ order_id: number;
20
+ name: string;
21
+ description: string | null;
22
+ company_id: number;
23
+ contact_id: number;
24
+ entered_by_id: number;
25
+ order_type: string;
26
+ tax_rate: number | null;
27
+ tax_rate_override: number | null;
28
+ gst_rate: number;
29
+ gst_rate_override: number | null;
30
+ pst_rate: number;
31
+ pst_rate_override: number | null;
32
+ shipping: number;
33
+ shipping_override: number | null;
34
+ profit: number | null;
35
+ discount_percent: number | null;
36
+ price: number;
37
+ b2b_subtotal: number | null;
38
+ b2b_shipping: number | null;
39
+ entered_date: string;
40
+ last_edit_date: string;
41
+ last_edit_id: number;
42
+ last_edit_ip: string;
43
+ start_date: string | null;
44
+ finish_date: string | null;
45
+ desired_delivery_date: string | null;
46
+ actual_delivery_date: string;
47
+ billing_name: string;
48
+ billing_address1: string;
49
+ billing_address2: string | null;
50
+ billing_address3: string | null;
51
+ billing_city: string;
52
+ billing_state: string;
53
+ billing_zip: string;
54
+ billing_country: string;
55
+ shipping_same_as_billing: boolean;
56
+ shipping_name: string | null;
57
+ shipping_attn: string | null;
58
+ shipping_address1: string | null;
59
+ shipping_address2: string | null;
60
+ shipping_address3: string | null;
61
+ shipping_city: string | null;
62
+ shipping_state: string | null;
63
+ shipping_zip: string | null;
64
+ shipping_country: string | null;
65
+ shipping_instructions: string | null;
66
+ shipping_method: number;
67
+ shipping_data: IShippingData;
68
+ tracking_data: string | null;
69
+ tax_shipping: boolean;
70
+ is_remake: number;
71
+ b2b_guest: string | null;
72
+ b2b_dropship: boolean;
73
+ b2b_reseller_agree: boolean;
74
+ designer_project_id: string | null;
75
+ saved_presets: ISavedPresets;
76
+ status: string;
77
+ timestamp: string;
78
+ createdby: string;
79
+ createdbyid: number;
80
+ createddate: string;
81
+ updatedby: string;
82
+ updatedbyid: number;
83
+ updateddate: string;
84
+ contact_first_name: string;
85
+ contact_last_name: string;
86
+ company_name: string;
87
+ entered_by_first_name: string;
88
+ entered_by_last_name: string;
89
+ }