rerobe-js-orm 3.0.3 → 3.0.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.
@@ -222,74 +222,16 @@ class Product extends Base_1.default {
222
222
  }
223
223
  toProductInputObjForShopifyV2(locationId, weightUnit) {
224
224
  const shopifyId = this.attributes.shopifyId;
225
+ const passedTags = this.filterAttributes.tags && Array.isArray(this.filterAttributes.tags) ? this.filterAttributes.tags : [];
225
226
  const productInputObj = {
226
227
  title: this.attributes.title,
227
228
  descriptionHtml: this.attributes.description,
228
229
  productType: this.filterAttributes.productType,
229
230
  vendor: this.attributes.vendorId,
230
231
  tags: [
231
- `gender_attribute:${this.filterAttributes.gender}`,
232
- `productcategory_attribute:${this.filterAttributes.productCategory}`,
233
- `producttype_attribute:${this.filterAttributes.productType}`,
234
- `brand_attribute:${this.filterAttributes.brand}`,
235
- `pricerange_attribute:${this.filterAttributes.priceRange}`,
236
- `color_attribute:${this.filterAttributes.color}`,
237
- `condition_attribute:${this.filterAttributes.condition}`,
238
- `publishType:${this.consignmentAttributes.publishType}`,
239
- this.filterAttributes.jeanSize ? `jeansize_attribute:${this.filterAttributes.jeanSize}` : null,
240
- this.filterAttributes.shoeSize ? `shoesize_attribute:${this.filterAttributes.shoeSize}` : null,
241
- this.filterAttributes.documentId ? `documentId:${this.filterAttributes.documentId}` : null,
242
- this.consignmentAttributes.sellRequestId ? `sellRequestId:${this.consignmentAttributes.sellRequestId}` : null,
243
- this.consignmentAttributes.reRobeCommission
244
- ? `reRobeCommission:${this.consignmentAttributes.reRobeCommission}`
245
- : null,
246
- this.consignmentAttributes.suggestedResalePrice
247
- ? `suggestedResalePrice:${this.consignmentAttributes.suggestedResalePrice}`
248
- : null,
249
- this.consignmentAttributes.nextAvailableSeason
250
- ? `nextAvailableSeason:${this.consignmentAttributes.nextAvailableSeason}`
251
- : null,
252
- this.consignmentAttributes.notesForProductionTeam
253
- ? `notesForProductionTeam:${this.consignmentAttributes.notesForProductionTeam}`
254
- : null,
255
- this.consignmentAttributes.reviewedBy ? `reviewedBy:${this.consignmentAttributes.reviewedBy}` : null,
256
- this.consignmentAttributes.conditionRemarks
257
- ? `conditionRemarks:${this.consignmentAttributes.conditionRemarks}`
258
- : null,
259
- this.consignmentAttributes.productRemarks
260
- ? `productRemarks:${this.consignmentAttributes.productRemarks}`
261
- : null,
262
- this.consignmentAttributes.status ? `status:${this.consignmentAttributes.status}` : null,
263
- this.consignmentAttributes.purchasePrice ? `purchasePrice:${this.consignmentAttributes.purchasePrice}` : null,
264
- this.consignmentAttributes.yearPurchased ? `yearPurchased:${this.consignmentAttributes.yearPurchased}` : null,
265
- this.consignmentAttributes.rejectedReason
266
- ? `rejectedReason:${this.consignmentAttributes.rejectedReason}`
267
- : null,
268
- this.consignmentAttributes.dateSold ? `dateSold:${this.consignmentAttributes.dateSold}` : null,
269
- this.consignmentAttributes.dateInQualityControl
270
- ? `dateInQualityControl:${this.consignmentAttributes.dateInQualityControl}`
271
- : null,
272
- this.consignmentAttributes.dateInPendingPublication
273
- ? `dateInPendingPublication:${this.consignmentAttributes.dateInPendingPublication}`
274
- : null,
275
- this.consignmentAttributes.dateListedOnline
276
- ? `dateListedOnline:${this.consignmentAttributes.dateListedOnline}`
277
- : null,
278
- this.consignmentAttributes.sizeComment ? `sizeComment:${this.consignmentAttributes.sizeComment}` : null,
279
- this.consignmentAttributes.salePrice ? `salePrice:${this.consignmentAttributes.salePrice}` : null,
280
- this.consignmentAttributes.isOnSale ? `isOnSale:${this.consignmentAttributes.isOnSale}` : null,
281
- this.consignmentAttributes.discountType ? `discountType:${this.consignmentAttributes.discountType}` : null,
282
- this.consignmentAttributes.discountValue ? `discountValue:${this.consignmentAttributes.discountValue}` : null,
283
- this.consignmentAttributes.selectedForClearance
284
- ? `selectedForClearance:${this.consignmentAttributes.selectedForClearance}`
285
- : null,
286
- ]
287
- .concat(this.filterAttributes.clothingSize.map((s) => `clothingsize_attribute:${s}`))
288
- .concat(this.filterAttributes.productStyle.map((s) => `productstyle_attribute:${s}`))
289
- .concat(this.materialCompTagsArrayForShopify().map((mc) => `materialcomposition_attribute:${mc}`))
290
- .concat(this.consignmentAttributes.previousSellers.map((prevSellerGid) => `previousSeller:${prevSellerGid}`))
291
- .concat(this.consignmentAttributes.salesChannel.map((s) => `salesChannel:${s}`))
292
- .filter((t) => t),
232
+ this.filterAttributes.documentId ? `ribbnId:${this.filterAttributes.documentId}` : null,
233
+ ...passedTags,
234
+ ].filter((t) => t),
293
235
  variants: [
294
236
  {
295
237
  inventoryPolicy: 'DENY',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",