import { MRequestMiddelware } from "../../common-types"; declare abstract class MErrorLoggerHelper { [key: string]: string; } declare class ErrorLoggerResponseHelper { errorLogged: MErrorLoggerHelper; } interface IValidateRequestModalResponse { errorLogger: MErrorLoggerHelper | true; first: string; values: string[]; keys: string[]; keysValues: string[][]; } declare function errorLoggerRegister(errorLoggerRegister: MErrorLoggerHelper): void; declare function errorLoggerResponse(errorLoggerResponse: ErrorLoggerResponseHelper): MErrorLoggerHelper | true; /** * * @param payload - payload of the request to be validated * @returns - true if the request is valid, otherwise returns an object with error messages * @description - this function is used to validate the request payload. if the payload has a Validate function, it will be called and the response will be returned. if the response has any error messages, it will be returned as an object with error messages. if there are no error messages, true will be returned. * @example - validateRequestModal({ Validate: () => { return { name: "Name is required" } } }) // returns { name: "Name is required" } * @example - validateRequestModal({ Validate: () => { return {} } }) // returns true */ declare const validateRequestModal: (payload: MRequestMiddelware) => IValidateRequestModalResponse | true; export { errorLoggerRegister, MErrorLoggerHelper, errorLoggerResponse, ErrorLoggerResponseHelper, validateRequestModal };