rerobe-js-orm 2.9.8 → 3.0.2

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.
@@ -5,24 +5,24 @@ const Order_1 = require("../../models/Order");
5
5
  const order_constants_1 = require("../../constants/order-constants");
6
6
  class OrderFromFormState extends OrderFactory_1.default {
7
7
  createOrder(fs) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
9
9
  const currencyCode = fs.fields.currencyCode.inputValue || 'SEK';
10
10
  const customer = fs.fields.customer.selectedValue || {};
11
11
  const customerAttr = {
12
- userId: (customer === null || customer === void 0 ? void 0 : customer.uid) || '',
13
- customerName: ((_a = fs.props) === null || _a === void 0 ? void 0 : _a.customerName) || `${fs.fields.firstName.inputValue} ${fs.fields.lastName.inputValue}`.trim(),
12
+ userId: (customer === null || customer === void 0 ? void 0 : customer.uid) || (customer === null || customer === void 0 ? void 0 : customer.documentId) || '',
13
+ customerName: `${fs.fields.firstName.inputValue} ${fs.fields.lastName.inputValue}`.trim(),
14
14
  email: fs.fields.email.inputValue || '',
15
15
  phone: fs.fields.phone.inputValue || '',
16
- customerUrl: ((_b = fs.props) === null || _b === void 0 ? void 0 : _b.customerUrl) || '',
16
+ customerUrl: ((_a = fs.props) === null || _a === void 0 ? void 0 : _a.customerUrl) || '',
17
17
  };
18
18
  const discountsAttr = {
19
19
  appliedDiscount: {
20
- amount: ((_c = fs.fields) === null || _c === void 0 ? void 0 : _c.totalDiscount.inputValue) || 0,
21
- value: ((_d = fs.fields) === null || _d === void 0 ? void 0 : _d.totalDiscount.inputValue) || 0,
22
- title: fs.fields.presentmentData.selectedValue.discountTitlePresentment || ((_e = fs.fields) === null || _e === void 0 ? void 0 : _e.discountTitle.inputValue) || '',
20
+ amount: ((_b = fs.fields) === null || _b === void 0 ? void 0 : _b.totalDiscount.inputValue) || 0,
21
+ value: ((_c = fs.fields) === null || _c === void 0 ? void 0 : _c.totalDiscount.inputValue) || 0,
22
+ title: fs.fields.presentmentData.selectedValue.discountTitlePresentment || ((_d = fs.fields) === null || _d === void 0 ? void 0 : _d.discountTitle.inputValue) || '',
23
23
  valueType: 'FIXED_AMOUNT',
24
24
  },
25
- discountApplications: ((_f = fs.props) === null || _f === void 0 ? void 0 : _f.discountApplications) || [],
25
+ discountApplications: ((_e = fs.props) === null || _e === void 0 ? void 0 : _e.discountApplications) || [],
26
26
  creditDiscount: { amount: fs.fields.creditDiscount.inputValue || 0, currencyCode },
27
27
  saleDiscount: { amount: fs.fields.saleDiscount.inputValue || 0, currencyCode },
28
28
  additionalDiscount: { amount: fs.fields.additionalDiscount.inputValue || 0, currencyCode },
@@ -38,11 +38,11 @@ class OrderFromFormState extends OrderFactory_1.default {
38
38
  zip: '',
39
39
  };
40
40
  const shippingAndLocationAttr = {
41
- fulfillmentLocations: ((_g = fs.fields.shippingInfo.selectedValue) === null || _g === void 0 ? void 0 : _g.productsLocationsMapping) || [],
41
+ fulfillmentLocations: ((_f = fs.fields.shippingInfo.selectedValue) === null || _f === void 0 ? void 0 : _f.productsLocationsMapping) || [],
42
42
  shippingAddress: fs.fields.shippingType.selectedValue === order_constants_1.SHIPPING_TYPES.localPickUp
43
43
  ? initShippingAddress
44
44
  : fs.fields.shippingAddress.selectedValue || initShippingAddress,
45
- shippingDiscountAllocations: ((_h = fs.props) === null || _h === void 0 ? void 0 : _h.shippingDiscountAllocations) || [],
45
+ shippingDiscountAllocations: ((_g = fs.props) === null || _g === void 0 ? void 0 : _g.shippingDiscountAllocations) || [],
46
46
  shippingLine: fs.fields.shippingLine
47
47
  ? fs.fields.shippingLine.selectedValue
48
48
  : {
@@ -71,6 +71,9 @@ class OrderFromFormState extends OrderFactory_1.default {
71
71
  },
72
72
  };
73
73
  const presentmentTotalPricesAttr = {
74
+ creditDiscountPresentment: fs.fields.presentmentData.selectedValue.creditDiscountPresentment,
75
+ saleDiscountPresentment: fs.fields.presentmentData.selectedValue.saleDiscountPresentment,
76
+ additionalDiscountPresentment: fs.fields.presentmentData.selectedValue.additionalDiscountPresentment,
74
77
  subtotalPricePresentment: fs.fields.presentmentData.selectedValue.subtotalPricePresentment,
75
78
  totalDiscountPresentment: fs.fields.presentmentData.selectedValue.totalDiscountPresentment,
76
79
  totalPricePresentment: fs.fields.presentmentData.selectedValue.totalPricePresentment,
@@ -90,12 +93,12 @@ class OrderFromFormState extends OrderFactory_1.default {
90
93
  originalTotalPrice: { amount: fs.fields.originalTotalPrice.inputValue || 0, currencyCode },
91
94
  };
92
95
  const statusesAttr = {
93
- state: ((_j = fs.props) === null || _j === void 0 ? void 0 : _j.state) || Order_1.default.ORDER_STATES.draft,
96
+ state: ((_h = fs.props) === null || _h === void 0 ? void 0 : _h.state) || Order_1.default.ORDER_STATES.draft,
94
97
  financialStatus: fs.fields.financialStatus.selectedValue,
95
98
  fulfillmentStatus: fs.fields.fulfillmentStatus.selectedValue,
96
- statusUrl: ((_k = fs.props) === null || _k === void 0 ? void 0 : _k.statusUrl) || '',
99
+ statusUrl: ((_j = fs.props) === null || _j === void 0 ? void 0 : _j.statusUrl) || '',
97
100
  };
98
- const orderAttributes = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, totalPricesAttr), presentmentTotalPricesAttr), discountsAttr), shippingAndLocationAttr), customerAttr), statusesAttr), { id: ((_l = fs.props) === null || _l === void 0 ? void 0 : _l.id) || '', documentId: ((_m = fs.props) === null || _m === void 0 ? void 0 : _m.documentId) || '', name: ((_o = fs.props) === null || _o === void 0 ? void 0 : _o.name) || '', orderNumber: (_p = fs.props) === null || _p === void 0 ? void 0 : _p.orderNumber, ribbnOrderNumber: (_q = fs.props) === null || _q === void 0 ? void 0 : _q.ribbnOrderNumber, merchantId: ((_r = fs.props) === null || _r === void 0 ? void 0 : _r.merchantId) || '', currencyCode: fs.fields.currencyCode.inputValue, lineItems: fs.fields.lineItems.selectedValues || [], fulfillments: ((_s = fs.props) === null || _s === void 0 ? void 0 : _s.fulfillments) || [], refunds: ((_t = fs.props) === null || _t === void 0 ? void 0 : _t.refunds) || [], paymentType: fs.fields.paymentType.selectedValue, paymentMethod: fs.fields.paymentMethod.selectedValue || '', paymentDetails: fs.fields.paymentDetails.selectedValue || {}, notes: fs.fields.notes.inputValue || '', tags: fs.fields.tags.selectedValues || [], cancelReason: fs.fields.cancelReason.selectedValue || '', canceledAt: ((_u = fs.props) === null || _u === void 0 ? void 0 : _u.canceledAt) || '', processedAt: ((_v = fs.props) === null || _v === void 0 ? void 0 : _v.processedAt) || new Date().toUTCString(), createdAtTimestamp: 0, updatedAtTimestamp: 0 });
101
+ const orderAttributes = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, totalPricesAttr), presentmentTotalPricesAttr), discountsAttr), shippingAndLocationAttr), customerAttr), statusesAttr), { id: ((_k = fs.props) === null || _k === void 0 ? void 0 : _k.id) || '', documentId: ((_l = fs.props) === null || _l === void 0 ? void 0 : _l.documentId) || '', name: ((_m = fs.props) === null || _m === void 0 ? void 0 : _m.name) || '', orderNumber: (_o = fs.props) === null || _o === void 0 ? void 0 : _o.orderNumber, ribbnOrderNumber: (_p = fs.props) === null || _p === void 0 ? void 0 : _p.ribbnOrderNumber, merchantId: ((_q = fs.props) === null || _q === void 0 ? void 0 : _q.merchantId) || '', currencyCode: fs.fields.currencyCode.inputValue, lineItems: fs.fields.lineItems.selectedValues || [], fulfillments: ((_r = fs.props) === null || _r === void 0 ? void 0 : _r.fulfillments) || [], refunds: ((_s = fs.props) === null || _s === void 0 ? void 0 : _s.refunds) || [], paymentType: fs.fields.paymentType.selectedValue, paymentMethod: fs.fields.paymentMethod.selectedValue || '', paymentDetails: fs.fields.paymentDetails.selectedValue || {}, notes: fs.fields.notes.inputValue || '', tags: fs.fields.tags.selectedValues || [], cancelReason: fs.fields.cancelReason.selectedValue || '', canceledAt: ((_t = fs.props) === null || _t === void 0 ? void 0 : _t.canceledAt) || '', processedAt: ((_u = fs.props) === null || _u === void 0 ? void 0 : _u.processedAt) || new Date().toUTCString(), createdAtTimestamp: 0, updatedAtTimestamp: 0 });
99
102
  return new Order_1.default(Object.assign({}, orderAttributes));
