import { EntityTypes, EventTypes, Roles, RootRoles, NamedRoutes } from '../api/enums'; import { Type } from '@angular/core'; import { HttpErrorResponse, HttpRequest, HttpEvent, HttpHandler } from '@angular/common/http'; import { Observable } from 'rxjs'; import { TranslocoConfig, HashMap } from '@ngneat/transloco'; import { EventModel } from '../api/events'; export interface RequiredIdClaims { name: boolean; cpf: boolean; emailAddress: boolean; customClaims?: string[]; } export interface EntityNavigator { navigate(entityType: EntityTypes, id: string): void; } export interface EventViewer { show(event: EventModel): Promise; } export interface LacunaSpaModuleParams { listOfRoles: string[]; listOfRootRoles: string[]; translocoConfig?: Partial; languageToLocalesMapping?: HashMap; requiredIdClaims?: RequiredIdClaims; asyncInit?: boolean; entityNavigator?: Type; eventViewer?: Type; getEntityIcon?: GetEntityIconFunction; getEventTypeName?: GetEventTypeNameFunction; listOfUnassignableRoles?: string[]; getRoleName?: GetRoleNameFunction; getBreadcrumbDisplayName?: GetBreadcrumbDisplayNameFunction; enableLanguageRoute?: boolean; oidcRedirectPath?: string; showReturnToHomeButton?: boolean; enableInvisibleCaptcha?: boolean; } export interface GetEntityIconFunction { (entityType: EntityTypes): string | null; } export interface GetEventTypeNameFunction { (eventType: EventTypes): string | null; } export interface GetRoleNameFunction { (role: Roles | RootRoles): string | null; } export interface GetBreadcrumbDisplayNameFunction { (namedRoute: NamedRoutes): string | null; } export interface OnApiErrorFunction { (err: HttpErrorResponse, request: HttpRequest, next: HttpHandler): Observable>; }