removido bun

This commit is contained in:
Luiz Silva 2025-07-17 11:18:47 -03:00
parent 98bcbff6cf
commit 430ff53c68
26 changed files with 2086 additions and 371 deletions

72
dist-back/NPS/index.js Normal file
View file

@ -0,0 +1,72 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var NPS_exports = {};
__export(NPS_exports, {
abrirNps: () => abrirNps
});
module.exports = __toCommonJS(NPS_exports);
var import_p_respostas = require("p-respostas");
const abrirNps = (emDesenvolvimento) => async (parametros) => {
const base_site = emDesenvolvimento ? "http://localhost:5040/nps" : "https://carro-de-boi.idz.one/nps";
const base_api = `${base_site}/api`;
const { sistema, inquilino, codigo_usuario } = parametros;
const nome_local_storage_proxima = `nps_proxima_avaliacao_${sistema}_${codigo_usuario}_${inquilino}_0`;
const proxima_avaliacao = localStorage.getItem(nome_local_storage_proxima);
if (!proxima_avaliacao) {
const url_proxima_avaliacao = new URL(
`${base_api}/${sistema}/proxima_avaliacao`
);
for (const [chave, valor] of Object.entries(parametros)) {
url_proxima_avaliacao.searchParams.append(chave, valor);
}
const response = await fetch(url_proxima_avaliacao.href).then(
(resposta) => resposta.json()
).catch((error) => import_p_respostas.respostaComuns.erro(error.message));
const proxima_avaliacao2 = response.valor;
proxima_avaliacao2 && localStorage.setItem(nome_local_storage_proxima, proxima_avaliacao2);
}
const abrir_modal = proxima_avaliacao && (/* @__PURE__ */ new Date()).toISOString().slice(0, 10) >= proxima_avaliacao;
if (!abrir_modal) {
return;
}
localStorage.removeItem(nome_local_storage_proxima);
const urlIfrma = new URL(base_site);
for (const [chave, valor] of Object.entries(parametros)) {
urlIfrma.searchParams.append(chave, valor);
}
const iframe = document.createElement("iframe");
iframe.src = urlIfrma.href;
iframe.style.position = "fixed";
iframe.style.top = "0";
iframe.style.left = "0";
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.style.zIndex = "999999";
document.body.appendChild(iframe);
window.addEventListener("message", (event) => {
if (event.data === "fechar") {
document.body.removeChild(iframe);
}
});
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
abrirNps
});

View file

@ -0,0 +1,16 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var tipos_nps_exports = {};
module.exports = __toCommonJS(tipos_nps_exports);

View file

@ -0,0 +1,83 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var funcoes_alertas_exports = {};
__export(funcoes_alertas_exports, {
enviarHoje: () => enviarHoje,
intervalosTipos: () => intervalosTipos
});
module.exports = __toCommonJS(funcoes_alertas_exports);
var import_dayjs = __toESM(require("dayjs"));
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
import_dayjs.default.extend(import_weekOfYear.default);
const enviarHoje = (inter, data) => {
const hoje = (0, import_dayjs.default)(data || void 0);
if (!inter) return true;
if (inter == "D") return true;
if (inter == "M" && hoje.get("D") == 1) return true;
if (inter == "S" && hoje.get("d") == 1) return true;
if (inter == "S" && hoje.get("d") == 1 && hoje.week() % 2 == 1) return true;
return false;
};
const intervalosTipos = (tipoEntrada, log) => {
log.push(`intervalosTipos -> tipoEntrada:${tipoEntrada}`);
const config = {
M: {
campo_situacao: "situacao_texto_30",
prefixo_assunto: "(Previs\xE3o para os pr\xF3ximos 30 dias) ",
tipo: "M",
enviar_hoje: enviarHoje("M")
},
Q: {
campo_situacao: "situacao_texto_15",
prefixo_assunto: "(Previs\xE3o para os pr\xF3ximos 15 dias) ",
tipo: "Q",
enviar_hoje: enviarHoje("Q")
},
S: {
campo_situacao: "situacao_texto_7",
prefixo_assunto: "(Previs\xE3o para os pr\xF3ximos 7 dias) ",
tipo: "S",
enviar_hoje: enviarHoje("S")
},
D: {
campo_situacao: "situacao_texto",
prefixo_assunto: "",
tipo: "D",
enviar_hoje: enviarHoje("D")
}
};
const { campo_situacao, enviar_hoje, prefixo_assunto, tipo } = config[tipoEntrada || "D"] || config.D;
log.push(campo_situacao, prefixo_assunto, tipo, enviar_hoje ? "S" : "N");
return { campo_situacao, prefixo_assunto, tipo, enviar_hoje };
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
enviarHoje,
intervalosTipos
});

View file

@ -0,0 +1,24 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Alertas_exports = {};
module.exports = __toCommonJS(Alertas_exports);
__reExport(Alertas_exports, require("./funcoes_alertas"), module.exports);
__reExport(Alertas_exports, require("./tipos"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./funcoes_alertas"),
...require("./tipos")
});

View file

@ -0,0 +1,33 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var tipos_exports = {};
__export(tipos_exports, {
intervalosDosAlertas: () => intervalosDosAlertas
});
module.exports = __toCommonJS(tipos_exports);
const intervalosDosAlertas = {
D: "Di\xE1rio",
S: "Semanal, nas segundas-feira",
Q: "Quinzenal, nas segundas-feira",
M: "Mensal, primeiro dia de cada m\xEAs"
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
intervalosDosAlertas
});

View file

