rerobe-js-orm 4.7.0 → 4.7.1

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.
@@ -134,6 +134,6 @@ export default class Order extends Base {
134
134
  })[];
135
135
  name: string;
136
136
  };
137
- toObjForTypesense(): TypesenseOrderObj;
137
+ toObjForTypesense(productSkus?: string[]): TypesenseOrderObj;
138
138
  toOrderInputObj(): any;
139
139
  }
@@ -346,6 +346,12 @@ class Order extends Base_1.default {
346
346
  name: 'productIds',
347
347
  type: 'string[]',
348
348
  },
349
+ {
350
+ facet: true,
351
+ name: 'productSkus',
352
+ type: 'string[]',
353
+ optional: true,
354
+ },
349
355
  {
350
356
  facet: true,
351
357
  name: 'tags',
@@ -394,7 +400,7 @@ class Order extends Base_1.default {
394
400
  name: 'dev_orders_20220809',
395
401
  };
396
402
  }
397
- toObjForTypesense() {
403
+ toObjForTypesense(productSkus) {
398
404
  const image = this.lineItems && this.lineItems[0] && this.lineItems[0].image && this.lineItems[0].image.originalSrc
399
405
  ? this.lineItems[0].image.originalSrc
400
406
  : 'https://res.cloudinary.com/ribbn/image/fetch/e_blur:1000,o_20,q_50/https://cdn.shopify.com/s/files/1/0261/9686/9172/products/7AC16810-F519-4665-8891-7163EB29FBB7_1000x1000.jpg%3Fv%3D1634827512';
@@ -424,6 +430,7 @@ class Order extends Base_1.default {
424
430
  paymentType: this.utilities.sanitizeString(this.paymentType),
425
431
  shippingType: this.utilities.sanitizeString(this.shippingType),
426
432
  productIds: this.utilities.sanitzeStringArr(this.lineItems.map((l) => l.productId)),
433
+ productSkus: productSkus ? this.utilities.sanitzeStringArr(productSkus) : undefined,
427
434
  productTitles: this.utilities.sanitzeStringArr(this.lineItems.map((l) => l.title)),
428
435
  productBrands: this.utilities.sanitzeStringArr(this.lineItems.map((l) => l.brand)),
429
436
  tags: this.utilities.sanitzeStringArr(this.tags),
@@ -918,6 +918,7 @@ type TypesenseOrderObj = {
918
918
  paymentType: string;
919
919
  shippingType: string;
920
920
  productIds: string[];
921
+ productSkus?: string[];
921
922
  productTitles: string[];
922
923
  productBrands: string[];
923
924
  tags: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.7.0",
3
+ "version": "4.7.1",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",