melhorias no build

This commit is contained in:
Luiz Silva 2024-05-07 09:27:49 -03:00
parent cd6d9c35a2
commit 1d6a109fc4
387 changed files with 765 additions and 23443 deletions

1
dist-types/aleatorio.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export declare const aleatorio: (tamanho?: number) => string;

View file

@ -0,0 +1,48 @@
import { z } from "zod";
export declare const InterfaceAuntenticacao: z.ZodObject<{
codigo_usuario: z.ZodString;
nome_usuario: z.ZodString;
email_usuario: z.ZodString;
documento_usuario: z.ZodString;
organizacao: z.ZodString;
rotas: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
sistema: z.ZodString;
sistema_cor: z.ZodString;
sistema_nome: z.ZodString;
sistema_logo: z.ZodString;
/** as url de integração serão armazenadas pelo sistema resíduos e identificado pelo código do token */
codigo_token: z.ZodString;
url_usuarios: z.ZodString;
url_empreendedores: z.ZodString;
url_empreendimentos: z.ZodString;
}, "strip", z.ZodTypeAny, {
codigo_usuario?: string;
nome_usuario?: string;
email_usuario?: string;
documento_usuario?: string;
organizacao?: string;
rotas?: {};
sistema?: string;
sistema_cor?: string;
sistema_nome?: string;
sistema_logo?: string;
codigo_token?: string;
url_usuarios?: string;
url_empreendedores?: string;
url_empreendimentos?: string;
}, {
codigo_usuario?: string;
nome_usuario?: string;
email_usuario?: string;
documento_usuario?: string;
organizacao?: string;
rotas?: {};
sistema?: string;
sistema_cor?: string;
sistema_nome?: string;
sistema_logo?: string;
codigo_token?: string;
url_usuarios?: string;
url_empreendedores?: string;
url_empreendimentos?: string;
}>;

2
dist-types/autorizacoes/index.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
/** Sistemas vão conversar por meio de autorizações tipar eles aqui */
export * from "./auntenticacaoResiduos";

14
dist-types/constantes.d.ts vendored Normal file
View file

@ -0,0 +1,14 @@
export declare const uuid_null = "00000000-0000-0000-0000-000000000000";
/** Colunas Presentes n maioria das tabelas */
export declare enum camposComuns {
codigo = "codigo",
excluido = "excluido",
data_hora_criacao = "data_hora_criacao",
data_hora_atualizacao = "data_hora_atualizacao",
codigo_usuario_criacao = "codigo_usuario_criacao",
codigo_usuario_atualizacao = "codigo_usuario_atualizacao"
}
/** Palavras comumente usadas */
export declare enum tx {
token = "token"
}

26
dist-types/consulta.d.ts vendored Normal file
View file

@ -0,0 +1,26 @@
export declare enum operadores {
"=" = "=",
"!=" = "!=",
">" = ">",
">=" = ">=",
"<" = "<",
"<=" = "<=",
like = "like",
in = "in"
}
export type tipoFiltro = {
coluna: string;
valor: any;
operador: keyof typeof operadores | operadores;
ou?: boolean;
};
export type interfaceConsulta = {
offset?: number;
limit?: number;
filtros?: tipoFiltro[];
ordem?: string;
ordemTipo?: "asc" | "desc";
colunas?: string[];
apenasConsulta?: boolean;
apenasContagem?: boolean;
};

1
dist-types/ecosistema/index.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export * from "./urls";

1
dist-types/ecosistema/urls.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";

10
dist-types/index.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
export * from "./respostas";
export * from "./autorizacoes";
export * from "./constantes";
export * from "./consulta";
export * from "./aleatorio";
export * from "./texto_busca";
export * from "./unidades_medida";
export * from "./uuid";
export * from "./provedores";
export * from "./ecosistema";

4
dist-types/provedores.d.ts vendored Normal file
View file

