melhorias no build
This commit is contained in:
parent
cd6d9c35a2
commit
1d6a109fc4
387 changed files with 765 additions and 23443 deletions
0
dist/consulta.d.ts → dist-cjs/consulta.d.ts
vendored
0
dist/consulta.d.ts → dist-cjs/consulta.d.ts
vendored
0
dist/index.d.ts → dist-cjs/index.d.ts
vendored
0
dist/index.d.ts → dist-cjs/index.d.ts
vendored
0
dist/resposta.d.ts → dist-cjs/resposta.d.ts
vendored
0
dist/resposta.d.ts → dist-cjs/resposta.d.ts
vendored
0
dist/uuid.d.ts → dist-cjs/uuid.d.ts
vendored
0
dist/uuid.d.ts → dist-cjs/uuid.d.ts
vendored
1
dist-esm/aleatorio.d.ts
vendored
Normal file
1
dist-esm/aleatorio.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const aleatorio: (tamanho?: number) => string;
|
||||
3
dist-esm/aleatorio.js
Normal file
3
dist-esm/aleatorio.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
||||
export const aleatorio = (tamanho) => Array.from({ length: tamanho || 8 }, () => `ale-${alfabeto[Math.floor(Math.random() * 1000) % alfabeto.length]}`).join("");
|
||||
//# sourceMappingURL=aleatorio.js.map
|
||||
1
dist-esm/aleatorio.js.map
Normal file
1
dist-esm/aleatorio.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"aleatorio.js","sourceRoot":"","sources":["../src/aleatorio.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,EAAE,CAC5C,KAAK,CAAC,IAAI,CACR,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,EAAE,EACxB,GAAG,EAAE,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAC5E,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
|
||||
48
dist-esm/autorizacoes/auntenticacaoResiduos.d.ts
vendored
Normal file
48
dist-esm/autorizacoes/auntenticacaoResiduos.d.ts
vendored
Normal 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;
|
||||
}>;
|
||||
22
dist-esm/autorizacoes/auntenticacaoResiduos.js
Normal file
22
dist-esm/autorizacoes/auntenticacaoResiduos.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { z } from "zod";
|
||||
export const InterfaceAuntenticacao = z.object({
|
||||
// usuários
|
||||
codigo_usuario: z.string().uuid(),
|
||||
nome_usuario: z.string(),
|
||||
email_usuario: z.string(),
|
||||
documento_usuario: z.string(),
|
||||
organizacao: z.string(),
|
||||
rotas: z.object({}),
|
||||
// Dados do sistema
|
||||
sistema: z.string(),
|
||||
sistema_cor: z.string(),
|
||||
sistema_nome: z.string(),
|
||||
sistema_logo: z.string(),
|
||||
// integrações
|
||||
/** as url de integração serão armazenadas pelo sistema resíduos e identificado pelo código do token */
|
||||
codigo_token: z.string(),
|
||||
url_usuarios: z.string().url(),
|
||||
url_empreendedores: z.string().url(),
|
||||
url_empreendimentos: z.string().url(),
|
||||
});
|
||||
//# sourceMappingURL=auntenticacaoResiduos.js.map
|
||||
1
dist-esm/autorizacoes/auntenticacaoResiduos.js.map
Normal file
1
dist-esm/autorizacoes/auntenticacaoResiduos.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"auntenticacaoResiduos.js","sourceRoot":"","sources":["../../src/autorizacoes/auntenticacaoResiduos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,WAAW;IAEX,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IAEnB,mBAAmB;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IAExB,cAAc;IAEd,uGAAuG;IACvG,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC9B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpC,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACtC,CAAC,CAAC"}
|
||||
2
dist-esm/autorizacoes/index.d.ts
vendored
Normal file
2
dist-esm/autorizacoes/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/** Sistemas vão conversar por meio de autorizações tipar eles aqui */
|
||||
export * from "./auntenticacaoResiduos";
|
||||
3
dist-esm/autorizacoes/index.js
Normal file
3
dist-esm/autorizacoes/index.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/** Sistemas vão conversar por meio de autorizações tipar eles aqui */
|
||||
export * from "./auntenticacaoResiduos";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-esm/autorizacoes/index.js.map
Normal file
1
dist-esm/autorizacoes/index.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/autorizacoes/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,cAAc,yBAAyB,CAAC"}
|
||||
14
dist-esm/constantes.d.ts
vendored
Normal file
14
dist-esm/constantes.d.ts
vendored
Normal 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"
|
||||
}
|
||||
17
dist-esm/constantes.js
Normal file
17
dist-esm/constantes.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export const uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
/** Colunas Presentes n maioria das tabelas */
|
||||
export var camposComuns;
|
||||
(function (camposComuns) {
|
||||
camposComuns["codigo"] = "codigo";
|
||||
camposComuns["excluido"] = "excluido";
|
||||
camposComuns["data_hora_criacao"] = "data_hora_criacao";
|
||||
camposComuns["data_hora_atualizacao"] = "data_hora_atualizacao";
|
||||
camposComuns["codigo_usuario_criacao"] = "codigo_usuario_criacao";
|
||||
camposComuns["codigo_usuario_atualizacao"] = "codigo_usuario_atualizacao";
|
||||
})(camposComuns || (camposComuns = {}));
|
||||
/** Palavras comumente usadas */
|
||||
export var tx;
|
||||
(function (tx) {
|
||||
tx["token"] = "token";
|
||||
})(tx || (tx = {}));
|
||||
//# sourceMappingURL=constantes.js.map
|
||||
1
dist-esm/constantes.js.map
Normal file
1
dist-esm/constantes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"constantes.js","sourceRoot":"","sources":["../src/constantes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,sCAAsC,CAAC;AAEhE,8CAA8C;AAC9C,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uDAAuC,CAAA;IACvC,+DAA+C,CAAA;IAC/C,iEAAiD,CAAA;IACjD,yEAAyD,CAAA;AAC3D,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED,gCAAgC;AAChC,MAAM,CAAN,IAAY,EAEX;AAFD,WAAY,EAAE;IACZ,qBAAe,CAAA;AACjB,CAAC,EAFW,EAAE,KAAF,EAAE,QAEb"}
|
||||
26
dist-esm/consulta.d.ts
vendored
Normal file
26
dist-esm/consulta.d.ts
vendored
Normal 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;
|
||||
};
|
||||
12
dist-esm/consulta.js
Normal file
12
dist-esm/consulta.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export var operadores;
|
||||
(function (operadores) {
|
||||
operadores["="] = "=";
|
||||
operadores["!="] = "!=";
|
||||
operadores[">"] = ">";
|
||||
operadores[">="] = ">=";
|
||||
operadores["<"] = "<";
|
||||
operadores["<="] = "<=";
|
||||
operadores["like"] = "like";
|
||||
operadores["in"] = "in";
|
||||
})(operadores || (operadores = {}));
|
||||
//# sourceMappingURL=consulta.js.map
|
||||
1
dist-esm/consulta.js.map
Normal file
1
dist-esm/consulta.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"consulta.js","sourceRoot":"","sources":["../src/consulta.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,qBAAS,CAAA;IACT,uBAAW,CAAA;IACX,qBAAS,CAAA;IACT,uBAAW,CAAA;IACX,qBAAS,CAAA;IACT,uBAAW,CAAA;IACX,2BAAa,CAAA;IACb,uBAAS,CAAA;AACX,CAAC,EATW,UAAU,KAAV,UAAU,QASrB"}
|
||||
1
dist-esm/ecosistema/index.d.ts
vendored
Normal file
1
dist-esm/ecosistema/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./urls";
|
||||
2
dist-esm/ecosistema/index.js
Normal file
2
dist-esm/ecosistema/index.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export * from "./urls";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-esm/ecosistema/index.js.map
Normal file
1
dist-esm/ecosistema/index.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ecosistema/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
||||
1
dist-esm/ecosistema/urls.d.ts
vendored
Normal file
1
dist-esm/ecosistema/urls.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
2
dist-esm/ecosistema/urls.js
Normal file
2
dist-esm/ecosistema/urls.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
//# sourceMappingURL=urls.js.map
|
||||
1
dist-esm/ecosistema/urls.js.map
Normal file
1
dist-esm/ecosistema/urls.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../src/ecosistema/urls.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,wCAAwC,CAAC"}
|
||||
10
dist-esm/index.d.ts
vendored
Normal file
10
dist-esm/index.d.ts
vendored
Normal 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";
|
||||
11
dist-esm/index.js
Normal file
11
dist-esm/index.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-esm/index.js.map
Normal file
1
dist-esm/index.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
||||
4
dist-esm/provedores.d.ts
vendored
Normal file
4
dist-esm/provedores.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export declare enum provedores {
|
||||
"betha-sistemas" = "Betha Sistemas",
|
||||
"e-licencie-gov" = "e-licencie Gov"
|
||||
}
|
||||
6
dist-esm/provedores.js
Normal file
6
dist-esm/provedores.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export var provedores;
|
||||
(function (provedores) {
|
||||
provedores["betha-sistemas"] = "Betha Sistemas";
|
||||
provedores["e-licencie-gov"] = "e-licencie Gov";
|
||||
})(provedores || (provedores = {}));
|
||||
//# sourceMappingURL=provedores.js.map
|
||||
1
dist-esm/provedores.js.map
Normal file
1
dist-esm/provedores.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"provedores.js","sourceRoot":"","sources":["../src/provedores.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+CAAmC,CAAA;IACnC,+CAAmC,CAAA;AACrC,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
||||
36
dist-esm/resposta.d.ts
vendored
Normal file
36
dist-esm/resposta.d.ts
vendored
Normal 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<[]>;
|
||||
76
dist-esm/resposta.js
Normal file
76
dist-esm/resposta.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
import { esperar } from "./variaveisComuns";
|
||||
export const codigosErros = {
|
||||
400: "Erro de requisição",
|
||||
403: "Não autenticado",
|
||||
500: "Erro interno",
|
||||
504: "Tempo de resposta excedido",
|
||||
};
|
||||
export class Resposta {
|
||||
funcaoErroInterno;
|
||||
detalhesErroInterno;
|
||||
constructor(funcaoErroInterno, opcoes) {
|
||||
this.funcaoErroInterno = funcaoErroInterno;
|
||||
this.detalhesErroInterno = opcoes?.detalhesErroInterno || false;
|
||||
}
|
||||
addResultado(resultado) {
|
||||
return {
|
||||
codigo: 200,
|
||||
eErro: false,
|
||||
valor: resultado,
|
||||
erro: undefined,
|
||||
};
|
||||
}
|
||||
addSucesso(resultado) {
|
||||
return this.addResultado(resultado);
|
||||
}
|
||||
addTrue() {
|
||||
return this.addResultado(true);
|
||||
}
|
||||
addErro(erro, codigo) {
|
||||
return {
|
||||
codigo: codigo || 400,
|
||||
eErro: true,
|
||||
erro: erro,
|
||||
valor: undefined,
|
||||
};
|
||||
}
|
||||
addErroEspera(erro) {
|
||||
return {
|
||||
codigo: 504,
|
||||
eErro: true,
|
||||
erro: erro || codigosErros[504],
|
||||
valor: undefined,
|
||||
};
|
||||
}
|
||||
addErroInterno(...opcoes) {
|
||||
//comunica o suporte sobre o erro
|
||||
this.funcaoErroInterno(...opcoes);
|
||||
return {
|
||||
codigo: 500,
|
||||
eErro: true,
|
||||
erro: "Erro interno: Contate o suporte técnico.",
|
||||
valor: undefined,
|
||||
detalhes: this.detalhesErroInterno ? opcoes : undefined,
|
||||
};
|
||||
}
|
||||
async addPromise(promise, limiteEspera) {
|
||||
try {
|
||||
const resultado = await Promise.race([
|
||||
Promise.resolve(promise())
|
||||
.then((re) => this.addResultado(re))
|
||||
.catch((er) => this.addErro(er.message || er)),
|
||||
...(limiteEspera
|
||||
? [esperar(limiteEspera).then(() => this.addErroEspera())]
|
||||
: []),
|
||||
]);
|
||||
return resultado;
|
||||
}
|
||||
catch (error) {
|
||||
return this.addErro("Erro na resolução da Promessa.");
|
||||
}
|
||||
}
|
||||
}
|
||||
export const respostaCM = new Resposta(() => {
|
||||
//
|
||||
});
|
||||
//# sourceMappingURL=resposta.js.map
|
||||
1
dist-esm/resposta.js.map
Normal file
1
dist-esm/resposta.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"resposta.js","sourceRoot":"","sources":["../src/resposta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,4BAA4B;CAClC,CAAC;AAoBF,MAAM,OAAO,QAAQ;IACnB,iBAAiB,CAAyD;IAC1E,mBAAmB,CAAU;IAE7B,YACE,iBAAuE,EACvE,MAEC;QAED,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,mBAAmB,GAAG,MAAM,EAAE,mBAAmB,IAAI,KAAK,CAAC;IAClE,CAAC;IAED,YAAY,CAAI,SAAY;QAC1B,OAAO;YACL,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;SAChB,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,SAAiB;QAC1B,OAAO,IAAI,CAAC,YAAY,CAAS,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,YAAY,CAAO,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,CAAC,IAAY,EAAE,MAAkC;QACtD,OAAO;YACL,MAAM,EAAE,MAAM,IAAI,GAAG;YACrB,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,SAAS;SACjB,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,IAAa;QACzB,OAAO;YACL,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI,IAAI,YAAY,CAAC,GAAG,CAAC;YAC/B,KAAK,EAAE,SAAS;SACjB,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,GAAG,MAAyB;QACzC,iCAAiC;QACjC,IAAI,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,CAAC;QAClC,OAAO;YACL,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,0CAA0C;YAChD,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACxD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAA6B,EAC7B,YAAqB;QAErB,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;gBACnC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;qBACvB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;qBACnC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;gBAChD,GAAG,CAAC,YAAY;oBACd,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;oBAC1D,CAAC,CAAC,EAAE,CAAC;aACR,CAAC,CAAC;YACH,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,GAAG,EAAE;IAC1C,EAAE;AACJ,CAAC,CAAC,CAAC"}
|
||||
34
dist-esm/respostas.d.ts
vendored
Normal file
34
dist-esm/respostas.d.ts
vendored
Normal 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;
|
||||
};
|
||||
79
dist-esm/respostas.js
Normal file
79
dist-esm/respostas.js
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
export const gerarRespostas = (registrarErroInterno) => {
|
||||
/**
|
||||
* Gera uma resposta de sucesso
|
||||
*/
|
||||
const valor = (valor) => {
|
||||
return {
|
||||
cod: 200,
|
||||
valor,
|
||||
mensagem: undefined,
|
||||
eErro: false,
|
||||
eCerto: true,
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Gera uma resposta de sucesso com valor true
|
||||
*/
|
||||
const valorTrue = () => {
|
||||
return {
|
||||
cod: 200,
|
||||
valor: true,
|
||||
mensagem: undefined,
|
||||
eErro: false,
|
||||
eCerto: true,
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Gera uma resposta de erro conhecido
|
||||
*/
|
||||
const erro = (mensagem, detalhes) => {
|
||||
return {
|
||||
cod: 400,
|
||||
valor: undefined,
|
||||
mensagem,
|
||||
eErro: true,
|
||||
eCerto: false,
|
||||
detalhes,
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Gera uma resposta de erro de permissão,será necessário fazer o login novamente
|
||||
*/
|
||||
const erroPermissao = (mensagem, detalhes) => {
|
||||
return {
|
||||
cod: 403,
|
||||
valor: undefined,
|
||||
mensagem: mensagem || "Sem permissão para esse recurso.",
|
||||
eErro: true,
|
||||
eCerto: false,
|
||||
detalhes,
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Gera uma resposta de erro desconhecido, geralmente tem origem de um exception
|
||||
*/
|
||||
const erroInterno = (parametros, mensagem) => {
|
||||
const resRegistro = registrarErroInterno(parametros);
|
||||
const mensagemFim = `${mensagem || "Erro interno"}`;
|
||||
return {
|
||||
cod: 500,
|
||||
valor: undefined,
|
||||
mensagem: mensagemFim,
|
||||
eErro: true,
|
||||
eCerto: false,
|
||||
...resRegistro,
|
||||
};
|
||||
};
|
||||
return {
|
||||
valor,
|
||||
valorTrue,
|
||||
erro,
|
||||
erroPermissao,
|
||||
erroInterno,
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Uso de respostas em comuns
|
||||
*/
|
||||
export const respostaComuns = gerarRespostas(() => ({}));
|
||||
//# sourceMappingURL=respostas.js.map
|
||||
1
dist-esm/respostas.js.map
Normal file
1
dist-esm/respostas.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"respostas.js","sourceRoot":"","sources":["../src/respostas.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,oBAA4D,EAC5D,EAAE;IACF;;OAEG;IACH,MAAM,KAAK,GAAG,CAAI,KAAQ,EAA0B,EAAE;QACpD,OAAO;YACL,GAAG,EAAE,GAAG;YACR,KAAK;YACL,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC,CAAC;IAEF;;OAEG;IACH,MAAM,SAAS,GAAG,GAA8B,EAAE;QAChD,OAAO;YACL,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC,CAAC;IAEF;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,QAAgB,EAAE,QAAmB,EAAoB,EAAE;QACvE,OAAO;YACL,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,SAAS;YAChB,QAAQ;YACR,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,KAAK;YACb,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC;IAEF;;OAEG;IACH,MAAM,aAAa,GAAG,CACpB,QAAiB,EACjB,QAAmB,EACD,EAAE;QACpB,OAAO;YACL,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,QAAQ,IAAI,kCAAkC;YACxD,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,KAAK;YACb,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC;IAEF;;OAEG;IACH,MAAM,WAAW,GAAG,CAAC,UAAa,EAAE,QAAiB,EAAoB,EAAE;QACzE,MAAM,WAAW,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAErD,MAAM,WAAW,GAAG,GAAG,QAAQ,IAAI,cAAc,EAAE,CAAC;QAEpD,OAAO;YACL,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,WAAW;YACrB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,KAAK;YACb,GAAG,WAAW;SACf,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACL,KAAK;QACL,SAAS;QACT,IAAI;QACJ,aAAa;QACb,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
||||
2
dist-esm/texto_busca.d.ts
vendored
Normal file
2
dist-esm/texto_busca.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
||||
export declare const texto_busca: (...texto: any[]) => string;
|
||||
12
dist-esm/texto_busca.js
Normal file
12
dist-esm/texto_busca.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
||||
export const texto_busca = (...texto) => texto
|
||||
.map((txt) => txt === null || txt === undefined
|
||||
? ""
|
||||
: String(txt)
|
||||
.normalize("NFD")
|
||||
// biome-ignore lint/suspicious/noMisleadingCharacterClass: <explanation>
|
||||
.replace(/[\u0300-\u036f]/g, "")
|
||||
.replace(/\s+/g, " ")
|
||||
.toLowerCase())
|
||||
.join(" ");
|
||||
//# sourceMappingURL=texto_busca.js.map
|
||||
1
dist-esm/texto_busca.js.map
Normal file
1
dist-esm/texto_busca.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"texto_busca.js","sourceRoot":"","sources":["../src/texto_busca.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAG,KAAY,EAAU,EAAE,CACrD,KAAK;KACF,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACX,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;IAC/B,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACR,SAAS,CAAC,KAAK,CAAC;QACjB,yEAAyE;SACxE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAC/B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,WAAW,EAAE,CACrB;KACA,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
||||
7
dist-esm/unidades_medida.d.ts
vendored
Normal file
7
dist-esm/unidades_medida.d.ts
vendored
Normal 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";
|
||||
}[];
|
||||
73
dist-esm/unidades_medida.js
Normal file
73
dist-esm/unidades_medida.js
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
export const unidades_medida = [
|
||||
{
|
||||
unidade: "kg",
|
||||
nome: "Quilograma",
|
||||
unidade_normalizada: "kg",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
unidade: "g",
|
||||
nome: "Grama",
|
||||
unidade_normalizada: "kg",
|
||||
normalizar: (valor) => valor / 1000,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
unidade: "ton",
|
||||
nome: "Tonelada",
|
||||
unidade_normalizada: "kg",
|
||||
normalizar: (valor) => valor * 1000,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
unidade: "L",
|
||||
nome: "Litro",
|
||||
unidade_normalizada: "L",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "volume",
|
||||
},
|
||||
{
|
||||
unidade: "m3",
|
||||
nome: "Metro Cúbico",
|
||||
unidade_normalizada: "L",
|
||||
normalizar: (valor) => valor * 1000,
|
||||
tipo: "volume",
|
||||
},
|
||||
{
|
||||
unidade: "mL",
|
||||
nome: "Mililitro",
|
||||
unidade_normalizada: "L",
|
||||
normalizar: (valor) => valor / 1000,
|
||||
tipo: "volume",
|
||||
},
|
||||
{
|
||||
unidade: "cm",
|
||||
nome: "Centímetro",
|
||||
unidade_normalizada: "m",
|
||||
normalizar: (valor) => valor / 100,
|
||||
tipo: "comprimento",
|
||||
},
|
||||
{
|
||||
unidade: "mm",
|
||||
nome: "Milímetro",
|
||||
unidade_normalizada: "m",
|
||||
normalizar: (valor) => valor / 1000,
|
||||
tipo: "comprimento",
|
||||
},
|
||||
{
|
||||
unidade: "m",
|
||||
nome: "Metro",
|
||||
unidade_normalizada: "m",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "comprimento",
|
||||
},
|
||||
{
|
||||
unidade: "km",
|
||||
nome: "Quilômetro",
|
||||
unidade_normalizada: "m",
|
||||
normalizar: (valor) => valor * 1000,
|
||||
tipo: "comprimento",
|
||||
},
|
||||
];
|
||||
//# sourceMappingURL=unidades_medida.js.map
|
||||
1
dist-esm/unidades_medida.js.map
Normal file
1
dist-esm/unidades_medida.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"unidades_medida.js","sourceRoot":"","sources":["../src/unidades_medida.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAMtB;IACJ;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,YAAY;QAClB,mBAAmB,EAAE,IAAI;QACzB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;QACpC,IAAI,EAAE,OAAO;KACd;IACD;QACE,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,OAAO;QACb,mBAAmB,EAAE,IAAI;QACzB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,OAAO;KACd;IACD;QACE,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,UAAU;QAChB,mBAAmB,EAAE,IAAI;QACzB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,OAAO;KACd;IACD;QACE,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,OAAO;QACb,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;QACpC,IAAI,EAAE,QAAQ;KACf;IACD;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,cAAc;QACpB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,QAAQ;KACf;IACD;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,QAAQ;KACf;IACD;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,YAAY;QAClB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,GAAG;QAC1C,IAAI,EAAE,aAAa;KACpB;IACD;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,aAAa;KACpB;IACD;QACE,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,OAAO;QACb,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;QACpC,IAAI,EAAE,aAAa;KACpB;IACD;QACE,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,YAAY;QAClB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;QAC3C,IAAI,EAAE,aAAa;KACpB;CACF,CAAC"}
|
||||
1
dist-esm/uuid.d.ts
vendored
Normal file
1
dist-esm/uuid.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const uuid: () => string;
|
||||
13
dist-esm/uuid.js
Normal file
13
dist-esm/uuid.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
//Gerar uma uuid V4
|
||||
const letras = "0123456789abcdef".split("");
|
||||
export const uuid = () => {
|
||||
letras.sort(() => Math.random() - 0.5);
|
||||
const modelo = "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".split("");
|
||||
const retorno = modelo
|
||||
.map((letra) => letra === "x"
|
||||
? letras[((1000 * Math.random()) | 0) % letras.length]
|
||||
: letra)
|
||||
.join("");
|
||||
return retorno;
|
||||
};
|
||||
//# sourceMappingURL=uuid.js.map
|
||||
1
dist-esm/uuid.js.map
Normal file
1
dist-esm/uuid.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../src/uuid.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE;IACvB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,sCAAsC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,MAAM;SACnB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACb,KAAK,KAAK,GAAG;QACX,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACtD,CAAC,CAAC,KAAK,CACV;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
||||
1
dist-esm/variaveisComuns.d.ts
vendored
Normal file
1
dist-esm/variaveisComuns.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const esperar: (ms: number) => Promise<true>;
|
||||
2
dist-esm/variaveisComuns.js
Normal file
2
dist-esm/variaveisComuns.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export const esperar = (ms) => new Promise((resolve) => setTimeout(() => resolve(true), ms));
|
||||
//# sourceMappingURL=variaveisComuns.js.map
|
||||
1
dist-esm/variaveisComuns.js.map
Normal file
1
dist-esm/variaveisComuns.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"variaveisComuns.js","sourceRoot":"","sources":["../src/variaveisComuns.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAU,EAAiB,EAAE,CACnD,IAAI,OAAO,CAAC,CAAC,OAA0B,EAAE,EAAE,CACzC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CACpC,CAAC"}
|
||||
1
dist-types/aleatorio.d.ts
vendored
Normal file
1
dist-types/aleatorio.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const aleatorio: (tamanho?: number) => string;
|
||||
48
dist-types/autorizacoes/auntenticacaoResiduos.d.ts
vendored
Normal file
48
dist-types/autorizacoes/auntenticacaoResiduos.d.ts
vendored
Normal 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
2
dist-types/autorizacoes/index.d.ts
vendored
Normal 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
14
dist-types/constantes.d.ts
vendored
Normal 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
26
dist-types/consulta.d.ts
vendored
Normal 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
1
dist-types/ecosistema/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./urls";
|
||||
1
dist-types/ecosistema/urls.d.ts
vendored
Normal file
1
dist-types/ecosistema/urls.d.ts
vendored
Normal 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
10
dist-types/index.d.ts
vendored
Normal 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
4
dist-types/provedores.d.ts
vendored
Normal 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
36
dist-types/resposta.d.ts
vendored
Normal 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<[]>;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue