isolamento de pacote

This commit is contained in:
Luiz Silva 2025-07-06 18:35:12 -03:00
commit f34b66cbe4
96 changed files with 2285 additions and 0 deletions

View file

@ -0,0 +1,26 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.codigoContaSite = void 0;
const p_respostas_1 = require("p-respostas");
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const codigoContaSite = async ({ url_api_autenticacao, post, }) => {
const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`;
try {
const resp = await (0, cross_fetch_1.default)(url, {
method: "POST",
body: JSON.stringify(post),
headers: { "Content-Type": "application/json" },
})
.then((r) => r.json())
.catch((e) => p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]))
.then((r) => r);
return resp;
}
catch (e) {
return p_respostas_1.respostaComuns.erro(`erro ao buscar código do site: ${e}`);
}
};
exports.codigoContaSite = codigoContaSite;