YARA-1035

This commit is contained in:
SepehrYahyaee
2026-06-20 14:51:01 +03:30
parent 2e4b10455b
commit 4fabed77e5
27 changed files with 1329 additions and 74 deletions

View File

@@ -0,0 +1,37 @@
/** External inquiry kinds toggled per insurer (`clients.settings.externalInquiries`). */
export const EXTERNAL_INQUIRY_TYPES = [
"thirdPartyPlate",
"carBodyPlate",
"personalIdentity",
"sheba",
"drivingLicense",
"carOwnership",
] as const;
export type ExternalInquiryType = (typeof EXTERNAL_INQUIRY_TYPES)[number];
/** Safe default: mock/off until explicitly enabled for an insurer. */
export const DEFAULT_EXTERNAL_INQUIRY_FLAGS: Record<
ExternalInquiryType,
boolean
> = {
thirdPartyPlate: false,
carBodyPlate: false,
personalIdentity: false,
sheba: false,
drivingLicense: false,
carOwnership: false,
};
export type ExternalInquiryFlags = Record<ExternalInquiryType, boolean>;
export interface MockInquiryCompanyContext {
companyId: string;
companyName: string;
}
export function mergeExternalInquiryFlags(
partial?: Partial<ExternalInquiryFlags> | null,
): ExternalInquiryFlags {
return { ...DEFAULT_EXTERNAL_INQUIRY_FLAGS, ...(partial ?? {}) };
}