export declare enum codigosResposta { sucesso = 200, erroConhecido = 400, erroPermissao = 401, erroDesconhecido = 500 } export type tipoRespostaSucesso = { cod: codigosResposta.sucesso; valor: T; mensagem: undefined; eErro: false; eCerto: true; detalhes?: string[]; }; export type tipoRespostaErro = { cod: codigosResposta.erroConhecido | codigosResposta.erroDesconhecido | codigosResposta.erroPermissao; valor: undefined; mensagem: string; eErro: true; eCerto: false; detalhes?: string[]; }; export type tipoResposta = tipoRespostaSucesso | tipoRespostaErro; export declare const gerarRespostas: (registrarErroInterno: (erro: T) => Partial) => { valor: (valor: T_1, detalhes?: string[]) => tipoRespostaSucesso; valorTrue: (detalhes?: string[]) => tipoRespostaSucesso; erro: (mensagem: string, detalhes?: string[]) => tipoRespostaErro; erroPermissao: (mensagem?: string | undefined | null, detalhes?: string[]) => tipoRespostaErro; erroInterno: (parametros: T, mensagem?: string) => tipoRespostaErro; }; /** * Uso de respostas em comuns */ export declare const respostaComuns: { valor: (valor: T, detalhes?: string[]) => tipoRespostaSucesso; valorTrue: (detalhes?: string[]) => tipoRespostaSucesso; erro: (mensagem: string, detalhes?: string[]) => tipoRespostaErro; erroPermissao: (mensagem?: string | undefined | null, detalhes?: string[]) => tipoRespostaErro; erroInterno: (parametros: unknown, mensagem?: string) => tipoRespostaErro; };