@bytebrand/export-cars 1.18.2 → 1.18.3
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/dist/exporters/google.exporter.js +0 -2
- package/dist/exporters/google.exporter.js.map +1 -1
- package/dist/interfaces/export-item.interface.d.ts +2 -1
- package/dist/transformers/google.transformer.js +2 -1
- package/dist/transformers/google.transformer.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/exporters/google.exporter.ts +0 -2
- package/src/interfaces/export-item.interface.ts +2 -1
- package/src/transformers/google.transformer.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/export-cars",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.3",
|
|
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": "
|
|
63
|
+
"gitHead": "efda218f2127000fb4cc38f13a5986df1ba3bdd3"
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|