@bytebrand/export-cars 1.5.0 → 1.5.2

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.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -65,5 +65,5 @@
65
65
  "engines": {
66
66
  "node": ">=14.0.0"
67
67
  },
68
- "gitHead": "5f497bf539ee87da5a7eead3779c8b88e329edb4"
68
+ "gitHead": "437fbc95e504b5fb0e389d9d18e031fff18307d5"
69
69
  }
@@ -7,7 +7,7 @@ export class KleinanzeigeFocusConfig extends Config {
7
7
  super(params);
8
8
  this.pathesConfig.localConvertedDirectory = this.environmentConfig[params.environment].localConvertedDirectory;
9
9
  this.pathesConfig.remoteDirectory = this.environmentConfig[params.environment].remoteDirectory;
10
- this.imageUrl = this.environmentConfig[params.environment].imageUrl;
10
+ this.imageUrl = this.environmentConfig[params.environment].baseImageUrl;
11
11
  this.outputFiles = [`api_export_cars_${ExportType.KLEINANZEIGE_FOCUS}.${FileTypes.xml}`];
12
12
  }
13
13
  }
@@ -42,7 +42,7 @@ export class CarService {
42
42
  try {
43
43
  owner = await this.bottleneck.schedule(() => this.requestService.upaRequest.getDealerProfile(ownerId));
44
44
  } catch (e) {
45
- console.log(e);
45
+ console.log(e.message);
46
46
  if (e.statusCode !== HttpStatus.NOT_FOUND) {
47
47
  throw e;
48
48
  }
@@ -3,7 +3,10 @@ import { ConfigService } from './config.service';
3
3
  import { UserService } from './user.service';
4
4
 
5
5
  export class MarketingImagesService {
6
- constructor(private readonly configService: ConfigService, private readonly userService: UserService) {}
6
+ constructor(
7
+ private readonly configService: ConfigService,
8
+ private readonly userService: UserService
9
+ ) {}
7
10
 
8
11
  async getImagesUrl(images: any, imageUrl: string, carId: string): Promise<{ url: string }[]> {
9
12
  const transformedImages = this.transformImagesArrayIntoObject(images);
@@ -36,13 +36,19 @@ import {
36
36
  FB_MIN_MILEAGES,
37
37
  TIMESTAMP_FIRST_YEAR,
38
38
  } from '../constants/fb.constants';
39
+ import { UserService } from 'src/services';
39
40
 
40
41
  @Injectable()
41
42
  export class FbTransformer {
42
43
  private translator: TranslatorExtended;
43
44
  private postalCodesService: DePostalCodesService;
45
+ private marketingImages: MarketingImagesService;
44
46
 
45
- constructor(private readonly configService: ConfigService, private readonly marketingImages: MarketingImagesService) {
47
+ constructor(
48
+ private readonly configService: ConfigService,
49
+ private readonly userService: UserService
50
+ ) {
51
+ this.marketingImages = new MarketingImagesService(configService, userService);
46
52
  const dict = { ...de, ...deVehicleProps, ...deVehicleDetailsPage };
47
53
  this.translator = new TranslatorExtended(dict);
48
54
  this.postalCodesService = DePostalCodesService.getInstance();
@@ -138,7 +138,7 @@ export class RubrikkTransformer {
138
138
  private getImagesLinks(carId: string, images: ImboImageResponseInterface[]): string[] {
139
139
  if (isNotEmptyArray(images)) {
140
140
  return images.map((image: ImboImageResponseInterface) => {
141
- return `https://${this.configService.config.url}/carimage/${carId}/${image.imageIdentifier}/large`;
141
+ return `https://${this.configService.config.baseImageUrl}/carimage/${carId}/${image.imageIdentifier}/large`;
142
142
  });
143
143
  }
144
144
  return [];