import { FSXARemoteApi } from '../modules'; import { FetchByFilterBody, FetchElementRouteBody, FetchNavigationRouteBody, FetchProjectPropertiesBody } from '../routes'; import { ParamValidationError } from './parameterValidation'; import { FetchResponse, NavigationData, NormalizedProjectPropertyResponse, ProjectProperties } from '../types'; export type FetchWrapperResult = FetchWrapperSuccess | FetchWrapperError; type FetchWrapperSuccess = { success: true; data: T; }; type FetchWrapperError = { success: false; error: { statusCode: number; message: string; }; originalError: Error | ParamValidationError; }; /** * Useful Error Messages for Validation Errors. * Can be used as an Error Message to send to the client */ export declare const PARAM_VALIDATION_ERROR_TO_MESSAGE: Record; /** * Provides Wrapper Functions fot the given api. * @param api FSXAApi to wrap * @param loggerName Creates a logger with the given name * @returns */ export declare const useEndpointIntegrationWrapper: (api: FSXARemoteApi, loggerName?: string) => { fetchElementWrapper: (params: FetchElementRouteBody, logContext?: string) => Promise; fetchNavigationWrapper: (params: FetchNavigationRouteBody, logContext?: string) => Promise>; fetchByFilterWrapper: (params: FetchByFilterBody, logContext?: string) => Promise>; fetchProjectPropertiesWrapper: (params: FetchProjectPropertiesBody, logContext?: string) => Promise>; }; export {};