@bytebrand/export-cars 1.15.0 → 1.16.0

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.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -15,15 +15,15 @@
15
15
  "start:dev": "nest start --watch"
16
16
  },
17
17
  "dependencies": {
18
- "@bytebrand/autode-request": "^1.14.12",
19
- "@bytebrand/car-basic-data-scope": "^9.11.6",
20
- "@bytebrand/car-description": "^1.11.8",
21
- "@bytebrand/car-schema": "^3.14.6",
22
- "@bytebrand/chunkable": "^5.15.12",
23
- "@bytebrand/cronicle-helper": "^1.17.12",
18
+ "@bytebrand/autode-request": "^1.14.17",
19
+ "@bytebrand/car-basic-data-scope": "^9.11.8",
20
+ "@bytebrand/car-description": "^1.12.1",
21
+ "@bytebrand/car-schema": "^3.14.7",
22
+ "@bytebrand/chunkable": "^5.15.19",
23
+ "@bytebrand/cronicle-helper": "^1.17.20",
24
24
  "@bytebrand/i18n-dictionaries": "^1.4.3",
25
- "@bytebrand/import-helper": "^0.42.0",
26
- "@bytebrand/schema-tools": "^3.16.8",
25
+ "@bytebrand/import-helper": "^0.42.8",
26
+ "@bytebrand/schema-tools": "^3.17.1",
27
27
  "@bytebrand/zipper": "^2.1.2",
28
28
  "@nestjs/common": "^9.0.0",
29
29
  "@nestjs/core": "^9.0.0",
@@ -33,7 +33,7 @@
33
33
  "google-spreadsheet": "^3.3.0",
34
34
  "lodash": "^4.17.21",
35
35
  "moment": "^2.29.4",
36
- "nest-commander": "^3.1.0",
36
+ "nest-commander": "^3.11.0",
37
37
  "reflect-metadata": "^0.1.13",
38
38
  "vin-generator": "^1.0.1"
39
39
  },
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=14.0.0"
62
62
  },
63
- "gitHead": "79a1a0ee02b40faac76b13d71c455804220e6056"
63
+ "gitHead": "5680df3275c11c1d0140bc4b1e43b829388153bc"
64
64
  }
package/src/app.module.ts CHANGED
@@ -13,13 +13,11 @@ import {
13
13
  CarService,
14
14
  ImagesService,
15
15
  } from './services';
16
- import { InputQuestions } from './input.questions';
17
16
  import { ExportRunner } from './export.command';
18
17
 
