forked from Yara724/api
lookup of person role added + inquiry by unique identifier + put driver id in payload
This commit is contained in:
@@ -71,6 +71,11 @@ export const FANAVARAN_REMOTE_LOOKUPS: FanavaranRemoteLookupDefinition[] = [
|
||||
url: `${FANAVARAN_LOOKUP_BASE_URL}/car/base-info/vehicle-kinds`,
|
||||
cacheFile: "vehicle-kinds.json",
|
||||
},
|
||||
{
|
||||
name: "person-role",
|
||||
url: `${FANAVARAN_LOOKUP_BASE_URL}/common/code-list/person-role`,
|
||||
cacheFile: "person-role.json",
|
||||
},
|
||||
];
|
||||
|
||||
export const TEJARAT_STATIC_ACCIDENT_FILES = {
|
||||
|
||||
@@ -255,6 +255,24 @@ export class FanavaranLookupService {
|
||||
return this.fetchFromFanavaran(clientKey, url);
|
||||
}
|
||||
|
||||
async inquiryByUniqueIdentifier(
|
||||
clientKey: FanavaranClientKey,
|
||||
params: {
|
||||
nationalCode: string;
|
||||
birthYear: number;
|
||||
birthMonth: number;
|
||||
birthDay: number;
|
||||
},
|
||||
): Promise<unknown> {
|
||||
const url =
|
||||
`${FANAVARAN_LOOKUP_BASE_URL}/common/parties/inquiry-by-unique-identifier` +
|
||||
`?NationalCode=${encodeURIComponent(params.nationalCode)}` +
|
||||
`&BirthYear=${params.birthYear}` +
|
||||
`&BirthMonth=${params.birthMonth}` +
|
||||
`&BirthDay=${params.birthDay}`;
|
||||
return this.fetchFromFanavaran(clientKey, url);
|
||||
}
|
||||
|
||||
mapFanavaranAccidentCausesToReasonOptions(
|
||||
causes: unknown,
|
||||
): { id: number; label: string; fanavaran: number }[] {
|
||||
|
||||
Reference in New Issue
Block a user