export enum ERROR_TYPES { TINK_LOANS = 'TINK_LOANS', LOAN_PARTS = 'LOAN_PARTS', MAIN_APPLICANT = 'MAIN_APPLICANT', PERSONS = 'PERSONS', FORM_ID = 'FORM_ID', } export enum ERROR_STATUSES { MISSING = 'MISSING', } export type ERROR_REASON_TYPE = { type: ERROR_TYPES; status: ERROR_STATUSES; description: string; }; export const ERROR_REASONS: { [key: string]: ERROR_REASON_TYPE } = { missingTinkloans: { type: ERROR_TYPES.TINK_LOANS, status: ERROR_STATUSES.MISSING, description: 'Found no tink loans. Try to login with another bank.', }, missingLoanParts: { type: ERROR_TYPES.LOAN_PARTS, status: ERROR_STATUSES.MISSING, description: 'Found no loan parts. Did you go trough the previous steps?', }, missingMainApplicant: { type: ERROR_TYPES.MAIN_APPLICANT, status: ERROR_STATUSES.MISSING, description: 'Found main applicant. Did you go trough the previous steps?', }, missingPersons: { type: ERROR_TYPES.PERSONS, status: ERROR_STATUSES.MISSING, description: 'Found no persons. Did you go trough the previous steps?', }, missingFormId: { type: ERROR_TYPES.FORM_ID, status: ERROR_STATUSES.MISSING, description: 'Missing form id. Did you set the formId to the context?', }, };