@ -0,0 +1,4 @@
export declare enum provedores {
"betha-sistemas" = "Betha Sistemas",
"e-licencie-gov" = "e-licencie Gov"
}

36
dist-types/resposta.d.ts vendored Normal file
View file

@ -0,0 +1,36 @@
export declare const codigosErros: {
400: string;
403: string;
500: string;
504: string;
};
export interface tipoRespostaSucesso<T> {
codigo: 200;
eErro: false;
valor: T;
erro: undefined;
detalhes?: any[];
}
export interface tipoRespostaErro {
codigo: keyof typeof codigosErros;
eErro: true;
erro: string;
valor: undefined;
detalhes?: any[];
}
export type tipoResposta<T> = tipoRespostaSucesso<T> | tipoRespostaErro;
export declare class Resposta<opcoesErroInterno extends any[]> {
funcaoErroInterno: (...opcoes: opcoesErroInterno) => void | Promise<void>;
detalhesErroInterno: boolean;
constructor(funcaoErroInterno: (...arg1: opcoesErroInterno) => void | Promise<void>, opcoes?: {
detalhesErroInterno?: boolean;
});
addResultado<T>(resultado: T): tipoResposta<T>;
addSucesso(resultado: string): tipoResposta<string>;
addTrue(): tipoResposta<true>;
addErro(erro: string, codigo?: keyof typeof codigosErros): tipoRespostaErro;
addErroEspera(erro?: string): tipoRespostaErro;
addErroInterno(...opcoes: opcoesErroInterno): tipoRespostaErro;
addPromise<T>(promise: () => Promise<T> | T, limiteEspera?: number): Promise<tipoResposta<T>>;
}
export declare const respostaCM: Resposta<[]>;

34
dist-types/respostas.d.ts vendored Normal file
View file

@ -0,0 +1,34 @@
export type tipoRespostaSucesso<T> = {
cod: 200;
valor: T;
mensagem: undefined;
eErro: false;
eCerto: true;
detalhe?: undefined;
};
export type tipoRespostaErro = {
cod: 400 | 403 | 500;
valor: undefined;
mensagem: string;
eErro: true;
eCerto: false;
detalhes?: string[];
};
export type tipoResposta<T> = tipoRespostaSucesso<T> | tipoRespostaErro;
export declare const gerarRespostas: <T>(registrarErroInterno: (erro: T) => Partial<tipoRespostaErro>) => {
valor: <T_1>(valor: T_1) => tipoRespostaSucesso<T_1>;
valorTrue: () => tipoRespostaSucesso<true>;
erro: (mensagem: string, detalhes?: string[]) => tipoRespostaErro;
erroPermissao: (mensagem?: string, detalhes?: string[]) => tipoRespostaErro;
erroInterno: (parametros: T, mensagem?: string) => tipoRespostaErro;
};
/**
* Uso de respostas em comuns
*/
export declare const respostaComuns: {
valor: <T>(valor: T) => tipoRespostaSucesso<T>;
valorTrue: () => tipoRespostaSucesso<true>;
erro: (mensagem: string, detalhes?: string[]) => tipoRespostaErro;
erroPermissao: (mensagem?: string, detalhes?: string[]) => tipoRespostaErro;
erroInterno: (parametros: unknown, mensagem?: string) => tipoRespostaErro;
};

2
dist-types/texto_busca.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
/** gerar o texto de busca removendo caracteres especies e caixa alta */
export declare const texto_busca: (...texto: any[]) => string;

7
dist-types/unidades_medida.d.ts vendored Normal file
View file

@ -0,0 +1,7 @@
export declare const unidades_medida: {
unidade: string;
nome: string;
unidade_normalizada: string;
normalizar: (valor: number) => number;
tipo: "massa" | "volume" | "comprimento";
}[];

1
dist-types/uuid.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export declare const uuid: () => string;

1
dist-types/variaveisComuns.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export declare const esperar: (ms: number) => Promise<true>;