rerobe-js-orm 3.5.4 → 3.5.6

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.
@@ -94,7 +94,7 @@ class ReRobeProductHelpers {
94
94
  const priceToUse = cur.isOnSale === 'yes' && Boolean(cur.clearanceTimestamp) && cur.salePrice ? cur.salePrice : cur.price;
95
95
  const listingPrice = Number.isNaN(priceToUse) ? 0 : Number(priceToUse);
96
96
  const priceSold = acc[0] + listingPrice;
97
- const commissionFee = acc[1] + priceSold * commission;
97
+ const commissionFee = acc[1] + listingPrice * commission;
98
98
  const productionFee = acc[2] + (Boolean(isCanonicalMerchant) ? this.calculateProductionFee(commission) : 0);
99
99
  const fulfillmentFee = acc[3] + (Boolean(isCanonicalMerchant) ? this.calculateFulfillmentFee(commission) : 0);
100
100
  return [priceSold, commissionFee, productionFee, fulfillmentFee].map((v) => Number(Number(v).toFixed(2)));
@@ -25,6 +25,7 @@ export default class SellerProductLedger extends Base {
25
25
  toObj(): SellerProductLedgerType;
26
26
  generateSchemaForTypesense(name?: string): {
27
27
  default_sorting_field: string;
28
+ enable_nested_fields: boolean;
28
29
  fields: {
29
30
  name: string;
30
31
  type: string;
@@ -55,10 +55,12 @@ class SellerProductLedger extends Base_1.default {
55
55
  generateSchemaForTypesense(name = 'prod_sellerProductLedger_20240223') {
56
56
  return {
57
57
  default_sorting_field: 'createdAtTimestamp',
58
+ enable_nested_fields: true,
58
59
  fields: [
59
60
  { name: 'documentId', type: 'string', facet: false },
60
61
  { name: 'createdAtTimestamp', type: 'int64', facet: true },
61
62
  { name: 'updatedAtTimestamp', type: 'int64', facet: true },
63
+ { name: 'pendingReturnPeriodStartTimestamp', type: 'int64', facet: true },
62
64
  { name: 'merchantId', type: 'string', facet: true },
63
65
  { name: 'merchantCurrency', type: 'string', facet: true },
64
66
  { name: 'sellerId', type: 'string', facet: true },
@@ -75,6 +77,7 @@ class SellerProductLedger extends Base_1.default {
75
77
  { name: 'amountOwedToSeller', type: 'float', facet: true },
76
78
  { name: 'status', type: 'string', facet: true },
77
79
  { name: 'feesForSeller', type: 'object[]', facet: false },
80
+ { name: 'tags', type: 'string[]', facet: true },
78
81
  ],
79
82
  name,
80
83
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.5.4",
3
+ "version": "3.5.6",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",