import { ReviewDocument } from '../model/review.model'; import type { InputConfigType } from '../appConfig.type'; import type { AddressInfo } from '../model/address.model'; import type { UseFormReturn } from 'react-hook-form'; /** * Remove every whitespace character from a submitted identifier. * * An applicant pastes or reads a document number the way it is printed and * quoted — grouped, e.g. "1234 5678 901" for a Nigerian NIN — and previously had * to delete the spaces by hand for the field to validate. The country configs * now accept the grouped form; this is the other half, and the half that makes * it safe: GDC does **not** normalise what it is given * (`r.Identity.NationalID = document.IDNumber`, * connectors/driver/gdc/service/request.go), so a space that survived submit * would fail the national-ID match silently at the connector. * * Whitespace only. Hyphens and brackets are left alone — a Thai card prints * 0-0000-00000-00-0 and an HKID prints A123456(7), and their own connectors * handle those separators; stripping them here would change values those checks * are known to accept. * * `undefined` passes through untouched: `preserveDisabled` relies on a disabled * field arriving as `undefined` to tell it apart from one the applicant cleared, * and coercing it to '' would wipe the stored value on submit (FDEL-49985). * (FDEL-52694) */ export declare const stripWhitespace: (value: T) => T; export declare const useReviewUpdateFactory: () => { getScannedData: { bankAccountNumber: string | null; dateOfBirth: string; givenName: import("../../../../common/shared/models/general").Nullable | undefined; middleName: import("../../../../common/shared/models/general").Nullable | undefined; familyName: import("../../../../common/shared/models/general").Nullable | undefined; extraData: { [field: string]: string | number | boolean | null; }; address: AddressInfo; documentId: import("../../../../common/shared/models/general").Nullable; verified: { electronic: import("../../../../common/shared/models/general").Nullable; manual: import("../../../../common/shared/models/general").Nullable; }; idType: import("../../../../common/shared/models/general").Nullable; idSubType: import("../../../../common/shared/models/general").Nullable; country: import("../../../../common/shared/models/general").Nullable; region: import("../../../../common/shared/models/general").Nullable; idNumber: import("../../../../common/shared/models/general").Nullable; idExpiry: import("../../../../common/shared/models/general").Nullable; ocrResult: { status?: import("../../../../../modules").OCRStatus; runDate?: string; mismatch?: string[]; } & Record; gender: import("../../../../common/shared/models/general").Nullable; scans: import("../../../../common/shared/models/Document").Scan[]; validation: { manual: { isValid: import("../../../../common/shared/models/general").Nullable; }; electronic: { validationReport: import("../../../../common/shared/models/general").Nullable; isValid: import("../../../../common/shared/models/general").Nullable; }; }; isPersisted: boolean; }; allScannedDocuments: { bankAccountNumber: string | null; givenName: import("../../../../common/shared/models/general").Nullable | undefined; middleName: import("../../../../common/shared/models/general").Nullable | undefined; familyName: import("../../../../common/shared/models/general").Nullable | undefined; dateOfBirth: string; extraData: { [field: string]: string | number | boolean | null; }; address: AddressInfo; documentId: import("../../../../common/shared/models/general").Nullable; verified: { electronic: import("../../../../common/shared/models/general").Nullable; manual: import("../../../../common/shared/models/general").Nullable; }; idType: import("../../../../common/shared/models/general").Nullable; idSubType: import("../../../../common/shared/models/general").Nullable; country: import("../../../../common/shared/models/general").Nullable; region: import("../../../../common/shared/models/general").Nullable; idNumber: import("../../../../common/shared/models/general").Nullable; idExpiry: import("../../../../common/shared/models/general").Nullable; ocrResult: { status?: import("../../../../../modules").OCRStatus; runDate?: string; mismatch?: string[]; } & Record; gender: import("../../../../common/shared/models/general").Nullable; scans: import("../../../../common/shared/models/Document").Scan[]; validation: { manual: { isValid: import("../../../../common/shared/models/general").Nullable; }; electronic: { validationReport: import("../../../../common/shared/models/general").Nullable; isValid: import("../../../../common/shared/models/general").Nullable; }; }; isPersisted: boolean; }[]; updateModule: (form: UseFormReturn, showPersonalFields?: boolean) => Promise; updateAddress: (data: AddressInfo, visibilityFn?: (name: string) => boolean) => void; getUpdatedGlobalConfig: (form: UseFormReturn) => { type: import("../appConfig.type").DocumentTypes; countries?: import("../appConfig.type").CountryConfig; documentSourceLabel?: string; }[] | undefined; fieldIsVisible: (name: string) => boolean; getFieldIsVisibleFor: (docIdType: string, docCountry: string, docRegion: string, personalCountry: string, personalRegion: string) => (name: string) => boolean; updateNames: (data: ReviewDocument, visibilityFn?: (name: string) => boolean) => void; individual: import("../../../../common/types").ModuleContext; }; //# sourceMappingURL=useReviewUpdateFactory.hook.d.ts.map