import { Router } from '@angular/router'; import { CoreSessionService } from './session.service'; import { FormGroup } from '@angular/forms'; import { ApiSchema, SubDomain, ApiParamsSchema } from '../../models/interfaces'; import { CoreHttpService } from '../../utilities/services/http.service'; import { TranslateService } from '@ngx-translate/core'; import { NgxUiLoaderService } from 'ngx-ui-loader'; import { CoreUtilityService } from '../../utilities/services/utility.service'; import { CoreDataShareService } from './data-share.service'; import { MatDialog } from '@angular/material/dialog'; export declare class CoreCommonService { private router; private coreSessionService; private coreHttpService; private translate; private ngxUiLoaderService; private coreUtilityService; private coreDataShareService; dialog: MatDialog; environment: any; private updateLeftPanelSubject; updateLeftPanel$: import("rxjs").Observable; private showAlertBarSubject; showAlertBar$: import("rxjs").Observable; private applicantSubject; primaryApplicantData$: import("rxjs").Observable; private headerUpdateSubject; headerUpdate$: import("rxjs").Observable; constructor(router: Router, coreSessionService: CoreSessionService, coreHttpService: CoreHttpService, translate: TranslateService, ngxUiLoaderService: NgxUiLoaderService, coreUtilityService: CoreUtilityService, coreDataShareService: CoreDataShareService, dialog: MatDialog, environment: any); /** * Get api end point from schema * @param moduleObj - module object * @param apiName - api name */ getApiEndPoint(moduleObj: object, apiName: string): ApiSchema; /** * This method will construct url with params * @param baseUrl - base url * @param paramKey - param key * @param paramValue - param value */ constructUrlWithParams(baseUrl: string, paramKey: string, paramValue: string | number): string; /** * Read file function * @param data - file data */ readFile(data: any): Promise; /** * This method will extract field of specific type * @param type - type * @param fields - fields */ extractFieldOfType(type: string, fields: Array): object; /** * This method will extract and construct params * @param params - params * @param form - form */ extractAndConstructParams(params: Array, form?: FormGroup, responseValue?: any, ...scopes: any): {}; /** * This method will extract and display default value * @param params - params * @param form - current form */ fetchDefaultValue(params: Array, form?: FormGroup, ...scopes: any): Promise; /** * This method will call the schema functions by name */ callFunctionByName(fnName: string, param: any, scopes: any): any; /** * This method will route user to login */ routeToLogin(): void; /** * This method will route user to not-found */ routeToNotFound(): void; /** * This method will route user to module post logged in to the system using name * @param routeName - route name */ routeToPostLoginModule(routeName: string): void; /** * Clears the User Data */ clearStorage(): void; /** * This method will logout the user and route to login */ logoutAndRouteToLogin(): Promise; /** * This method will logout the user and route to not-found */ logoutAndRouteToNotFound(): Promise; /** * This method will set values to session storage * @param applicantGroupAlphId - app group id * @param applicationAlphId - app id * @param visaCategoryId - visa category id * @param visaTypeId - visa type id * @param routeId - route id */ setSessionValues(applicantGroupAlphId: any, applicationAlphId: any, visaCategoryId: any, visaTypeId: any, routeId: any): void; /** * This method will take care of tasks which need to be completed post login * @param token - token * @param appSchema - app schema * @param status - status */ doAfterLogin(token: any, appSchema: any, status: any): Promise; /** * This method will extract api as per domain * @param apis - api data */ extractApiAsPerDomain(apis: SubDomain): any; /** * filters data based on module accessibility * @param appSchema - app schema */ moduleAccessibilityFilter(appSchema: object): any; /** * filters schema based on criteria selected in Eligibility-Criteria module * @param appSchema - app schema * @param moduleBucketId - bucklet id * @param selectedValue - value selected by user */ visaTypeAccessibilityFilter(appSchema: object, moduleBucketId: string, selectedValue?: number): any; /** * filters schema based on criteria selected in Eligibility-Criteria module * @param params - params containing mapping of selected value to bucket id * @param selectedValue - value selected by user */ getBucketIdFromValue(params: Array, selectedValue: any): string; /** * This function will filter control based on selected value. * Usually called on value change from eligibility criteria. Function ref in schema * @param actualSchema - application schema * @param selectedVal - selected value */ filterControlsOnSelectedValues(actualSchema: object, selectedValue: any): object; /** * This method will show alert msgs * @param message - msg * @param isError - flag to check if msg is error msg or not */ showAlertBar(message: any, isError: any): void; /** * This method will call show alert msgs * @param response contain statusCode, status, isError */ onResponsesAlertBar({ statusCode, status, isError }: { statusCode: any; status: any; isError: any; }): void; /** * This method will update the data to left panel * @param leftPanel - data */ updateLeftPanel(leftPanel: any): void; /** * This method will give the primary applicant details from leftpanel api call * @param applicant - applicant data */ primaryApplicantDetails(applicant: any): void; /** * getter function to fetch image based on mission */ get imagePath(): string; /** * This method is used for translation * @param msg - The msg to be translated */ transalte(msg: any): string; /** * This method will save the current modules data as draft in the system */ autoSave(): Promise; /** * This method will get the application status */ getApplicationStatus(): Promise; } export interface UrlParams { key: string; value: string; }