100
103
  }
101
104
  }
@@ -18,6 +18,5 @@ export default class OrderFormState extends FormState {
18
18
  }): void;
19
19
  discountChangeHandler(val: string): void;
20
20
  shippingPriceChangeHandler(val: string): void;
21
- customerChangeHandler(customer: UserAttributes): void;
22
21
  private fieldFactory;
23
22
  }
@@ -97,24 +97,22 @@ class OrderFormState extends FormState_1.default {
97
97
  // Update total price
98
98
  this.fields.totalPrice.inputValue = Number(Number(this.fields.subtotalPrice.inputValue) - Number(this.fields.totalDiscount.inputValue) + Number(val)).toFixed(2);
99
99
  }
100
- customerChangeHandler(customer) {
101
- this.fields.customer.selectedValue = customer;
102
- this.fields.email.inputValue = (customer === null || customer === void 0 ? void 0 : customer.email) || '';
103
- this.fields.phone.inputValue = (customer === null || customer === void 0 ? void 0 : customer.phone) || '';
104
- this.fields.firstName.inputValue = (customer === null || customer === void 0 ? void 0 : customer.displayName) || (customer === null || customer === void 0 ? void 0 : customer.firstName) || '';
105
- this.fields.lastName.inputValue = !(customer === null || customer === void 0 ? void 0 : customer.displayName) && (customer === null || customer === void 0 ? void 0 : customer.lastName) ? customer === null || customer === void 0 ? void 0 : customer.lastName : '';
106
- }
107
100
  fieldFactory(fieldType, fieldKey, fieldOptions) {
108
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
101
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
109
102
  let options = fieldOptions || [];
110
103
  const hidden = false;
111
104
  if (fieldType === 'textInput') {
112
105
  let inputValue = this.props[fieldKey] || '';
113
106
  if (fieldKey === 'firstName') {
114
- inputValue = this.props.name ? this.props.name.split(' ')[0] : '';
107
+ const { firstName } = this.utilities.getFirstNameAndLastNameFromDisplayName(this.props.customerName || '');
108
+ inputValue = firstName;
115
109
  }
116
110
  if (fieldKey === 'lastName') {
117
- inputValue = this.props.name && this.props.name.split(' ').length > 1 ? this.props.name.split(' ')[1] : '';
111
+ const { lastName } = this.utilities.getFirstNameAndLastNameFromDisplayName(this.props.customerName || '');
112
+ inputValue = lastName;
113
+ }
114
+ if (fieldKey === 'discountTitle') {
115
+ inputValue = ((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.appliedDiscount) === null || _b === void 0 ? void 0 : _b.title) || '';
118
116
  }
119
117
  if (fieldKey === 'subtotalPrice' ||
120
118
  fieldKey === 'totalPrice' ||
@@ -148,50 +146,52 @@ class OrderFormState extends FormState_1.default {
148
146
  if (fieldType === 'singleSelect') {
149
147
  let selectedValue = this.props[fieldKey] || '';
150
148
  if (fieldKey === 'pickupLocation') {
151
- if (((_a = this.props) === null || _a === void 0 ? void 0 : _a.shippingType) === order_constants_1.SHIPPING_TYPES.localPickUp) {
152
- selectedValue =
153
- ((_b = this.props) === null || _b === void 0 ? void 0 : _b.fulfillmentLocations) && ((_c = this.props.fulfillmentLocations[0]) === null || _c === void 0 ? void 0 : _c.location)
154
- ? this.props.fulfillmentLocations[0].location.locationId ||
155
- this.props.fulfillmentLocations[0].location.documentId ||
156
- ''
157
- : '';
149
+ if (((_c = this.props) === null || _c === void 0 ? void 0 : _c.shippingType) === order_constants_1.SHIPPING_TYPES.localPickUp &&
150
+ ((_d = this.props) === null || _d === void 0 ? void 0 : _d.fulfillmentLocations) &&
151
+ ((_e = this.props.fulfillmentLocations[0]) === null || _e === void 0 ? void 0 : _e.location)) {
152
+ const location = this.props.fulfillmentLocations[0].location;
153
+ const locationId = location.locationId || location.documentId || '';
154
+ selectedValue = locationId;
155
+ options = [{ label: location.address1 ? this.utilities.getAddressLabel(location) : '', value: locationId }];
158
156
  }
159
- if ((_e = (_d = this.opts) === null || _d === void 0 ? void 0 : _d.pickupLocationOptions) === null || _e === void 0 ? void 0 : _e.length) {
160
- options = this.utilities.uniqObjArray(this.opts.pickupLocationOptions, 'value');
157
+ if ((_g = (_f = this.opts) === null || _f === void 0 ? void 0 : _f.pickupLocationOptions) === null || _g === void 0 ? void 0 : _g.length) {
158
+ options = this.utilities.uniqObjArray([...options, ...this.opts.pickupLocationOptions], 'value');
161
159
  }
162
160
  }
163
161
  if (fieldKey === 'shippingInfo') {
164
162
  selectedValue = {
165
- productsLocationsMapping: ((_f = this.props) === null || _f === void 0 ? void 0 : _f.fulfillmentLocations) || [],
163
+ productsLocationsMapping: ((_h = this.props) === null || _h === void 0 ? void 0 : _h.fulfillmentLocations) || [],
166
164
  description: '',
167
- price: ((_h = (_g = this.props) === null || _g === void 0 ? void 0 : _g.totalShippingPrice) === null || _h === void 0 ? void 0 : _h.amount) || 0,
165
+ price: ((_k = (_j = this.props) === null || _j === void 0 ? void 0 : _j.totalShippingPrice) === null || _k === void 0 ? void 0 : _k.amount) || 0,
168
166
  disabled: false,
169
167
  };
170
168
  }
171
169
  if (fieldKey === 'presentmentData') {
172
170
  selectedValue = {
173
- presentmentCurrencyCode: ((_k = (_j = this.props) === null || _j === void 0 ? void 0 : _j.totalPricePresentment) === null || _k === void 0 ? void 0 : _k.currencyCode) || '',
174
- discountTitlePresentment: ((_m = (_l = this.props) === null || _l === void 0 ? void 0 : _l.appliedDiscount) === null || _m === void 0 ? void 0 : _m.title) || '',
175
- subtotalPricePresentment: ((_o = this.props) === null || _o === void 0 ? void 0 : _o.subtotalPricePresentment) || { amount: 0 },
176
- totalDiscountPresentment: ((_p = this.props) === null || _p === void 0 ? void 0 : _p.totalDiscountPresentment) || { amount: 0 },
177
- totalShippingPricePresentment: ((_q = this.props) === null || _q === void 0 ? void 0 : _q.totalShippingPricePresentment) || { amount: 0 },
178
- totalPricePresentment: ((_r = this.props) === null || _r === void 0 ? void 0 : _r.totalPricePresentment) || { amount: 0 },
179
- totalRefundedPresentment: ((_s = this.props) === null || _s === void 0 ? void 0 : _s.totalRefundedPresentment) || { amount: 0 },
180
- totalTaxPresentment: ((_t = this.props) === null || _t === void 0 ? void 0 : _t.totalTaxPresentment) || { amount: 0 },
171
+ presentmentCurrencyCode: ((_m = (_l = this.props) === null || _l === void 0 ? void 0 : _l.totalPricePresentment) === null || _m === void 0 ? void 0 : _m.currencyCode) || '',
172
+ discountTitlePresentment: ((_p = (_o = this.props) === null || _o === void 0 ? void 0 : _o.appliedDiscount) === null || _p === void 0 ? void 0 : _p.title) || '',
173
+ subtotalPricePresentment: ((_q = this.props) === null || _q === void 0 ? void 0 : _q.subtotalPricePresentment) || { amount: 0 },
174
+ totalDiscountPresentment: ((_r = this.props) === null || _r === void 0 ? void 0 : _r.totalDiscountPresentment) || { amount: 0 },
175
+ totalShippingPricePresentment: ((_s = this.props) === null || _s === void 0 ? void 0 : _s.totalShippingPricePresentment) || { amount: 0 },
176
+ totalPricePresentment: ((_t = this.props) === null || _t === void 0 ? void 0 : _t.totalPricePresentment) || { amount: 0 },
177
+ totalRefundedPresentment: ((_u = this.props) === null || _u === void 0 ? void 0 : _u.totalRefundedPresentment) || { amount: 0 },
178
+ totalTaxPresentment: ((_v = this.props) === null || _v === void 0 ? void 0 : _v.totalTaxPresentment) || { amount: 0 },
179
+ creditDiscountPresentment: ((_w = this.props) === null || _w === void 0 ? void 0 : _w.creditDiscountPresentment) || { amount: 0 },
180
+ saleDiscountPresentment: ((_x = this.props) === null || _x === void 0 ? void 0 : _x.saleDiscountPresentment) || { amount: 0 },
181
+ additionalDiscountPresentment: ((_y = this.props) === null || _y === void 0 ? void 0 : _y.additionalDiscountPresentment) || { amount: 0 },
181
182
  };
182
183
  }
183
- const valid = !!this.props[fieldKey];
184
- let onChangeHandler = (val) => this.singleSelectChangeHandler(fieldKey, val);
185
184
  if (fieldKey === 'customer') {
186
185
  selectedValue = {
187
186
  uid: this.props.userId,
188
187
  email: this.props.email,
189
188
  displayName: this.props.customerName,
190
189
  };
191
- onChangeHandler = (val) => this.customerChangeHandler(val);
192
190
  }
191
+ const valid = !!this.props[fieldKey];
192
+ const onChangeHandler = (val) => this.singleSelectChangeHandler(fieldKey, val);
193
193
  if (fieldKey === 'shippingType') {
194
- if ((_v = (_u = this.opts) === null || _u === void 0 ? void 0 : _u.shippingTypeOptions) === null || _v === void 0 ? void 0 : _v.length) {
194
+ if ((_0 = (_z = this.opts) === null || _z === void 0 ? void 0 : _z.shippingTypeOptions) === null || _0 === void 0 ? void 0 : _0.length) {
195
195
  options = this.utilities.uniqObjArray(this.opts.shippingTypeOptions, 'value');
196
196
  }
197
197
  }
@@ -16,4 +16,9 @@ export default class Utilities {
16
16
  sanitizeMillisTimeStamp(t: any): number;
17
17
  isProperString(name: any): boolean;
18
18
  toProperString(name: any): string;
19
+ getAddressLabel(address: AddressInput): string;
20
+ getFirstNameAndLastNameFromDisplayName(displayName: string): {
21
+ firstName: string;
22
+ lastName: string;
23
+ };
19
24
  }
@@ -128,5 +128,23 @@ class Utilities {
128
128
  // Capitalize each word and join the words together
129
129
  return words.map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
130
130
  }
131
+ getAddressLabel(address) {
132
+ const { address1 = '', address2 = '', zip = '', city = '', province = '', country = '' } = address;
133
+ return [address1, address2, zip, city, province, country].reduce((res, item) => {
134
+ if (item) {
135
+ return (res === null || res === void 0 ? void 0 : res.length) ? `${res}, ${item}` : item;
136
+ }
137
+ return res;
138
+ }, '');
139
+ }
140
+ getFirstNameAndLastNameFromDisplayName(displayName) {
141
+ const res = { firstName: '', lastName: '' };
142
+ const fixedDisplayName = displayName ? displayName.trim() : '';
143
+ if (fixedDisplayName) {
144
+ res.firstName = fixedDisplayName.split(' ')[0];
145
+ res.lastName = fixedDisplayName.split(' ').length > 1 ? fixedDisplayName.split(' ')[1] : '';
146
+ }
147
+ return res;
148
+ }
131
149
  }
132
150
  exports.default = Utilities;
@@ -94,6 +94,9 @@ export default class Order extends Base {
94
94
  totalRefundedPresentment: Money;
95
95
  totalShippingPricePresentment: Money;
96
96
  totalTaxPresentment: Money;
97
+ creditDiscountPresentment: Money;
98
+ saleDiscountPresentment: Money;
99
+ additionalDiscountPresentment: Money;
97
100
  createdAtTimestamp: number;
98
101
  updatedAtTimestamp: number;
99
102
  constructor(props?: any);
@@ -115,6 +115,15 @@ class Order extends Base_1.default {
115
115
  this.totalTaxPresentment = (props === null || props === void 0 ? void 0 : props.totalTaxPresentment) || {
116
116
  amount: 0,
117
117
  };
118
+ this.creditDiscountPresentment = (props === null || props === void 0 ? void 0 : props.creditDiscountPresentment) || {
119
+ amount: 0,
120
+ };
121
+ this.saleDiscountPresentment = (props === null || props === void 0 ? void 0 : props.saleDiscountPresentment) || {
122
+ amount: 0,
123
+ };
124
+ this.additionalDiscountPresentment = (props === null || props === void 0 ? void 0 : props.additionalDiscountPresentment) || {
125
+ amount: 0,
126
+ };
118
127
  this.createdAtTimestamp = (props === null || props === void 0 ? void 0 : props.createdAtTimestamp) || 0;
119
128
  this.updatedAtTimestamp = (props === null || props === void 0 ? void 0 : props.updatedAtTimestamp) || 0;
120
129
  }
@@ -173,6 +182,9 @@ class Order extends Base_1.default {
173
182
  totalRefundedPresentment: this.totalRefundedPresentment,
174
183
  totalShippingPricePresentment: this.totalShippingPricePresentment,
175
184
  totalTaxPresentment: this.totalTaxPresentment,
185
+ creditDiscountPresentment: this.creditDiscountPresentment,
186
+ saleDiscountPresentment: this.saleDiscountPresentment,
187
+ additionalDiscountPresentment: this.additionalDiscountPresentment,
176
188
  createdAtTimestamp: this.createdAtTimestamp,
177
189
  updatedAtTimestamp: this.updatedAtTimestamp,
178
190
  };
@@ -74,6 +74,9 @@ declare type ReRobeOrderObj = {
74
74
  totalRefundedPresentment?: Money;
75
75
  totalShippingPricePresentment?: Money;
76
76
  totalTaxPresentment?: Money;
77
+ creditDiscountPresentment?: Money;
78
+ saleDiscountPresentment?: Money;
79
+ additionalDiscountPresentment?: Money;
77
80
  createdAtTimestamp: number;
78
81
  updatedAtTimestamp: number;
79
82
  };
@@ -676,6 +679,9 @@ declare type OrderPresentmentData = {
676
679
  totalPricePresentment: Money;
677
680
  totalRefundedPresentment?: Money;
678
681
  totalTaxPresentment?: Money;
682
+ creditDiscountPresentment?: Money;
683
+ saleDiscountPresentment?: Money;
684
+ additionalDiscountPresentment?: Money;
679
685
  };
680
686
  declare type CompleteOrder = ReRobeOrderObj & {
681
687
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.9.8",
3
+ "version": "3.0.2",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",