rerobe-js-orm 3.1.9 → 3.2.1
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,6 +3,7 @@ export namespace CUSTOMER_NOTIFICATION_TYPES {
|
|
|
3
3
|
const orderCancellation: string;
|
|
4
4
|
const orderRefund: string;
|
|
5
5
|
const orderReadyForPickUp: string;
|
|
6
|
+
const orderComplete: string;
|
|
6
7
|
const shippingConfirmation: string;
|
|
7
8
|
const generalMessage: string;
|
|
8
9
|
const abandonedCart: string;
|
|
@@ -6,6 +6,7 @@ exports.CUSTOMER_NOTIFICATION_TYPES = {
|
|
|
6
6
|
orderCancellation: 'ORDER_CANCELLATION',
|
|
7
7
|
orderRefund: 'ORDER_REFUND',
|
|
8
8
|
orderReadyForPickUp: 'ORDER_READY_FOR_PICK_UP',
|
|
9
|
+
orderComplete: 'ORDER_COMPLETE',
|
|
9
10
|
shippingConfirmation: 'SHIPPING_CONFIRMATION',
|
|
10
11
|
generalMessage: 'GENERAL_MESSAGE',
|
|
11
12
|
abandonedCart: 'ABANDONED_CART',
|
|
@@ -99,8 +99,9 @@ class OrderHelpers {
|
|
|
99
99
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
100
100
|
const orderRefunds = order.refunds ? [...order.refunds] : [];
|
|
101
101
|
const orderFulfillment = order.fulfillments ? [...order.fulfillments] : [];
|
|
102
|
-
const
|
|
103
|
-
const
|
|
102
|
+
const orderLineItems = order.lineItems && Array.isArray(order.lineItems) ? [...order.lineItems] : [];
|
|
103
|
+
const subtotalPrice = Object.assign(Object.assign({}, order.subtotalPrice), { amount: this.getSubtotalPrice(orderLineItems) });
|
|
104
|
+
const subtotalPricePresentment = Object.assign(Object.assign({}, order.subtotalPricePresentment), { amount: this.getAmountSumByField(orderLineItems, 'presentmentTotalPrice') });
|
|
104
105
|
const preparedOrder = {
|
|
105
106
|
documentId: order.documentId || '',
|
|
106
107
|
name: order.name || '',
|
|
@@ -819,4 +819,11 @@ declare type OrderAdjustment = {
|
|
|
819
819
|
totalAdjustmentPrice: Money;
|
|
820
820
|
totalAdjustmentPricePresentment: Money;
|
|
821
821
|
note?: string;
|
|
822
|
+
fieldsChanged?: {
|
|
823
|
+
createdAtTimestamp: number;
|
|
824
|
+
fieldName: string;
|
|
825
|
+
from: any;
|
|
826
|
+
to: any;
|
|
827
|
+
}[];
|
|
828
|
+
type?: 'SHIPPING_TYPE_ADJUSTMENT' | 'SHIPPING_ADDRESS_ADJUSTMENT' | 'CUSTOMER_DETAILS_ADJUSTMENT' | 'ADDITONAL_FEE';
|
|
822
829
|
};
|