forked from Yara724/api
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user