feat: Add Jaguar and Land Rover brand services

- Create JaguarService with SAJ WMI code mapping
- Create LandRoverService with SAL WMI code mapping
- Both brands use P5_MODERN architecture with /p5jlr API path
- Register services in pl24.module.ts and pl24-factory.service.ts
- Update brands index to export JLR services

Tested with VIN SAJAF511866E91130:
- VIN decode: working
- Categories: 23 main groups
- Parts fetch: 90-106 parts per category
- Schema images: downloaded via token-based imageserver
- Hotspots: extracted correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Semih
2026-01-30 08:02:12 +01:00
parent f6cfae2eb6
commit fdb78383c3
6 changed files with 131 additions and 3 deletions

View File

@@ -25,5 +25,8 @@ export * from './mercedes-group';
// VW Group (Bentley)
export * from './vw-group';
// JLR (Jaguar Land Rover)
export * from './jlr';
// Others
export * from './others';

View File

@@ -1,7 +1,9 @@
/**
* Jaguar Land Rover Brand Services
* (Jaguar, Land Rover are handled by the main PL24Service)
*
* JLR uses P5_MODERN architecture with JWT API.
* Both brands share the /p5jlr API path but have separate catalogs.
*/
// JLR brands are currently handled by the main PL24Service
// This file exists for future expansion if needed
export * from './jaguar.service';
export * from './landrover.service';

View File

@@ -0,0 +1,54 @@
/**
* Jaguar PL24 Service
*
* Handles:
* - jaguar_parts
*
* WMI Codes:
* - SAJ: Jaguar UK (Castle Bromwich)
*
* Architecture: P5_MODERN (JWT API)
* API Path: /p5jlr
*
* Flow:
* 1. VIN decode via directAccess
* 2. Main groups via vin_maingroups
* 3. Illustrations via vin_illus (3-step JLR flow)
* 4. Parts via vin_bomdetails (using btnr from illustrations)
* 5. Images via imageserver with token
*/
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PL24AuthService } from '../../pl24-auth.service';
import { PL24BaseService, BrandConfig } from '../../core/pl24-base.service';
@Injectable()
export class JaguarService extends PL24BaseService {
protected readonly brandConfig: BrandConfig = {
brandName: 'Jaguar',
catalogs: [
{
serviceName: 'jaguar_parts',
catalogPath: '/p5jlr',
vehicleTypes: ['car'],
wmiCodes: ['SAJ'],
displayName: 'Jaguar',
},
],
};
constructor(
authService: PL24AuthService,
configService: ConfigService,
) {
super(authService, configService, 'JaguarService');
}
/**
* Get all supported service names
*/
getSupportedServices(): string[] {
return this.brandConfig.catalogs.map(c => c.serviceName);
}
}

View File

@@ -0,0 +1,54 @@
/**
* Land Rover PL24 Service
*
* Handles:
* - landrover_parts
*
* WMI Codes:
* - SAL: Land Rover UK (Solihull)
*
* Architecture: P5_MODERN (JWT API)
* API Path: /p5jlr (shared with Jaguar)
*
* Flow:
* 1. VIN decode via directAccess
* 2. Main groups via vin_maingroups
* 3. Illustrations via vin_illus (3-step JLR flow)
* 4. Parts via vin_bomdetails (using btnr from illustrations)
* 5. Images via imageserver with token
*/
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PL24AuthService } from '../../pl24-auth.service';
import { PL24BaseService, BrandConfig } from '../../core/pl24-base.service';
@Injectable()
export class LandRoverService extends PL24BaseService {
protected readonly brandConfig: BrandConfig = {
brandName: 'Land Rover',
catalogs: [
{
serviceName: 'landrover_parts',
catalogPath: '/p5jlr',
vehicleTypes: ['car'],
wmiCodes: ['SAL'],
displayName: 'Land Rover',
},
],
};
constructor(
authService: PL24AuthService,
configService: ConfigService,
) {
super(authService, configService, 'LandRoverService');
}
/**
* Get all supported service names
*/
getSupportedServices(): string[] {
return this.brandConfig.catalogs.map(c => c.serviceName);
}
}

View File

@@ -30,6 +30,8 @@ import { DaciaService } from './brands/renault-group/dacia.service';
import { AlpineService } from './brands/renault-group/alpine.service';
import { SmartService } from './brands/mercedes-group/smart.service';
import { BentleyService } from './brands/vw-group/bentley.service';
import { JaguarService } from './brands/jlr/jaguar.service';
import { LandRoverService } from './brands/jlr/landrover.service';
import { ManService } from './brands/others/man.service';
import { MitsubishiService } from './brands/others/mitsubishi.service';
import { SuzukiService } from './brands/others/suzuki.service';
@@ -79,6 +81,9 @@ export class PL24FactoryService {
private readonly smartService: SmartService,
// VW (Bentley)
private readonly bentleyService: BentleyService,
// JLR
private readonly jaguarService: JaguarService,
private readonly landRoverService: LandRoverService,
// Others
private readonly manService: ManService,
private readonly mitsubishiService: MitsubishiService,
@@ -108,6 +113,8 @@ export class PL24FactoryService {
this.alpineService,
this.smartService,
this.bentleyService,
this.jaguarService,
this.landRoverService,
this.manService,
this.mitsubishiService,
this.suzukiService,
@@ -317,6 +324,7 @@ export class PL24FactoryService {
'Volvo', 'Polestar',
'Renault', 'Dacia', 'Alpine',
'smart', 'Bentley',
'Jaguar', 'Land Rover',
'MAN', 'Mitsubishi', 'Suzuki',
];

View File

@@ -57,6 +57,10 @@ import { SmartService } from './brands/mercedes-group/smart.service';
// Brand services - VW Group
import { BentleyService } from './brands/vw-group/bentley.service';
// Brand services - JLR
import { JaguarService } from './brands/jlr/jaguar.service';
import { LandRoverService } from './brands/jlr/landrover.service';
// Brand services - Others
import { ManService } from './brands/others/man.service';
import { MitsubishiService } from './brands/others/mitsubishi.service';
@@ -84,6 +88,9 @@ const brandServices = [
SmartService,
// VW Group
BentleyService,
// JLR
JaguarService,
LandRoverService,
// Others
ManService,
MitsubishiService,