19
18
  @Module({
20
19
  imports: [CacheModule.register()],
21
20
  providers: [
22
- InputQuestions,
23
21
  ExportRunner,
24
22
  ConfigService,
25
23
  RequestService,
@@ -11,6 +11,6 @@ export class AutoboerseConfig extends Config {
11
11
  this.outputFiles = [
12
12
  `${this.pathesConfig.localConvertedDirectory}/api_export_cars_${ExportType.AUTOBOERSE}.${FileType.XML}`,
13
13
  ];
14
- this.imageUrl = this.environmentConfig[params.environment].imageUrl;
14
+ this.imageUrl = this.environmentConfig[params.environment].baseImageUrl;
15
15
  }
16
16
  }
@@ -1,7 +1,7 @@
1
1
  import { IModixItemsList } from '../../interfaces';
2
2
 
3
3
  export const UsageTypeList: IModixItemsList = {
4
- selector_usageType_preRegistration: { value: '' },
4
+ selector_usageType_preRegistration: { value: 'One-day registration', atributes: { id: 6 } },
5
5
  selector_usageType_demonstrationCar: { value: 'Demonstration car', atributes: { id: 5 } },
6
6
  selector_usageType_employeesCar: { value: "Employee's car", atributes: { id: 3 } },
7
7
  };
@@ -9,5 +9,5 @@ export const UsageTypeList: IModixItemsList = {
9
9
  export const UsageConditionList: IModixItemsList = {
10
10
  selector_condition_used: { value: 'Used vehicle', atributes: { id: 2 } },
11
11
  selector_condition_new: { value: 'New vehicle', atributes: { id: 1 } },
12
- selector_unknown: { value: 'N/A' },
12
+ selector_unknown: { value: 'Used vehicle', atributes: { id: 2 } },
13
13
  };
@@ -10,7 +10,7 @@ export const VehicleClassList: IModixItemsList = {
10
10
  selector_vehicleClass_motorBike: { value: 'Motorbike', atributes: { id: 5 } },
11
11
  selector_vehicleClass_forklift: { value: 'Forklift', atributes: { id: 13 } },
12
12
  selector_vehicleClass_camperVan: { value: 'Caravan', atributes: { id: 4 } },
13
- selector_vehicleClass_car: { value: 'Classic car', atributes: { id: 2 } },
13
+ selector_vehicleClass_car: { value: 'Passenger car', atributes: { id: 2 } },
14
14
  selector_vehicleClass_trailer: { value: 'Trailer', atributes: { id: 8 } },
15
15
  selector_vehicleClass_bus: { value: 'Bus', atributes: { id: 11 } },
16
16
  selector_unknown: { value: 'Passenger car', atributes: { id: 1 } },
@@ -129,7 +129,7 @@ export class ModixXmlBuilder extends XMLBuilderBase {
129
129
  }
130
130
 
131
131
  mapPrice({ grossPrice, vatReclaimable }: priceItem) {
132
- let item = `\n<prices>\n<price vatReclaimable="${vatReclaimable}" currency="EUR" type="1">\n`;
132
+ let item = `\n<prices>\n<price vatReclaimable="${vatReclaimable}" currency="EUR" type="2">\n`;
133
133
  item += this.getElement('grossPrice', grossPrice.value, false, grossPrice.atributes);
134
134
  item += '</price>\n</prices>\n';
135
135
  return item;
@@ -138,20 +138,20 @@ export class ModixTransformer {
138
138
  }
139
139
 
140
140
  private getAccident(car: DataSchemes.Car): IAtributeWrapItem {
141
- const accident = get(car, 'maindata.accidentDamaged', null);
141
+ const accident = get(car, 'mainData.accidentDamaged', null);
142
142
 
143
143
  return { value: accident };
144
144
  }
145
145
 
146
146
  private getUsageData(car: DataSchemes.Car): IAtributeWrapItem {
147
- const usageType = get(car, 'maindata.usageType', '');
148
- const usage_by_selector = get(UsageTypeList, usageType);
147
+ const usageType = get(car, 'mainData.usageType', '');
148
+ const usageBySelector = get(UsageTypeList, usageType);
149
149
 
150
- if (usage_by_selector) {
151
- return usage_by_selector;
150
+ if (usageBySelector) {
151
+ return usageBySelector;
152
152
  }
153
153
 
154
- const condition = get(car, 'maindata.condition', 'selector_unknown');
154
+ const condition = get(car, 'mainData.condition', 'selector_unknown');
155
155
  return get(UsageConditionList, condition);
156
156
  }
157
157
 
@@ -165,7 +165,7 @@ export class ModixTransformer {
165
165
  return metallic ? { value: 'metallic', atributes: { id: 3 } } : { value: 'solid', atributes: { id: 1 } };
166
166
  }
167
167
 
168
- private getColorNameData(car): IAtributeWrapItem {
168
+ private getColorNameData(car: DataSchemes.Car): IAtributeWrapItem {
169
169
  const colorSelection = get(car, 'exterior.exteriorColor', 'selector_unknown');
170
170
  return get(BodyColorList, colorSelection);
171
171
  }
@@ -1,3 +0,0 @@
1
- export declare class InputQuestions {
2
- parseInput(input: string): any;
3
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.InputQuestions = void 0;
13
- const nest_commander_1 = require("nest-commander");
14
- let InputQuestions = class InputQuestions {
15
- parseInput(input) {
16
- return JSON.parse(input);
17
- }
18
- };
19
- __decorate([
20
- (0, nest_commander_1.Question)({
21
- message: 'Input:',
22
- name: 'input',
23
- }),
24
- __metadata("design:type", Function),
25
- __metadata("design:paramtypes", [String]),
26
- __metadata("design:returntype", void 0)
27
- ], InputQuestions.prototype, "parseInput", null);
28
- InputQuestions = __decorate([
29
- (0, nest_commander_1.QuestionSet)({ name: 'input-questions' })
30
- ], InputQuestions);
31
- exports.InputQuestions = InputQuestions;
32
- //# sourceMappingURL=input.questions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.questions.js","sourceRoot":"","sources":["../src/input.questions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAuD;AAGhD,IAAM,cAAc,GAApB,MAAM,cAAc;IAKzB,UAAU,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACF,CAAA;AAPC;IAAC,IAAA,yBAAQ,EAAC;QACR,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,OAAO;KACd,CAAC;;;;gDAGD;AAPU,cAAc;IAD1B,IAAA,4BAAW,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;GAC5B,cAAc,CAQ1B;AARY,wCAAc"}
@@ -1,12 +0,0 @@
1
- import { Question, QuestionSet } from 'nest-commander';
2
-
3
- @QuestionSet({ name: 'input-questions' })
4
- export class InputQuestions {
5
- @Question({
6
- message: 'Input:',
7
- name: 'input',
8
- })
9
- parseInput(input: string) {
10
- return JSON.parse(input);
11
- }
12
- }