melhorias no build
This commit is contained in:
parent
cd6d9c35a2
commit
1d6a109fc4
387 changed files with 765 additions and 23443 deletions
1
dist-cjs/aleatorio.d.ts
vendored
Normal file
1
dist-cjs/aleatorio.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const aleatorio: (tamanho?: number) => string;
|
||||
7
dist-cjs/aleatorio.js
Normal file
7
dist-cjs/aleatorio.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.aleatorio = void 0;
|
||||
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
||||
const aleatorio = (tamanho) => Array.from({ length: tamanho || 8 }, () => `ale-${alfabeto[Math.floor(Math.random() * 1000) % alfabeto.length]}`).join("");
|
||||
exports.aleatorio = aleatorio;
|
||||
//# sourceMappingURL=aleatorio.js.map
|
||||
1
dist-cjs/aleatorio.js.map
Normal file
1
dist-cjs/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;AAEjD,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;AAJA,QAAA,SAAS,aAIT"}
|
||||
48
dist-cjs/autorizacoes/auntenticacaoResiduos.d.ts
vendored
Normal file
48
dist-cjs/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;
|
||||
}>;
|
||||
25
dist-cjs/autorizacoes/auntenticacaoResiduos.js
Normal file
25
dist-cjs/autorizacoes/auntenticacaoResiduos.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InterfaceAuntenticacao = void 0;
|
||||
const zod_1 = require("zod");
|
||||
exports.InterfaceAuntenticacao = zod_1.z.object({
|
||||
// usuários
|
||||
codigo_usuario: zod_1.z.string().uuid(),
|
||||
nome_usuario: zod_1.z.string(),
|
||||
email_usuario: zod_1.z.string(),
|
||||
documento_usuario: zod_1.z.string(),
|
||||
organizacao: zod_1.z.string(),
|
||||
rotas: zod_1.z.object({}),
|
||||
// Dados do sistema
|
||||
sistema: zod_1.z.string(),
|
||||
sistema_cor: zod_1.z.string(),
|
||||
sistema_nome: zod_1.z.string(),
|
||||
sistema_logo: zod_1.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: zod_1.z.string(),
|
||||
url_usuarios: zod_1.z.string().url(),
|
||||
url_empreendedores: zod_1.z.string().url(),
|
||||
url_empreendimentos: zod_1.z.string().url(),
|
||||
});
|
||||
//# sourceMappingURL=auntenticacaoResiduos.js.map
|
||||
1
dist-cjs/autorizacoes/auntenticacaoResiduos.js.map
Normal file
1
dist-cjs/autorizacoes/auntenticacaoResiduos.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"auntenticacaoResiduos.js","sourceRoot":"","sources":["../../src/autorizacoes/auntenticacaoResiduos.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW;IAEX,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACjC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IAEnB,mBAAmB;IACnB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IAExB,cAAc;IAEd,uGAAuG;IACvG,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC9B,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACtC,CAAC,CAAC"}
|
||||
2
dist-cjs/autorizacoes/index.d.ts
vendored
Normal file
2
dist-cjs/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";
|
||||
19
dist-cjs/autorizacoes/index.js
Normal file
19
dist-cjs/autorizacoes/index.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
/** Sistemas vão conversar por meio de autorizações tipar eles aqui */
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./auntenticacaoResiduos"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-cjs/autorizacoes/index.js.map
Normal file
1
dist-cjs/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,0DAAwC"}
|
||||
14
dist-cjs/constantes.d.ts
vendored
Normal file
14
dist-cjs/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"
|
||||
}
|
||||
20
dist-cjs/constantes.js
Normal file
20
dist-cjs/constantes.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.tx = exports.camposComuns = exports.uuid_null = void 0;
|
||||
exports.uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
/** Colunas Presentes n maioria das tabelas */
|
||||
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 || (exports.camposComuns = camposComuns = {}));
|
||||
/** Palavras comumente usadas */
|
||||
var tx;
|
||||
(function (tx) {
|
||||
tx["token"] = "token";
|
||||
})(tx || (exports.tx = tx = {}));
|
||||
//# sourceMappingURL=constantes.js.map
|
||||
1
dist-cjs/constantes.js.map
Normal file
1
dist-cjs/constantes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"constantes.js","sourceRoot":"","sources":["../src/constantes.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,sCAAsC,CAAC;AAEhE,8CAA8C;AAC9C,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,4BAAZ,YAAY,QAOvB;AAED,gCAAgC;AAChC,IAAY,EAEX;AAFD,WAAY,EAAE;IACZ,qBAAe,CAAA;AACjB,CAAC,EAFW,EAAE,kBAAF,EAAE,QAEb"}
|
||||
26
dist-cjs/consulta.d.ts
vendored
Normal file
26
dist-cjs/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;
|
||||
};
|
||||
15
dist-cjs/consulta.js
Normal file
15
dist-cjs/consulta.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.operadores = void 0;
|
||||
var operadores;
|
||||
(function (operadores) {
|
||||
operadores["="] = "=";
|
||||
operadores["!="] = "!=";
|
||||
operadores[">"] = ">";
|
||||
operadores[">="] = ">=";
|
||||
operadores["<"] = "<";
|
||||
operadores["<="] = "<=";
|
||||
operadores["like"] = "like";
|
||||
operadores["in"] = "in";
|
||||
})(operadores || (exports.operadores = operadores = {}));
|
||||
//# sourceMappingURL=consulta.js.map
|
||||
1
dist-cjs/consulta.js.map
Normal file
1
dist-cjs/consulta.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"consulta.js","sourceRoot":"","sources":["../src/consulta.ts"],"names":[],"mappings":";;;AAAA,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,0BAAV,UAAU,QASrB"}
|
||||
1
dist-cjs/ecosistema/index.d.ts
vendored
Normal file
1
dist-cjs/ecosistema/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./urls";
|
||||
18
dist-cjs/ecosistema/index.js
Normal file
18
dist-cjs/ecosistema/index.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./urls"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-cjs/ecosistema/index.js.map
Normal file
1
dist-cjs/ecosistema/index.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ecosistema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
|
||||
1
dist-cjs/ecosistema/urls.d.ts
vendored
Normal file
1
dist-cjs/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";
|
||||
5
dist-cjs/ecosistema/urls.js
Normal file
5
dist-cjs/ecosistema/urls.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cdn_carro_de_boi = void 0;
|
||||
exports.cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
//# sourceMappingURL=urls.js.map
|
||||
1
dist-cjs/ecosistema/urls.js.map
Normal file
1
dist-cjs/ecosistema/urls.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../src/ecosistema/urls.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,wCAAwC,CAAC"}
|
||||
10
dist-cjs/index.d.ts
vendored
Normal file
10
dist-cjs/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";
|
||||
27
dist-cjs/index.js
Normal file
27
dist-cjs/index.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./respostas"), exports);
|
||||
__exportStar(require("./autorizacoes"), exports);
|
||||
__exportStar(require("./constantes"), exports);
|
||||
__exportStar(require("./consulta"), exports);
|
||||
__exportStar(require("./aleatorio"), exports);
|
||||
__exportStar(require("./texto_busca"), exports);
|
||||
__exportStar(require("./unidades_medida"), exports);
|
||||
__exportStar(require("./uuid"), exports);
|
||||
__exportStar(require("./provedores"), exports);
|
||||
__exportStar(require("./ecosistema"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist-cjs/index.js.map
Normal file
1
dist-cjs/index.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,oDAAkC;AAClC,yCAAuB;AACvB,+CAA6B;AAC7B,+CAA6B"}
|
||||
4
dist-cjs/provedores.d.ts
vendored
Normal file
4
dist-cjs/provedores.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export declare enum provedores {
|
||||
"betha-sistemas" = "Betha Sistemas",
|
||||
"e-licencie-gov" = "e-licencie Gov"
|
||||
}
|
||||
9
dist-cjs/provedores.js
Normal file
9
dist-cjs/provedores.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.provedores = void 0;
|
||||
var provedores;
|
||||
(function (provedores) {
|
||||
provedores["betha-sistemas"] = "Betha Sistemas";
|
||||
provedores["e-licencie-gov"] = "e-licencie Gov";
|
||||
})(provedores || (exports.provedores = provedores = {}));
|
||||
//# sourceMappingURL=provedores.js.map
|
||||
1
dist-cjs/provedores.js.map
Normal file
1
dist-cjs/provedores.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"provedores.js","sourceRoot":"","sources":["../src/provedores.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+CAAmC,CAAA;IACnC,+CAAmC,CAAA;AACrC,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
|
||||
36
dist-cjs/resposta.d.ts
vendored
Normal file
36
dist-cjs/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<[]>;
|
||||
80
dist-cjs/resposta.js
Normal file
80
dist-cjs/resposta.js
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.respostaCM = exports.Resposta = exports.codigosErros = void 0;
|
||||
const variaveisComuns_1 = require("./variaveisComuns");
|
||||
exports.codigosErros = {
|
||||
400: "Erro de requisição",
|
||||
403: "Não autenticado",
|
||||
500: "Erro interno",
|
||||
504: "Tempo de resposta excedido",
|
||||
};
|
||||
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 || exports.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
|
||||
? [(0, variaveisComuns_1.esperar)(limiteEspera).then(() => this.addErroEspera())]
|
||||
: []),
|
||||
]);
|
||||
return resultado;
|
||||
}
|
||||
catch (error) {
|
||||
return this.addErro("Erro na resolução da Promessa.");
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Resposta = Resposta;
|
||||
exports.respostaCM = new Resposta(() => {
|
||||
//
|
||||
});
|
||||
//# sourceMappingURL=resposta.js.map
|
||||
1
dist-cjs/resposta.js.map
Normal file
1
dist-cjs/resposta.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"resposta.js","sourceRoot":"","sources":["../src/resposta.ts"],"names":[],"mappings":";;;AAAA,uDAA4C;AAE/B,QAAA,YAAY,GAAG;IAC1B,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,cAAc;I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AAC,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,IAAA,yBAAO,EAAC,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;AA/ED,4BA+EC;AAEY,QAAA,UAAU,GAAG,IAAI,QAAQ,CAAC,GAAG,EAAE;IAC1C,EAAE;AACJ,CAAC,CAAC,CAAC"}
|
||||
34
dist-cjs/respostas.d.ts
vendored
Normal file
34
dist-cjs/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;
|
||||
};
|
||||
83
dist-cjs/respostas.js
Normal file
83
dist-cjs/respostas.js
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.respostaComuns = exports.gerarRespostas = void 0;
|
||||
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,
|
||||
};
|
||||
};
|
||||
exports.gerarRespostas = gerarRespostas;
|
||||
/**
|
||||
* Uso de respostas em comuns
|
||||
*/
|
||||
exports.respostaComuns = (0, exports.gerarRespostas)(() => ({}));
|
||||
//# sourceMappingURL=respostas.js.map
|
||||
1
dist-cjs/respostas.js.map
Normal file
1
dist-cjs/respostas.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"respostas.js","sourceRoot":"","sources":["../src/respostas.ts"],"names":[],"mappings":";;;AAsBO,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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W,QAAA,cAAc,kBAqFzB;AAEF;;GAEG;AACU,QAAA,cAAc,GAAG,IAAA,sBAAc,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
||||
2
dist-cjs/texto_busca.d.ts
vendored
Normal file
2
dist-cjs/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;
|
||||
16
dist-cjs/texto_busca.js
Normal file
16
dist-cjs/texto_busca.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.texto_busca = void 0;
|
||||
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(" ");
|
||||
exports.texto_busca = texto_busca;
|
||||
//# sourceMappingURL=texto_busca.js.map
|
||||
1
dist-cjs/texto_busca.js.map
Normal file
1
dist-cjs/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;;;AAEjE,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;AAZF,QAAA,WAAW,eAYT"}
|
||||
7
dist-cjs/unidades_medida.d.ts
vendored
Normal file
7
dist-cjs/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";
|
||||
}[];
|
||||
76
dist-cjs/unidades_medida.js
Normal file
76
dist-cjs/unidades_medida.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.unidades_medida = void 0;
|
||||
exports.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-cjs/unidades_medida.js.map
Normal file
1
dist-cjs/unidades_medida.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"unidades_medida.js","sourceRoot":"","sources":["../src/unidades_medida.ts"],"names":[],"mappings":";;;AAAa,QAAA,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,IAA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CAAC"}
|
||||
1
dist-cjs/uuid.d.ts
vendored
Normal file
1
dist-cjs/uuid.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const uuid: () => string;
|
||||
17
dist-cjs/uuid.js
Normal file
17
dist-cjs/uuid.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.uuid = void 0;
|
||||
//Gerar uma uuid V4
|
||||
const letras = "0123456789abcdef".split("");
|
||||
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;
|
||||
};
|
||||
exports.uuid = uuid;
|
||||
//# sourceMappingURL=uuid.js.map
|
||||
1
dist-cjs/uuid.js.map
Normal file
1
dist-cjs/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;AACrC,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;AAZW,QAAA,IAAI,QAYf"}
|
||||
1
dist-cjs/variaveisComuns.d.ts
vendored
Normal file
1
dist-cjs/variaveisComuns.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const esperar: (ms: number) => Promise<true>;
|
||||
6
dist-cjs/variaveisComuns.js
Normal file
6
dist-cjs/variaveisComuns.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.esperar = void 0;
|
||||
const esperar = (ms) => new Promise((resolve) => setTimeout(() => resolve(true), ms));
|
||||
exports.esperar = esperar;
|
||||
//# sourceMappingURL=variaveisComuns.js.map
|
||||
1
dist-cjs/variaveisComuns.js.map
Normal file
1
dist-cjs/variaveisComuns.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"variaveisComuns.js","sourceRoot":"","sources":["../src/variaveisComuns.ts"],"names":[],"mappings":";;;AAAO,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;AAHS,QAAA,OAAO,WAGhB"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue