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.
package/lib/models/Order.d.ts
CHANGED
package/lib/models/Order.js
CHANGED
|
@@ -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),
|