rerobe-js-orm 2.7.15 → 2.7.16

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, _4;
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, _5;
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,7 +70,8 @@ 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
+ itemSoldPct: ((_4 = props.props) === null || _4 === void 0 ? void 0 : _4.itemSoldPct) || 0,
74
+ lastOrderDate: ((_5 = props.props) === null || _5 === void 0 ? void 0 : _5.lastOrderDate) || '',
74
75
  };
75
76
  return new User_1.default(Object.assign({}, userAttributes));
76
77
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class AnalyticsHelpers {
4
4
  // Trait object for analytics.identify (https://segment.com/docs/connections/spec/identify/)
5
5
  static createIdentifyPayloadForSegment(userProps) {
6
- const { firstName, lastName, email, phone, documentId, createdAt, updatedAt, addresses, title, isSeller, ordersCount, amountSpent, itemsUploadedCount, lastOrderDate, inventoryValue, inventoryCount, itemsSoldCount, itemsSoldValue, itemRejectionPct, } = userProps;
6
+ const { firstName, lastName, email, phone, documentId, createdAt, updatedAt, addresses, title, isSeller, ordersCount, amountSpent, itemsUploadedCount, lastOrderDate, inventoryValue, inventoryCount, itemsSoldCount, itemsSoldValue, itemRejectionPct, itemSoldPct, } = userProps;
7
7
  // Step 1. Get all reserved traits (https://segment.com/docs/connections/spec/identify/#traits)
8
8
  const reservedTraitsObj = {
9
9
  firstName,
@@ -27,6 +27,7 @@ class AnalyticsHelpers {
27
27
  itemsSoldCount,
28
28
  itemsSoldValue,
29
29
  itemRejectionPct,
30
+ itemSoldPct,
30
31
  lastOrderDate,
31
32
  };
32
33
  return {
@@ -42,6 +42,7 @@ export default class User extends Base {
42
42
  itemsSoldCount: number;
43
43
  itemsSoldValue: number;
44
44
  itemRejectionPct: number;
45
+ itemSoldPct: number;
45
46
  lastOrderDate: string;
46
47
  constructor(props?: any);
47
48
  toObj(): UserAttributes;
@@ -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.itemSoldPct = (props === null || props === void 0 ? void 0 : props.itemSoldPct) || 0;
65
66
  this.lastOrderDate = (props === null || props === void 0 ? void 0 : props.lastOrderDate) || '';
66
67
  }
67
68
  toObj() {
@@ -105,6 +106,7 @@ class User extends Base_1.default {
105
106
  itemsSoldCount: this.itemsSoldCount,
106
107
  itemsSoldValue: this.itemsSoldValue,
107
108
  itemRejectionPct: this.itemRejectionPct,
109
+ itemSoldPct: this.itemSoldPct,
108
110
  lastOrderDate: this.lastOrderDate,
109
111
  };
110
112
  }
@@ -181,6 +183,7 @@ class User extends Base_1.default {
181
183
  itemsSoldCount: this.itemsSoldCount,
182
184
  itemsSoldValue: this.itemsSoldValue,
183
185
  itemRejectionPct: this.itemRejectionPct,
186
+ itemSoldPct: this.itemSoldPct,
184
187
  lastOrderDate: this.lastOrderDate,
185
188
  };
186
189
  return customerInput;
@@ -279,6 +282,11 @@ class User extends Base_1.default {
279
282
  name: 'itemRejectionPct',
280
283
  type: 'float',
281
284
  },
285
+ {
286
+ facet: true,
287
+ name: 'itemSoldPct',
288
+ type: 'float',
289
+ },
282
290
  {
283
291
  facet: true,
284
292
  name: 'lastOrderDate',
@@ -308,6 +316,7 @@ class User extends Base_1.default {
308
316
  itemsSoldCount: this.utilities.sanitizeNumber(this.itemsSoldCount),
309
317
  itemsSoldValue: this.utilities.sanitizeNumber(this.itemsSoldValue),
310
318
  itemRejectionPct: this.utilities.sanitizeNumber(this.itemRejectionPct),
319
+ itemSoldPct: this.utilities.sanitizeNumber(this.itemSoldPct),
311
320
  lastOrderDate: this.utilities.sanitizeString(this.lastOrderDate),
312
321
  };
313
322
  return stagedObj;
@@ -38,6 +38,7 @@ interface UserAttributes extends ReRobeDocument {
38
38
  itemsSoldCount?: number;
39
39
  itemsSoldValue?: number;
40
40
  itemRejectionPct?: number;
41
+ itemSoldPct?: number;
41
42
  lastOrderDate?: string;
42
43
  }
43
44
  declare type RibbnCustomerObj = {
@@ -71,6 +72,7 @@ declare type RibbnCustomerObj = {
71
72
  itemsSoldCount?: number;
72
73
  itemsSoldValue?: number;
73
74
  itemRejectionPct?: number;
75
+ itemSoldPct?: number;
74
76
  lastOrderDate?: string;
75
77
  };
76
78
  declare type UserObjForAuthTemplateMethod = {
@@ -162,5 +164,6 @@ declare type TypesenseUserObj = {
162
164
  itemsSoldCount: number;
163
165
  itemsSoldValue: number;
164
166
  itemRejectionPct: number;
167
+ itemSoldPct: number;
165
168
  lastOrderDate: string;
166
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.7.15",
3
+ "version": "2.7.16",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",