rerobe-js-orm 4.6.2 → 4.6.4

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 ProductFactory_1 = require("./ProductFactory");
4
4
  const Product_1 = require("../../models/Product");
5
5
  class ProductFromFormState extends ProductFactory_1.default {
6
6
  createProduct(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, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
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, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;
8
8
  const productAttributes = {
9
9
  availableForSale: props.fields.availableForSale.selectedValue,
10
10
  description: props.fields.description.inputValue,
@@ -63,9 +63,10 @@ class ProductFromFormState extends ProductFactory_1.default {
63
63
  primaryAgeCategory: props.fields.primaryAgeCategory.selectedValue || '',
64
64
  tags: props.fields.tags.selectedValues || [],
65
65
  systemTags: ((_s = props.props) === null || _s === void 0 ? void 0 : _s.systemTags) || [],
66
+ stockStatus: ((_t = props.props) === null || _t === void 0 ? void 0 : _t.stockStatus) || '',
66
67
  };
67
68
  const consignmentAttributes = {
68
- sellRequestId: ((_t = props.props) === null || _t === void 0 ? void 0 : _t.sellRequestId) || '',
69
+ sellRequestId: ((_u = props.props) === null || _u === void 0 ? void 0 : _u.sellRequestId) || '',
69
70
  publishType: props.fields.publishType.selectedValue,
70
71
  conditionRemarks: props.fields.conditionRemarks.inputValue,
71
72
  productRemarks: props.fields.productRemarks.inputValue,
@@ -78,14 +79,14 @@ class ProductFromFormState extends ProductFactory_1.default {
78
79
  nextAvailableSeason: props.fields.nextAvailableSeason.selectedValue,
79
80
  notesForProductionTeam: props.fields.notesForProductionTeam.inputValue,
80
81
  reviewedBy: props.fields.reviewedBy.selectedValue,
81
- sellRequestImageUrls: ((_u = props.props) === null || _u === void 0 ? void 0 : _u.sellRequestImageUrls) || [],
82
+ sellRequestImageUrls: ((_v = props.props) === null || _v === void 0 ? void 0 : _v.sellRequestImageUrls) || [],
82
83
  salesChannel: props.fields.salesChannel.selectedValues || [],
83
84
  sizeComment: props.fields.sizeComment.selectedValue,
84
- salePrice: ((_v = props.props) === null || _v === void 0 ? void 0 : _v.salePrice) || '',
85
+ salePrice: ((_w = props.props) === null || _w === void 0 ? void 0 : _w.salePrice) || '',
85
86
  isOnSale: props.fields.isOnSale.selectedValue || '',
86
87
  discountType: props.fields.discountType.selectedValue || '',
87
88
  discountValue: props.fields.discountValue.inputValue || '',
88
- selectedForClearance: ((_w = props.props) === null || _w === void 0 ? void 0 : _w.selectedForClearance) || '',
89
+ selectedForClearance: ((_x = props.props) === null || _x === void 0 ? void 0 : _x.selectedForClearance) || '',
89
90
  locationIds: props.fields.locationIds.selectedValues || [],
90
91
  inventoryLocations: props.fields.inventoryLocations.selectedValues || [],
91
92
  majorDefects: props.fields.majorDefects.selectedValues || [], // ToDo: Deprecate
@@ -93,44 +94,47 @@ class ProductFromFormState extends ProductFactory_1.default {
93
94
  careInstructions: props.fields.careInstructions.inputValue || '',
94
95
  };
95
96
  const timestampAttributes = {
96
- createdAtTimestamp: (_x = props.props) === null || _x === void 0 ? void 0 : _x.createdAtTimestamp,
97
- updatedAtTimestamp: (_y = props.props) === null || _y === void 0 ? void 0 : _y.updatedAtTimestamp,
98
- sellRequestReviewTimestamp: (_z = props.props) === null || _z === void 0 ? void 0 : _z.sellRequestReviewTimestamp,
99
- sellRequestReviewDraftTimestamp: (_0 = props.props) === null || _0 === void 0 ? void 0 : _0.sellRequestReviewDraftTimestamp,
100
- rejectedTimestamp: (_1 = props.props) === null || _1 === void 0 ? void 0 : _1.rejectedTimestamp,
101
- holdTimestamp: (_2 = props.props) === null || _2 === void 0 ? void 0 : _2.holdTimestamp,
102
- acceptedTimestamp: (_3 = props.props) === null || _3 === void 0 ? void 0 : _3.acceptedTimestamp,
103
- sellerToDropOffTimestamp: (_4 = props.props) === null || _4 === void 0 ? void 0 : _4.sellerToDropOffTimestamp,
104
- sellerToShipTimestamp: (_5 = props.props) === null || _5 === void 0 ? void 0 : _5.sellerToShipTimestamp,
105
- sellerToGetPickUpTimestamp: (_6 = props.props) === null || _6 === void 0 ? void 0 : _6.sellerToGetPickUpTimestamp,
106
- qualityControlTimestamp: (_7 = props.props) === null || _7 === void 0 ? void 0 : _7.qualityControlTimestamp,
107
- pendingPublicationTimestamp: (_8 = props.props) === null || _8 === void 0 ? void 0 : _8.pendingPublicationTimestamp,
108
- listedTimestamp: (_9 = props.props) === null || _9 === void 0 ? void 0 : _9.listedTimestamp,
109
- clearanceTimestamp: (_10 = props.props) === null || _10 === void 0 ? void 0 : _10.clearanceTimestamp,
110
- reservedTimestamp: (_11 = props.props) === null || _11 === void 0 ? void 0 : _11.reservedTimestamp,
111
- soldTimestamp: (_12 = props.props) === null || _12 === void 0 ? void 0 : _12.soldTimestamp,
112
- returnedTimestamp: (_13 = props.props) === null || _13 === void 0 ? void 0 : _13.returnedTimestamp,
113
- soldSellerSelfPayTimestamp: (_14 = props.props) === null || _14 === void 0 ? void 0 : _14.soldSellerSelfPayTimestamp,
114
- soldSellerPayoutProcessingTimestamp: (_15 = props.props) === null || _15 === void 0 ? void 0 : _15.soldSellerPayoutProcessingTimestamp,
115
- soldSellerPayoutFailedTimestamp: (_16 = props.props) === null || _16 === void 0 ? void 0 : _16.soldSellerPayoutFailedTimestamp,
116
- soldSellerToBePaidTimestamp: (_17 = props.props) === null || _17 === void 0 ? void 0 : _17.soldSellerToBePaidTimestamp,
117
- soldSellerPaidTimestamp: (_18 = props.props) === null || _18 === void 0 ? void 0 : _18.soldSellerPaidTimestamp,
118
- sellerSelfRejectTimestamp: (_19 = props.props) === null || _19 === void 0 ? void 0 : _19.sellerSelfRejectTimestamp,
119
- liquidationRequestedTimestamp: (_20 = props.props) === null || _20 === void 0 ? void 0 : _20.liquidationRequestedTimestamp,
120
- sellerLiquidatedTimestamp: (_21 = props.props) === null || _21 === void 0 ? void 0 : _21.sellerLiquidatedTimestamp,
121
- archivedTimestamp: (_22 = props.props) === null || _22 === void 0 ? void 0 : _22.archivedTimestamp,
122
- liquidationReadyTimestamp: (_23 = props.props) === null || _23 === void 0 ? void 0 : _23.liquidationReadyTimestamp,
123
- sellerDonatedTimestamp: (_24 = props.props) === null || _24 === void 0 ? void 0 : _24.sellerDonatedTimestamp,
124
- merchantDonatedTimestamp: (_25 = props.props) === null || _25 === void 0 ? void 0 : _25.merchantDonatedTimestamp,
125
- draftTimestamp: (_26 = props.props) === null || _26 === void 0 ? void 0 : _26.draftTimestamp,
126
- hiddenTimestamp: (_27 = props.props) === null || _27 === void 0 ? void 0 : _27.hiddenTimestamp,
127
- bookedTimestamp: (_28 = props.props) === null || _28 === void 0 ? void 0 : _28.bookedTimestamp,
128
- openTimestamp: (_29 = props.props) === null || _29 === void 0 ? void 0 : _29.openTimestamp,
97
+ createdAtTimestamp: (_y = props.props) === null || _y === void 0 ? void 0 : _y.createdAtTimestamp,
98
+ updatedAtTimestamp: (_z = props.props) === null || _z === void 0 ? void 0 : _z.updatedAtTimestamp,
99
+ sellRequestReviewTimestamp: (_0 = props.props) === null || _0 === void 0 ? void 0 : _0.sellRequestReviewTimestamp,
100
+ sellRequestReviewDraftTimestamp: (_1 = props.props) === null || _1 === void 0 ? void 0 : _1.sellRequestReviewDraftTimestamp,
101
+ rejectedTimestamp: (_2 = props.props) === null || _2 === void 0 ? void 0 : _2.rejectedTimestamp,
102
+ holdTimestamp: (_3 = props.props) === null || _3 === void 0 ? void 0 : _3.holdTimestamp,
103
+ acceptedTimestamp: (_4 = props.props) === null || _4 === void 0 ? void 0 : _4.acceptedTimestamp,
104
+ sellerToDropOffTimestamp: (_5 = props.props) === null || _5 === void 0 ? void 0 : _5.sellerToDropOffTimestamp,
105
+ sellerToShipTimestamp: (_6 = props.props) === null || _6 === void 0 ? void 0 : _6.sellerToShipTimestamp,
106
+ sellerToGetPickUpTimestamp: (_7 = props.props) === null || _7 === void 0 ? void 0 : _7.sellerToGetPickUpTimestamp,
107
+ qualityControlTimestamp: (_8 = props.props) === null || _8 === void 0 ? void 0 : _8.qualityControlTimestamp,
108
+ pendingPublicationTimestamp: (_9 = props.props) === null || _9 === void 0 ? void 0 : _9.pendingPublicationTimestamp,
109
+ listedTimestamp: (_10 = props.props) === null || _10 === void 0 ? void 0 : _10.listedTimestamp,
110
+ clearanceTimestamp: (_11 = props.props) === null || _11 === void 0 ? void 0 : _11.clearanceTimestamp,
111
+ reservedTimestamp: (_12 = props.props) === null || _12 === void 0 ? void 0 : _12.reservedTimestamp,
112
+ soldTimestamp: (_13 = props.props) === null || _13 === void 0 ? void 0 : _13.soldTimestamp,
113
+ returnedTimestamp: (_14 = props.props) === null || _14 === void 0 ? void 0 : _14.returnedTimestamp,
114
+ soldSellerSelfPayTimestamp: (_15 = props.props) === null || _15 === void 0 ? void 0 : _15.soldSellerSelfPayTimestamp,
115
+ soldSellerPayoutProcessingTimestamp: (_16 = props.props) === null || _16 === void 0 ? void 0 : _16.soldSellerPayoutProcessingTimestamp,
116
+ soldSellerPayoutFailedTimestamp: (_17 = props.props) === null || _17 === void 0 ? void 0 : _17.soldSellerPayoutFailedTimestamp,
117
+ soldSellerToBePaidTimestamp: (_18 = props.props) === null || _18 === void 0 ? void 0 : _18.soldSellerToBePaidTimestamp,
118
+ soldSellerPaidTimestamp: (_19 = props.props) === null || _19 === void 0 ? void 0 : _19.soldSellerPaidTimestamp,
119
+ sellerSelfRejectTimestamp: (_20 = props.props) === null || _20 === void 0 ? void 0 : _20.sellerSelfRejectTimestamp,
120
+ liquidationRequestedTimestamp: (_21 = props.props) === null || _21 === void 0 ? void 0 : _21.liquidationRequestedTimestamp,
121
+ sellerLiquidatedTimestamp: (_22 = props.props) === null || _22 === void 0 ? void 0 : _22.sellerLiquidatedTimestamp,
122
+ archivedTimestamp: (_23 = props.props) === null || _23 === void 0 ? void 0 : _23.archivedTimestamp,
123
+ liquidationReadyTimestamp: (_24 = props.props) === null || _24 === void 0 ? void 0 : _24.liquidationReadyTimestamp,
124
+ sellerDonatedTimestamp: (_25 = props.props) === null || _25 === void 0 ? void 0 : _25.sellerDonatedTimestamp,
125
+ merchantDonatedTimestamp: (_26 = props.props) === null || _26 === void 0 ? void 0 : _26.merchantDonatedTimestamp,
126
+ draftTimestamp: (_27 = props.props) === null || _27 === void 0 ? void 0 : _27.draftTimestamp,
127
+ hiddenTimestamp: (_28 = props.props) === null || _28 === void 0 ? void 0 : _28.hiddenTimestamp,
128
+ bookedTimestamp: (_29 = props.props) === null || _29 === void 0 ? void 0 : _29.bookedTimestamp,
129
+ openTimestamp: (_30 = props.props) === null || _30 === void 0 ? void 0 : _30.openTimestamp,
130
+ stockTakeFirstTimestamp: (_31 = props.props) === null || _31 === void 0 ? void 0 : _31.stockTakeFirstTimestamp,
131
+ stockTakeLatestTimestamp: (_32 = props.props) === null || _32 === void 0 ? void 0 : _32.stockTakeLatestTimestamp,
132
+ stockStatusTimestamp: (_33 = props.props) === null || _33 === void 0 ? void 0 : _33.stockStatusTimestamp,
129
133
  };
130
134
  const payoutAttributes = {
131
- payoutMethod: (_30 = props.props) === null || _30 === void 0 ? void 0 : _30.payoutMethod,
132
- payoutSystem: (_31 = props.props) === null || _31 === void 0 ? void 0 : _31.payoutSystem,
133
- payoutReference: (_32 = props.props) === null || _32 === void 0 ? void 0 : _32.payoutReference,
135
+ payoutMethod: (_34 = props.props) === null || _34 === void 0 ? void 0 : _34.payoutMethod,
136
+ payoutSystem: (_35 = props.props) === null || _35 === void 0 ? void 0 : _35.payoutSystem,
137
+ payoutReference: (_36 = props.props) === null || _36 === void 0 ? void 0 : _36.payoutReference,
134
138
  };
135
139
  return new Product_1.default(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, productAttributes), productFilterAttributes), consignmentAttributes), timestampAttributes), payoutAttributes));
