@bytebrand/export-cars 1.18.2 → 1.18.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.18.2",
3
+ "version": "1.18.4",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=14.0.0"
62
62
  },
63
- "gitHead": "9c4e0fe4d3349e64a8600ac1693c50f284ecc7b8"
63
+ "gitHead": "e21a835e5d2af2dd27eb97bd30d0a8a1c97fe5ff"
64
64
  }
@@ -33,9 +33,7 @@ export class GoogleExporter implements Exporter {
33
33
  chunk.data = chunk.data.filter(car => this.carService.filterCar(car, this.rulesService.rules));
34
34
 
35
35
  for (const data of chunk.data) {
36
- console.time(`Transform ${data.car._id}`);
37
36
  const car = await googleTransformer.transform(data);
38
- console.timeEnd(`Transform ${data.car._id}`);
39
37
  await googleXmlBuilder.addItem(car);
40
38
  this.carService.counter.countCar(data.images);
41
39
  }
@@ -149,10 +149,11 @@ export interface GoogleXmlItem {
149
149
  availability: string;
150
150
  brand: any;
151
151
  price: string;
152
- sales_price: string;
152
+ sale_price: string;
153
153
  energy_efficiency_class: string;
154
154
  color: string;
155
155
  installment: { paybackPeriod: any; monthlyInstallment: any };
156
+ custom_label_0: string;
156
157
  }
157
158
 
158
159
  export interface RubrikkXmlItem {
@@ -41,10 +41,11 @@ export class GoogleTransformer {
41
41
  availability: this.getAvailability(car),
42
42
  brand: get(car, 'mainData.make', ''),
43
43
  price: this.getRetailPrice(car),
44
- sales_price: this.getPrice(car),
44
+ sale_price: this.getPrice(car),
45
45
  energy_efficiency_class: this.getEnergyClass(car),
46
46
  color: this.getColor(car),
47
47
  installment: this.getInstallment(car),
48
+ custom_label_0: `${this.getInstallment(car)} EUR mtl.`,
48
49
  };
49
50
  }
50
51