Map Fanavaran people and licences by party role; allow unlisted base-info lookups.

Resolve driver, owner, and policyholder from participants when they differ, prefer real licence / driverLicenseDate over dummies, and fall back unknown /lookups/fanavaran/{name} to car/base-info/{name} (including vehicle-groups).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-26 16:42:21 +03:30
parent 4f8fe04380
commit fc1c117b93
9 changed files with 590 additions and 44 deletions

View File

@@ -582,7 +582,8 @@ export class LookupsController {
@ApiOperation({
summary: "List configured Fanavaran remote lookups",
description:
"Returns the lookup names available through /lookups/fanavaran/{lookupName}.",
"Returns catalogue entries for /lookups/fanavaran/{lookupName}. " +
"Unlisted car/base-info slugs still work via the same route (fallback).",
})
async listFanavaranRemoteLookups() {
return this.lookupsService.listFanavaranRemoteLookups().map((lookup) => ({
@@ -596,12 +597,14 @@ export class LookupsController {
@ApiOperation({
summary: "Fetch a Fanavaran remote lookup by name",
description:
"Generic cached Fanavaran lookup fetcher for configured lookup names, including GEN.08 expertise lookups.",
"Generic cached Fanavaran lookup fetcher. Configured names use their catalogue URL; " +
"unlisted slugs (e.g. vehicle-groups) fall back to car/base-info/{lookupName}.",
})
@ApiParam({
name: "lookupName",
description:
"Configured Fanavaran lookup name, for example inspection-place, drop-amount-status, car-components, accident-level, expert-status",
"Fanavaran lookup slug, for example vehicle-groups, inspection-place, car-components. " +
"Unconfigured names are fetched from car/base-info/{lookupName}.",
})
@ApiOkResponse({
description: "Returns cached or live Fanavaran lookup data",