@ -0,0 +1,22 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var e_licencie_exports = {};
module.exports = __toCommonJS(e_licencie_exports);
__reExport(e_licencie_exports, require("./Alertas"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./Alertas")
});

28
dist-back/index.js Normal file
View file

@ -0,0 +1,28 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var index_exports = {};
module.exports = __toCommonJS(index_exports);
__reExport(index_exports, require("./e-licencie"), module.exports);
__reExport(index_exports, require("./NPS"), module.exports);
__reExport(index_exports, require("./residuos"), module.exports);
__reExport(index_exports, require("./variaveis"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./e-licencie"),
...require("./NPS"),
...require("./residuos"),
...require("./variaveis")
});

101
dist-back/residuos/index.js Normal file
View file

@ -0,0 +1,101 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var residuos_exports = {};
__export(residuos_exports, {
nomesSincronizacoes: () => nomesSincronizacoes,
zAuntenticacaoResiduosSolicitar: () => zAuntenticacaoResiduosSolicitar,
zEmpreendedorSincronizar: () => zEmpreendedorSincronizar,
zEmpreendimentoSincronizar: () => zEmpreendimentoSincronizar,
zUsuarioSincronizar: () => zUsuarioSincronizar
});
module.exports = __toCommonJS(residuos_exports);
var import_zod = require("zod");
const zAuntenticacaoResiduosSolicitar = import_zod.z.object({
// codigo_token: "aaaaaaaa-bbbb-1ccc-8ddd-eeeeeeeeeeee",
codigo_token: import_zod.z.string().optional(),
//codigo_usuario: "aaaaaaaa-bbbb-1ccc-8ddd-eeeeeeeeeeef",
codigo_usuario: import_zod.z.string().uuid(),
//nome_usuario: "Jaci Tupi",
nome_usuario: import_zod.z.string(),
//email_usuario: "jaci@maillinator.com",
email_usuario: import_zod.z.string(),
//documento_usuario: "111.111.111-11",
documento_usuario: import_zod.z.string(),
//organizacao: "aaaaaaaa-bbbb-1ccc-8ddd-eeeeeeeeeeee",
inquilino: import_zod.z.string(),
//rotas: {},
rotas: import_zod.z.object({}),
//url_usuarios: "http://127.0.0.1:5010/residuos/exemplos/usuarios",
url_usuarios: import_zod.z.string().url(),
//url_empreendedores: "http://127.0.0.1:5010/residuos/exemplos/empreendedores",
url_empreendedores: import_zod.z.string().url(),
//url_empreendimentos: "http://127.0.0.1:5010/residuos/exemplos/empreendimentos",
url_empreendimentos: import_zod.z.string().url(),
//tipo_usuario: "usuario",
tipo_usuario: import_zod.z.string(),
//sistema: "gov-criciuma",
sistema: import_zod.z.string(),
//sistema_cor: "#688c00",
sistema_cor: import_zod.z.string(),
//sistema_nome: "e-licencie",
sistema_nome: import_zod.z.string(),
//sistema_logo: "http://0.0.0.0:5020/estaticos/logos/e-licencie/branco-branco.png",
sistema_logo: import_zod.z.string()
});
const zUsuarioSincronizar = import_zod.z.object({
codigo: import_zod.z.string().uuid(),
documento: import_zod.z.string(),
excluido: import_zod.z.boolean(),
nome: import_zod.z.string(),
permicoes: import_zod.z.record(import_zod.z.any()),
versao: import_zod.z.number().int(),
credenciais_sinir: import_zod.z.object({
login: import_zod.z.string().optional(),
senha: import_zod.z.string().optional()
}).optional()
});
const zEmpreendedorSincronizar = import_zod.z.object({
codigo: import_zod.z.string().uuid(),
documento: import_zod.z.string(),
excluido: import_zod.z.boolean(),
nome: import_zod.z.string(),
versao: import_zod.z.number().int()
});
const zEmpreendimentoSincronizar = import_zod.z.object({
codigo: import_zod.z.string().uuid(),
codigo_empreendedor: import_zod.z.string().uuid(),
documento: import_zod.z.string(),
excluido: import_zod.z.boolean(),
nome: import_zod.z.string(),
unidade_sinir: import_zod.z.string().nullable().optional(),
versao: import_zod.z.number().int()
});
const nomesSincronizacoes = import_zod.z.enum([
"usuarios",
"empreendedores",
"empreendimentos"
]);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
nomesSincronizacoes,
zAuntenticacaoResiduosSolicitar,
zEmpreendedorSincronizar,
zEmpreendimentoSincronizar,
zUsuarioSincronizar
});

29
dist-back/ts/ambiente.js Normal file
View file

@ -0,0 +1,29 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ambiente_exports = {};
__export(ambiente_exports, {
zAmbiente: () => zAmbiente
});
module.exports = __toCommonJS(ambiente_exports);
var import_zod = require("zod");
const zAmbiente = import_zod.z.enum(["desenvolvimento", "producao"]);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
zAmbiente
});

32
dist-back/variaveis.js Normal file
View file

@ -0,0 +1,32 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var variaveis_exports = {};
__export(variaveis_exports, {
inquilinoStatus: () => inquilinoStatus,
statusinquilino: () => statusinquilino
});
module.exports = __toCommonJS(variaveis_exports);
var import_zod = require("zod");
const inquilinoStatus = import_zod.z.enum(["ativo", "inativo"]);
const statusinquilino = inquilinoStatus;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
inquilinoStatus,
statusinquilino
});