136
140
  }
@@ -442,7 +442,11 @@ class Order extends Base_1.default {
442
442
  var _a, _b;
443
443
  return ({
444
444
  quantity: Number(item.quantity || 1),
445
- variantId: ((_a = item.variant) === null || _a === void 0 ? void 0 : _a.shopifyId) || item.shopifyProductId || ((_b = item.variant) === null || _b === void 0 ? void 0 : _b.id) || '',
445
+ variantId: item.shopifyVariantId ||
446
+ ((_a = item.variant) === null || _a === void 0 ? void 0 : _a.shopifyId) ||
447
+ item.shopifyProductId ||
448
+ ((_b = item.variant) === null || _b === void 0 ? void 0 : _b.id) ||
449
+ '',
446
450
  });
447
451
  });
448
452
  const tagsArray = Array.isArray(this.tags)
@@ -31,6 +31,7 @@ export default class Product extends Base {
31
31
  };
32
32
  toObjForTextTranslation(): TranslatableAttributes;
33
33
  toObjForTypesense(isCanonicalMerchant?: boolean): TypesenseProductObj;
34
+ private deriveStockStatusFromSystemTags;
34
35
  buildUpdatedFieldsForSalesChannel(): {
35
36
  title: string;
36
37
  description: string;
@@ -66,6 +66,7 @@ class Product extends Base_1.default {
66
66
  primaryAgeCategory: (props === null || props === void 0 ? void 0 : props.primaryAgeCategory) || '',
67
67
  tags: this.utilities.sanitzeStringArr(props === null || props === void 0 ? void 0 : props.tags) || [],
68
68
  systemTags: this.utilities.sanitzeStringArr(props === null || props === void 0 ? void 0 : props.systemTags) || [],
69
+ stockStatus: (props === null || props === void 0 ? void 0 : props.stockStatus) || '',
69
70
  };
70
71
  this.consignmentAttributes = {
71
72
  sellRequestImageUrls: (props === null || props === void 0 ? void 0 : props.sellRequestImageUrls) || [],
@@ -141,6 +142,9 @@ class Product extends Base_1.default {
141
142
  soldSellerPayoutFailedTimestamp: (props === null || props === void 0 ? void 0 : props.soldSellerPayoutFailedTimestamp)
142
143
  ? Number(props === null || props === void 0 ? void 0 : props.soldSellerPayoutFailedTimestamp)
143
144
  : null,
145
+ stockTakeFirstTimestamp: (props === null || props === void 0 ? void 0 : props.stockTakeFirstTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.stockTakeFirstTimestamp) : null,
146
+ stockTakeLatestTimestamp: (props === null || props === void 0 ? void 0 : props.stockTakeLatestTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.stockTakeLatestTimestamp) : null,
147
+ stockStatusTimestamp: (props === null || props === void 0 ? void 0 : props.stockStatusTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.stockStatusTimestamp) : null,
144
148
  };
145
149
  this.payoutAttributes = {
146
150
  payoutMethod: (props === null || props === void 0 ? void 0 : props.payoutMethod) || null,
@@ -547,6 +551,8 @@ class Product extends Base_1.default {
547
551
  description: this.utilities.sanitizeString(this.attributes.description),
548
552
  discountType: this.utilities.sanitizeString(this.consignmentAttributes.discountType),
549
553
  discountValue: this.utilities.sanitizeNumber(this.consignmentAttributes.discountValue, 0),
554
+ stockStatus: 'Unknown',
555
+ stockStatusTimestamp: null,
550
556
  id: this.utilities.sanitizeString(this.filterAttributes.documentId),
551
557
  documentId: this.utilities.sanitizeString(this.filterAttributes.documentId),
552
558
  shopifyId: this.utilities.sanitizeString(this.attributes.shopifyId),
@@ -560,7 +566,14 @@ class Product extends Base_1.default {
560
566
  ? this.consignmentAttributes.inventoryLocations.map((c) => String(c.id))
561
567
  : [],
562
568
  productClass: this.utilities.sanitizeString(this.attributes.productClass),
569
+ stockTakeLatestTimestamp: null,
570
+ stockTakeFirstTimestamp: null,
563
571
  };
572
+ const stockDerivations = this.deriveStockStatusFromSystemTags();
573
+ stagedObj.stockStatus = stockDerivations.stockStatus;
574
+ stagedObj.stockStatusTimestamp = this.utilities.sanitizeMillisTimeStamp(stockDerivations.stockStatusTimestamp);
575
+ stagedObj.stockTakeFirstTimestamp = this.utilities.sanitizeMillisTimeStamp(stockDerivations.stockTakeFirstTimestamp);
576
+ stagedObj.stockTakeLatestTimestamp = this.utilities.sanitizeMillisTimeStamp(stockDerivations.stockTakeLatestTimestamp);
564
577
  if (((_a = this.consignmentAttributes) === null || _a === void 0 ? void 0 : _a.inventoryLocations) &&
565
578
  Array.isArray((_b = this.consignmentAttributes) === null || _b === void 0 ? void 0 : _b.inventoryLocations)) {
566
579
  this.consignmentAttributes.inventoryLocations.forEach((l) => {
@@ -577,6 +590,64 @@ class Product extends Base_1.default {
577
590
  });
578
591
  return stagedObj;
579
592
  }
593
+ deriveStockStatusFromSystemTags() {
594
+ const systemTags = Array.isArray(this.filterAttributes.systemTags) ? this.filterAttributes.systemTags : [];
595
+ const stockTakeTags = systemTags.filter((t) => typeof t === 'string' && t.startsWith('stock-take|'));
596
+ const inTransitTags = systemTags.filter((t) => typeof t === 'string' && t.startsWith('in-transit|'));
597
+ const parseLatestAndFirstTs = (tags) => {
598
+ let latest = 0;
599
+ let first = 0;
600
+ tags.forEach((tag) => {
601
+ const parts = String(tag).split('|');
602
+ let timestampMs = null;
603
+ parts.forEach((p) => {
604
+ if (p.startsWith('ts=')) {
605
+ const parsed = Number(p.substring(3));
606
+ if (!isNaN(parsed)) {
607
+ timestampMs = parsed;
608
+ }
609
+ }
610
+ });
611
+ if (timestampMs != null) {
612
+ const ts = this.utilities.sanitizeMillisTimeStamp(timestampMs);
613
+ if (ts > latest)
614
+ latest = ts;
615
+ if (first === 0 || ts < first)
616
+ first = ts;
617
+ }
618
+ });
619
+ return { latest, first };
620
+ };
621
+ const stockTakeLatest = parseLatestAndFirstTs(stockTakeTags).latest;
622
+ const inTransitLatest = parseLatestAndFirstTs(inTransitTags).latest;
623
+ const stockTakeLatestSan = stockTakeLatest ? this.utilities.sanitizeMillisTimeStamp(stockTakeLatest) : null;
624
+ const stockTakeFirstRaw = stockTakeTags.length ? parseLatestAndFirstTs(stockTakeTags).first : 0;
625
+ const stockTakeFirstSan = stockTakeFirstRaw ? this.utilities.sanitizeMillisTimeStamp(stockTakeFirstRaw) : null;
626
+ let stockStatus = 'Unknown';
627
+ let stockStatusTimestamp = null;
628
+ if (stockTakeLatest === 0 && inTransitLatest === 0) {
629
+ stockStatus = 'Unknown';
630
+ stockStatusTimestamp = null;
631
+ }
632
+ else if (stockTakeLatest >= inTransitLatest) {
633
+ stockStatus = 'In stock';
634
+ stockStatusTimestamp = stockTakeLatestSan;
635
+ }
636
+ else {
637
+ stockStatus = 'In transit';
638
+ stockStatusTimestamp = this.utilities.sanitizeMillisTimeStamp(inTransitLatest);
639
+ }
640
+ this.filterAttributes.stockStatus = stockStatus;
641
+ this.timestampAttributes.stockStatusTimestamp = stockStatusTimestamp;
642
+ this.timestampAttributes.stockTakeFirstTimestamp = stockTakeFirstSan;
643
+ this.timestampAttributes.stockTakeLatestTimestamp = stockTakeLatestSan;
644
+ return {
645
+ stockTakeFirstTimestamp: stockTakeFirstSan,
646
+ stockTakeLatestTimestamp: stockTakeLatestSan,
647
+ stockStatus,
648
+ stockStatusTimestamp,
649
+ };
650
+ }
580
651
  buildUpdatedFieldsForSalesChannel() {
581
652
  return {
582
653
  title: this.attributes.title,
@@ -1123,6 +1194,12 @@ class Product extends Base_1.default {
1123
1194
  name: 'inventoryLocations..*.incomingAmount',
1124
1195
  type: 'int32',
1125
1196
  },
1197
+ {
1198
+ facet: true,
1199
+ optional: true,
1200
+ name: 'stockStatus',
1201
+ type: 'string',
1202
+ },
1126
1203
  {
1127
1204
  facet: true,
1128
1205
  optional: true,
@@ -56,6 +56,7 @@ type ProductFilterAttributes = {
56
56
  primaryAgeCategory: string;
57
57
  tags?: string[];
58
58
  systemTags?: string[];
59
+ stockStatus?: string;
59
60
  };
60
61
  type ProductConsignmentAttributes = {
61
62
  sellRequestImageUrls: string[];
@@ -119,6 +120,9 @@ type ProductTimestampAttributes = {
119
120
  hiddenTimestamp: number | null;
120
121
  bookedTimestamp: number | null;
121
122
  openTimestamp: number | null;
123
+ stockTakeFirstTimestamp: number | null;
124
+ stockTakeLatestTimestamp: number | null;
125
+ stockStatusTimestamp: number | null;
122
126
  };
123
127
  type TranslatableAttributes = {
124
128
  description: string;
@@ -365,6 +369,8 @@ type TypesenseProductObj = {
365
369
  description: string;
366
370
  discountType: string;
367
371
  discountValue: number;
372
+ stockStatus: 'In stock' | 'In transit' | 'Unknown';
373
+ stockStatusTimestamp: number | null;
368
374
  id: string;
369
375
  documentId: string;
370
376
  gender: string;
@@ -372,6 +378,8 @@ type TypesenseProductObj = {
372
378
  imageUrls: string[];
373
379
  sellRequestImageUrls: string[];
374
380
  reservedBy: string[];
381
+ stockTakeLatestTimestamp: number | null;
382
+ stockTakeFirstTimestamp: number | null;
375
383
  'inventoryLocations.ids': string[];
376
384
  'materialComposition.names': string[];
377
385
  createdAtDay: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.6.2",
3
+ "version": "4.6.4",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",