@bytebrand/export-cars 1.21.1 → 1.21.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.
@@ -1,3 +1,2 @@
1
1
  export * from './converter.utils';
2
2
  export * from './validator.utils';
3
- export * from './date-time.utils';
@@ -16,5 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./converter.utils"), exports);
18
18
  __exportStar(require("./validator.utils"), exports);
19
- __exportStar(require("./date-time.utils"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.21.1",
3
+ "version": "1.21.3",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -9,18 +9,16 @@
9
9
  "build": "nest build",
10
10
  "prepublishOnly": "npm run build",
11
11
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
12
- "lint": "gts lint",
13
- "clean": "gts clean",
14
- "fix": "gts fix",
12
+ "lint": "eslint -c .eslintrc.js --ext .ts src/",
15
13
  "start:dev": "nest start --watch"
16
14
  },
17
15
  "dependencies": {
18
- "@bytebrand/autode-request": "^1.19.0",
19
- "@bytebrand/car-basic-data-scope": "^9.11.22",
16
+ "@bytebrand/autode-request": "^1.19.2",
17
+ "@bytebrand/car-basic-data-scope": "^9.11.24",
20
18
  "@bytebrand/car-description": "^1.13.8",
21
19
  "@bytebrand/car-schema": "^3.14.15",
22
- "@bytebrand/chunkable": "^5.19.6",
23
- "@bytebrand/cronicle-helper": "^1.21.6",
20
+ "@bytebrand/chunkable": "^5.19.8",
21
+ "@bytebrand/cronicle-helper": "^1.21.8",
24
22
  "@bytebrand/i18n-dictionaries": "^1.5.0",
25
23
  "@bytebrand/import-helper": "^0.45.0",
26
24
  "@bytebrand/schema-tools": "^3.18.8",
@@ -41,7 +39,6 @@
41
39
  },
42
40
  "devDependencies": {
43
41
  "@nestjs/cli": "^10.1.18",
44
- "@nestjs/schematics": "^10.0.2",
45
42
  "@types/google-spreadsheet": "^3.3.0",
46
43
  "@types/inquirer": "^8.2.4",
47
44
  "@types/lodash": "^4.14.186",
@@ -53,8 +50,6 @@
53
50
  "eslint-plugin-prettier": "^4.0.0",
54
51
  "gts": "^3.1.1",
55
52
  "prettier": "^2.3.2",
56
- "source-map-support": "^0.5.20",
57
- "ts-loader": "^9.2.3",
58
53
  "ts-node": "^10.0.0",
59
54
  "tsconfig-paths": "4.1.0",
60
55
  "typescript": "^5.2.2"
@@ -62,5 +57,5 @@
62
57
  "engines": {
63
58
  "node": ">=14.0.0"
64
59
  },
65
- "gitHead": "ea5d40b0c028d75455818e481f87d74bd18f820c"
60
+ "gitHead": "e468bc18943d991b472e8395ce7660464f9da67a"
66
61
  }
@@ -1,6 +1,5 @@
1
1
  import { CACHE_MANAGER } from '@nestjs/cache-manager';
2
2
  import { Inject, Injectable } from '@nestjs/common';
3
- import { getMonthsDiff } from '../utils/date-time.utils';
4
3
  import { DataSchemes } from '@bytebrand/car-schema';
5
4
  import { Cache } from 'cache-manager';
6
5
  import Bottleneck from 'bottleneck';
@@ -33,12 +32,6 @@ export class CarService {
33
32
  return rules.every(e => e.applyRule(car));
34
33
  }
35
34
 
36
- // deprecated
37
- isCarNew({ car }: { car: DataSchemes.Car }): boolean {
38
- if (car.mainData.mileage) return car.mainData.mileage <= 100;
39
- else return getMonthsDiff(new Date((car.mainData.firstRegistration as number) * 1000), new Date()) <= 12;
40
- }
41
-
42
35
  async getOwner(ownerId: string): Promise<DealerProfileInterface> {
43
36
  let owner = (await this.cacheManager.get(ownerId)) as DealerProfileInterface;
44
37
  if (!owner) {
@@ -12,7 +12,6 @@ import { MappingRules } from '../interfaces/mapping-rules.interface';
12
12
  import { isNotEmptyArray } from '../utils';
13
13
  import { ConfigService } from '../services';
14
14
  import { ExportType } from '../enums';
15
- import axios from "axios";
16
15
 
17
16
  const vinGenerator = require('vin-generator');
18
17
 
@@ -323,14 +322,14 @@ export class MobileTransformer {
323
322
  private getVatRate(car: DataSchemes.Car): string {
324
323
  const isVatDeductible = get(car, 'price.vatDeductible', false);
325
324
  if (isVatDeductible) {
326
- return String(get(car, 'price.vatRate', 19));
325
+ return String(car.price.vatRate || 19);
327
326
  }
328
327
  return '0';
329
328
  }
330
329
 
331
330
  private getCurrentSalesPrice(car: DataSchemes.Car): string {
332
331
  const vat = get(car, 'price.vatDeductible', false);
333
- const currentSalesPrice = get(car, 'price.currentSalesPrice', null);
332
+ const currentSalesPrice = get(car, 'price.currentSalesPrice');
334
333
  if (vat) {
335
334
  const vatRate = get(car, 'price.vatRate', 19);
336
335
  const price = (currentSalesPrice * 100) / (100 + vatRate);
@@ -440,7 +439,7 @@ export class MobileTransformer {
440
439
  }
441
440
 
442
441
  private booleanToMobile_vatCalc(fieldValue: boolean): string {
443
- return this.booleanToString(!fieldValue);
442
+ return this.booleanToString(fieldValue);
444
443
  }
445
444
 
446
445
  private selectorToCategoryOrClass_selector(fieldValue: string): string {
@@ -1,3 +1,2 @@
1
1
  export * from './converter.utils';
2
2
  export * from './validator.utils';
3
- export * from './date-time.utils';
@@ -1 +0,0 @@
1
- export declare const IMAGES_SORT_ORDER: any;
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IMAGES_SORT_ORDER = void 0;
4
- exports.IMAGES_SORT_ORDER = {
5
- ext_f_right: { order: 1 },
6
- ext_f_cowl: { order: 2 },
7
- ext_f_left: { order: 3 },
8
- ext_l_main: { order: 4 },
9
- ext_b_left: { order: 5 },
10
- ext_b_main: { order: 6 },
11
- ext_b_trunk: { order: 7 },
12
- ext_b_right: { order: 8 },
13
- ext_r_main: { order: 9 },
14
- ext_f_main: { order: 10 },
15
- ext_f_main_opened: { order: 11 },
16
- ext_f_left_opened: { order: 12 },
17
- ext_l_main_opened: { order: 13 },
18
- ext_b_left_opened: { order: 14 },
19
- ext_b_main_opened: { order: 15 },
20
- ext_b_right_opened: { order: 16 },
21
- ext_r_main_opened: { order: 17 },
22
- ext_f_right_opened: { order: 18 },
23
- conext_f_main: { order: 19 },
24
- conext_f_left: { order: 20 },
25
- conext_l_main: { order: 21 },
26
- conext_b_left: { order: 22 },
27
- conext_b_main: { order: 23 },
28
- conext_b_right: { order: 24 },
29
- conext_r_main: { order: 25 },
30
- conext_f_right: { order: 26 },
31
- ext_feat_engine: { order: 27 },
32
- int_f_ipanel1: { order: 28 },
33
- int_f_ipanel2: { order: 29 },
34
- int_f_ipanel5: { order: 30 },
35
- int_f_driverseats: { order: 31 },
36
- int_f_assistantseats: { order: 32 },
37
- int_b_rearseats: { order: 33 },
38
- int_f_fandrseats: { order: 34 },
39
- int_f_driverdashboard: { order: 35 },
40
- int_f_doordriverside: { order: 36 },
41
- int_f_stickshift: { order: 37 },
42
- int_b_trunk: { order: 38 },
43
- int_t_sunroof: { order: 39 },
44
- int_t_panorama_sunroof: { order: 40 },
45
- int_f_ipanel3: { order: 41 },
46
- int_f_ipanel4: { order: 42 },
47
- int_feat_seatheating: { order: 43 },
48
- ext_feat_ledlights: { order: 44 },
49
- ext_feat_cruisecontrol: { order: 45 },
50
- int_feat_climatization: { order: 46 },
51
- int_feat_bluetooth: { order: 47 },
52
- ext_feat_rainsensor: { order: 48 },
53
- ext_feat_rims: { order: 49 },
54
- ext_feat_parkassistant: { order: 50 },
55
- ext_feat_lightsensor: { order: 51 },
56
- int_feat_handsfree: { order: 52 },
57
- int_feat_headupdisplay: { order: 53 },
58
- ext_feat_trafficsignrec: { order: 54 },
59
- ext_feat_auxiliaryheating: { order: 55 },
60
- ext_feat_laneassistant: { order: 56 },
61
- int_feat_startstop: { order: 57 },
62
- int_feat_breakassistant: { order: 58 },
63
- ext_feat_nightassistant: { order: 59 },
64
- dam_out_left: { order: 1000 },
65
- dam_out_front: { order: 2000 },
66
- dam_out_back: { order: 3000 },
67
- dam_out_right: { order: 4000 },
68
- dam_out_top: { order: 5000 },
69
- gen_feature: { order: 6000 },
70
- simple_temp: { order: 7000 },
71
- simple_: { order: 8000 }
72
- };
73
- //# sourceMappingURL=images.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"images.js","sourceRoot":"","sources":["../../src/constants/images.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAQ;IACpC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACzB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACzB,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACzB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IACzB,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EA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B,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5B,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5B,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACzB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const STRING_INPUT = "stringIN";
2
- export declare const NUMBER_INPUT = "numberIN";
3
- export declare const DATE_INPUT = "dateIN";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DATE_INPUT = exports.NUMBER_INPUT = exports.STRING_INPUT = void 0;
4
- exports.STRING_INPUT = 'stringIN';
5
- exports.NUMBER_INPUT = 'numberIN';
6
- exports.DATE_INPUT = 'dateIN';
7
- //# sourceMappingURL=rule-input.contants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rule-input.contants.js","sourceRoot":"","sources":["../../src/constants/rule-input.contants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,UAAU,CAAC;AAC1B,QAAA,YAAY,GAAG,UAAU,CAAC;AAC1B,QAAA,UAAU,GAAG,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getMonthsDiff(date1: Date, date2: Date): number;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMonthsDiff = void 0;
4
- function getMonthsDiff(date1, date2) {
5
- let start_date = date1;
6
- let end_date = date2;
7
- let inverse = false;
8
- if (date1 > date2) {
9
- start_date = date2;
10
- end_date = date1;
11
- inverse = true;
12
- }
13
- end_date = new Date(end_date);
14
- end_date.setDate(end_date.getDate() + 1);
15
- const yearsDifference = end_date.getFullYear() - start_date.getFullYear();
16
- const monthsDifference = end_date.getMonth() - start_date.getMonth();
17
- const daysDifference = end_date.getDate() - start_date.getDate();
18
- return (inverse ? -1 : 1) * (yearsDifference * 12 + monthsDifference + daysDifference / 30);
19
- }
20
- exports.getMonthsDiff = getMonthsDiff;
21
- //# sourceMappingURL=date-time.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-time.utils.js","sourceRoot":"","sources":["../../src/utils/date-time.utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,KAAW,EAAE,KAAW;IACpD,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,IAAI,KAAK,GAAG,KAAK,EAAE;QACjB,UAAU,GAAG,KAAK,CAAC;QACnB,QAAQ,GAAG,KAAK,CAAC;QACjB,OAAO,GAAG,IAAI,CAAC;KAChB;IAED,QAAQ,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAEzC,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IAC1E,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC;IACrE,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;IAEjE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,GAAG,EAAE,GAAG,gBAAgB,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;AAC9F,CAAC;AAnBD,sCAmBC"}
@@ -1,69 +0,0 @@
1
- export const IMAGES_SORT_ORDER: any = {
2
- ext_f_right: { order: 1 },
3
- ext_f_cowl: { order: 2 },
4
- ext_f_left: { order: 3 },
5
- ext_l_main: { order: 4 },
6
- ext_b_left: { order: 5 },
7
- ext_b_main: { order: 6 },
8
- ext_b_trunk: { order: 7 },
9
- ext_b_right: { order: 8 },
10
- ext_r_main: { order: 9 },
11
- ext_f_main: { order: 10 },
12
- ext_f_main_opened: { order: 11 },
13
- ext_f_left_opened: { order: 12 },
14
- ext_l_main_opened: { order: 13 },
15
- ext_b_left_opened: { order: 14 },
16
- ext_b_main_opened: { order: 15 },
17
- ext_b_right_opened: { order: 16 },
18
- ext_r_main_opened: { order: 17 },
19
- ext_f_right_opened: { order: 18 },
20
- conext_f_main: { order: 19 },
21
- conext_f_left: { order: 20 },
22
- conext_l_main: { order: 21 },
23
- conext_b_left: { order: 22 },
24
- conext_b_main: { order: 23 },
25
- conext_b_right: { order: 24 },
26
- conext_r_main: { order: 25 },
27
- conext_f_right: { order: 26 },
28
- ext_feat_engine: { order: 27 },
29
- int_f_ipanel1: { order: 28 },
30
- int_f_ipanel2: { order: 29 },
31
- int_f_ipanel5: { order: 30 },
32
- int_f_driverseats: { order: 31 },
33
- int_f_assistantseats: { order: 32 },
34
- int_b_rearseats: { order: 33 },
35
- int_f_fandrseats: { order: 34 },
36
- int_f_driverdashboard: { order: 35 },
37
- int_f_doordriverside: { order: 36 },
38
- int_f_stickshift: { order: 37 },
39
- int_b_trunk: { order: 38 },
40
- int_t_sunroof: { order: 39 },
41
- int_t_panorama_sunroof: { order: 40 },
42
- int_f_ipanel3: { order: 41 },
43
- int_f_ipanel4: { order: 42 },
44
- int_feat_seatheating: { order: 43 },
45
- ext_feat_ledlights: { order: 44 },
46
- ext_feat_cruisecontrol: { order: 45 },
47
- int_feat_climatization: { order: 46 },
48
- int_feat_bluetooth: { order: 47 },
49
- ext_feat_rainsensor: { order: 48 },
50
- ext_feat_rims: { order: 49 },
51
- ext_feat_parkassistant: { order: 50 },
52
- ext_feat_lightsensor: { order: 51 },
53
- int_feat_handsfree: { order: 52 },
54
- int_feat_headupdisplay: { order: 53 },
55
- ext_feat_trafficsignrec: { order: 54 },
56
- ext_feat_auxiliaryheating: { order: 55 },
57
- ext_feat_laneassistant: { order: 56 },
58
- int_feat_startstop: { order: 57 },
59
- int_feat_breakassistant: { order: 58 },
60
- ext_feat_nightassistant: { order: 59 },
61
- dam_out_left: { order: 1000 },
62
- dam_out_front: { order: 2000 },
63
- dam_out_back: { order: 3000 },
64
- dam_out_right: { order: 4000 },
65
- dam_out_top: { order: 5000 },
66
- gen_feature: { order: 6000 },
67
- simple_temp: { order: 7000 },
68
- simple_: { order: 8000 }
69
- };
@@ -1,3 +0,0 @@
1
- export const STRING_INPUT = 'stringIN';
2
- export const NUMBER_INPUT = 'numberIN';
3
- export const DATE_INPUT = 'dateIN';
@@ -1,20 +0,0 @@
1
- export function getMonthsDiff(date1: Date, date2: Date): number {
2
- let start_date = date1;
3
- let end_date = date2;
4
- let inverse = false;
5
-
6
- if (date1 > date2) {
7
- start_date = date2;
8
- end_date = date1;
9
- inverse = true;
10
- }
11
-
12
- end_date = new Date(end_date);
13
- end_date.setDate(end_date.getDate() + 1);
14
-
15
- const yearsDifference = end_date.getFullYear() - start_date.getFullYear();
16
- const monthsDifference = end_date.getMonth() - start_date.getMonth();
17
- const daysDifference = end_date.getDate() - start_date.getDate();
18
-
19
- return (inverse ? -1 : 1) * (yearsDifference * 12 + monthsDifference + daysDifference / 30);
20
- }