@bytebrand/export-cars 1.21.42 → 1.21.44

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.21.42",
3
+ "version": "1.21.44",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -39,8 +39,7 @@ export class SantanderExporter implements Exporter {
39
39
  const filteredData = chunk.data.filter(({ car }) => !(!car.mainData.firstRegistration && car.mainData.mileage > 1000))
40
40
  for (const data of filteredData) {
41
41
  const { car, images } = data;
42
- if (!images.length)
43
- console.log('no images', car._id);
42
+
44
43
  const transformedData = await santanderTransformer.transform(car, images);
45
44
  const transformedNormalizedData = await santanderTransformer.normalizeCarData(transformedData);
46
45
  await santanderCSVBuilder.addItem(transformedNormalizedData);
@@ -174,6 +174,9 @@ export interface GoogleXmlItem {
174
174
  energy_efficiency_class?: string;
175
175
  installment?: { paybackPeriod: any; monthlyInstallment: any };
176
176
 
177
+ vehicle_fulfillment: string;
178
+ store_code: string;
179
+ link_template: string;
177
180
  additional_image_link: string[];
178
181
  model: string;
179
182
  VIN: string;
@@ -97,7 +97,6 @@ export class ImagesService {
97
97
 
98
98
  getDefaultImages(carId: string, images: ImboImageResponseInterface[], ignoreDefImages: boolean): Array<string> {
99
99
  if (!isNotEmptyArray(images)) {
100
- console.log('getDefaultImages', images, carId);
101
100
  return this.DEFAULT_IMAGES;
102
101
  }
103
102
 
@@ -40,6 +40,8 @@ export class GoogleTransformer {
40
40
 
41
41
  return {
42
42
  google_product_category: '916',
43
+ vehicle_fulfillment: 'online',
44
+ store_code: 'Online_shop',
43
45
  title: this.getTitle(car),
44
46
  product_type: this.getCategory(car),
45
47
  VIN: this.transformService.vinCode(car),
@@ -48,6 +50,7 @@ export class GoogleTransformer {
48
50
  additional_image_link: transformedImages.slice(1, 10),
49
51
  ads_redirect: this.getLink(car),
50
52
  link: this.getLink(car),
53
+ link_template: `${this.getLink(car)}?store=Online_shop`,
51
54
  condition: this.mapState(car),
52
55
  price: this.getPrice(car),
53
56
  // certified_pre-owned: '',