rerobe-js-orm 2.7.14 → 2.7.15

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.
@@ -4,7 +4,7 @@ const UserFactory_1 = require("./UserFactory");
4
4
  const User_1 = require("../../models/User");
5
5
  class UserFromFormState extends UserFactory_1.default {
6
6
  createUser(props) {
7
- 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, _1, _2, _3;
7
+ 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, _1, _2, _3, _4;
8
8
  const userAttributes = {
9
9
  documentId: ((_a = props.props) === null || _a === void 0 ? void 0 : _a.documentId) || '',
10
10
  uid: ((_b = props.props) === null || _b === void 0 ? void 0 : _b.uid) || '',
@@ -70,6 +70,7 @@ class UserFromFormState extends UserFactory_1.default {
70
70
  itemsSoldCount: ((_1 = props.props) === null || _1 === void 0 ? void 0 : _1.itemsSoldCount) || 0,
71
71
  itemsSoldValue: ((_2 = props.props) === null || _2 === void 0 ? void 0 : _2.itemsSoldValue) || 0,
72
72
  itemRejectionPct: ((_3 = props.props) === null || _3 === void 0 ? void 0 : _3.itemRejectionPct) || 0,
73
+ lastOrderDate: ((_4 = props.props) === null || _4 === void 0 ? void 0 : _4.lastOrderDate) || '',
73
74
  };
74
75
  return new User_1.default(Object.assign({}, userAttributes));
75
76
  }
@@ -21,13 +21,13 @@ class AnalyticsHelpers {
21
21
  isSeller,
22
22
  ordersCount,
23
23
  amountSpent,
24
- lastOrderDate,
25
24
  itemsUploadedCount,
26
25
  inventoryValue,
27
26
  inventoryCount,
28
27
  itemsSoldCount,
29
28
  itemsSoldValue,
30
29
  itemRejectionPct,
30
+ lastOrderDate,
31
31
  };
32
32
  return {
33
33
  userId: documentId || '',
@@ -42,6 +42,7 @@ export default class User extends Base {
42
42
  itemsSoldCount: number;
43
43
  itemsSoldValue: number;
44
44
  itemRejectionPct: number;
45
+ lastOrderDate: string;
45
46
  constructor(props?: any);
46
47
  toObj(): UserAttributes;
47
48
  toCustomerUpdateInputObjForShopify(): any;
@@ -62,6 +62,7 @@ class User extends Base_1.default {
62
62
  this.itemsSoldCount = (props === null || props === void 0 ? void 0 : props.itemsSoldCount) || 0;
63
63
  this.itemsSoldValue = (props === null || props === void 0 ? void 0 : props.itemsSoldValue) || 0;
64
64
  this.itemRejectionPct = (props === null || props === void 0 ? void 0 : props.itemRejectionPct) || 0;
65
+ this.lastOrderDate = (props === null || props === void 0 ? void 0 : props.lastOrderDate) || '';
65
66
  }
66
67
  toObj() {
67
68
  return {
@@ -104,6 +105,7 @@ class User extends Base_1.default {
104
105
  itemsSoldCount: this.itemsSoldCount,
105
106
  itemsSoldValue: this.itemsSoldValue,
106
107
  itemRejectionPct: this.itemRejectionPct,
108
+ lastOrderDate: this.lastOrderDate,
107
109
  };
108
110
  }
109
111
  toCustomerUpdateInputObjForShopify() {
@@ -179,6 +181,7 @@ class User extends Base_1.default {
179
181
  itemsSoldCount: this.itemsSoldCount,
180
182
  itemsSoldValue: this.itemsSoldValue,
181
183
  itemRejectionPct: this.itemRejectionPct,
184
+ lastOrderDate: this.lastOrderDate,
182
185
  };
183
186
  return customerInput;
184
187
  }
@@ -276,6 +279,11 @@ class User extends Base_1.default {
276
279
  name: 'itemRejectionPct',
277
280
  type: 'float',
278
281
  },
282
+ {
283
+ facet: true,
284
+ name: 'lastOrderDate',
285
+ type: 'string',
286
+ },
279
287
  ],
280
288
  name: 'prod_customers_20220907',
281
289
  };
@@ -300,6 +308,7 @@ class User extends Base_1.default {
300
308
  itemsSoldCount: this.utilities.sanitizeNumber(this.itemsSoldCount),
301
309
  itemsSoldValue: this.utilities.sanitizeNumber(this.itemsSoldValue),
302
310
  itemRejectionPct: this.utilities.sanitizeNumber(this.itemRejectionPct),
311
+ lastOrderDate: this.utilities.sanitizeString(this.lastOrderDate),
303
312
  };
304
313
  return stagedObj;
305
314
  }
@@ -38,6 +38,7 @@ interface UserAttributes extends ReRobeDocument {
38
38
  itemsSoldCount?: number;
39
39
  itemsSoldValue?: number;
40
40
  itemRejectionPct?: number;
41
+ lastOrderDate?: string;
41
42
  }
42
43
  declare type RibbnCustomerObj = {
43
44
  uid?: string;
@@ -70,6 +71,7 @@ declare type RibbnCustomerObj = {
70
71
  itemsSoldCount?: number;
71
72
  itemsSoldValue?: number;
72
73
  itemRejectionPct?: number;
74
+ lastOrderDate?: string;
73
75
  };
74
76
  declare type UserObjForAuthTemplateMethod = {
75
77
  authUserProfile: UserFromShopifyGraphQLResp;
@@ -160,4 +162,5 @@ declare type TypesenseUserObj = {
160
162
  itemsSoldCount: number;
161
163
  itemsSoldValue: number;
162
164
  itemRejectionPct: number;
165
+ lastOrderDate: string;
163
166
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.7.14",
3
+ "version": "2.7.15",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",