Merge pull request 'YARA-1218' (#261) from s.yahyaee/yara724-api:main into main

Reviewed-on: Yara724/api#261
This commit is contained in:
2026-08-09 14:08:46 +03:30
3 changed files with 29 additions and 0 deletions

View File

@@ -89,6 +89,16 @@ export class RunInquiriesV3Dto {
@IsOptional()
@IsString()
insurerLicense?: string;
@ApiPropertyOptional({
example: "1",
description:
"Driving licence type code from GET /lookups/driving-licence-types. " +
"Optional — used in V4 FileMaker flow.",
})
@IsOptional()
@IsString()
licenseType?: string;
}
/**
@@ -152,4 +162,14 @@ export class RunInquiriesVinV3Dto {
@IsOptional()
@IsString()
insurerLicense?: string;
@ApiPropertyOptional({
example: "1",
description:
"Driving licence type code from GET /lookups/driving-licence-types. " +
"Optional — used in V4 FileMaker flow.",
})
@IsOptional()
@IsString()
licenseType?: string;
}

View File

@@ -23,6 +23,8 @@ export class Person {
@Prop() nationalCodeOfDriver?: string;
@Prop() insurerLicense?: string;
@Prop() driverLicense?: string;
/** Driving licence type code from the Fanavaran lookup (GET /lookups/driving-licence-types). */
@Prop() licenseType?: string;
@Prop({ type: Boolean })
driverIsInsurer?: boolean;

View File

@@ -8690,6 +8690,8 @@ export class RequestManagementService {
party.person.insurerLicense = partyData.insurerLicense;
if (partyData.driverLicense)
party.person.driverLicense = partyData.driverLicense;
if ((partyData as any).licenseType)
(party.person as any).licenseType = (partyData as any).licenseType;
if (!party.vehicle) party.vehicle = {} as any;
party.vehicle.plateId = this.plateToPlateIdString(partyData.plate);
@@ -9502,6 +9504,8 @@ export class RequestManagementService {
party.person.insurerLicense = partyData.insurerLicense;
if (partyData.driverLicense)
party.person.driverLicense = partyData.driverLicense;
if ((partyData as any).licenseType)
(party.person as any).licenseType = (partyData as any).licenseType;
if (!party.vehicle) party.vehicle = {} as any;
party.vehicle.plateId = partyData.vin; // store VIN as vehicle identifier
@@ -11117,6 +11121,7 @@ export class RequestManagementService {
clientId: p.person?.clientId
? String(p.person.clientId)
: undefined,
licenseType: p.person?.licenseType ?? undefined,
},
insurance: p.insurance
? {
@@ -11211,6 +11216,7 @@ export class RequestManagementService {
driverIsInsurer: p.person?.driverIsInsurer,
userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
},
insurance: p.insurance ? {
company: p.insurance.company,
@@ -11317,6 +11323,7 @@ export class RequestManagementService {
driverIsInsurer: p.person?.driverIsInsurer,
userId: p.person?.userId ? String(p.person.userId) : undefined,
clientId: p.person?.clientId ? String(p.person.clientId) : undefined,
licenseType: p.person?.licenseType ?? undefined,
},
insurance: p.insurance ? {
company: p.insurance.company,