convertido para pnpm
This commit is contained in:
parent
59e710f6cf
commit
175d767d27
115 changed files with 2366 additions and 1451 deletions
57
dist-back/autenticacao/_codigoContaSite.js
Normal file
57
dist-back/autenticacao/_codigoContaSite.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
"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 codigoContaSite_exports = {};
|
||||
__export(codigoContaSite_exports, {
|
||||
codigoContaSite: () => codigoContaSite
|
||||
});
|
||||
module.exports = __toCommonJS(codigoContaSite_exports);
|
||||
var import_p_respostas = require("p-respostas");
|
||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
||||
const codigoContaSite = async ({
|
||||
url_api_autenticacao,
|
||||
post
|
||||
}) => {
|
||||
const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`;
|
||||
try {
|
||||
const resp = await (0, import_cross_fetch.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" }
|
||||
}).then((r) => r.json()).catch(
|
||||
(e) => import_p_respostas.respostaComuns.erro("Erro ao enviar registros", [e.message])
|
||||
).then((r) => r);
|
||||
return resp;
|
||||
} catch (e) {
|
||||
return import_p_respostas.respostaComuns.erro(`erro ao buscar c\xF3digo do site: ${e}`);
|
||||
}
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
codigoContaSite
|
||||
});
|
||||
58
dist-back/autenticacao/_usuarios_quipo.js
Normal file
58
dist-back/autenticacao/_usuarios_quipo.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
"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 usuarios_quipo_exports = {};
|
||||
__export(usuarios_quipo_exports, {
|
||||
usuarios_quipo: () => usuarios_quipo
|
||||
});
|
||||
module.exports = __toCommonJS(usuarios_quipo_exports);
|
||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
||||
var import_p_respostas = require("p-respostas");
|
||||
const usuarios_quipo = async ({
|
||||
token_produto,
|
||||
url_api_autenticacao,
|
||||
inquilino
|
||||
}) => {
|
||||
const url = `${url_api_autenticacao}/api/usuarios__listar`;
|
||||
if (!token_produto) return import_p_respostas.respostaComuns.erro("token_produto n\xE3o informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
return (0, import_cross_fetch.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ inquilino }),
|
||||
headers
|
||||
}).then((r) => r.json()).catch(
|
||||
(e) => import_p_respostas.respostaComuns.erro(`Erro ao buscar usu\xE1rios quipo governo ${e.message}`)
|
||||
).then((r) => r);
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
usuarios_quipo
|
||||
});
|
||||
65
dist-back/autenticacao/_usuarios_quipo_vincular.js
Normal file
65
dist-back/autenticacao/_usuarios_quipo_vincular.js
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
"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 usuarios_quipo_vincular_exports = {};
|
||||
__export(usuarios_quipo_vincular_exports, {
|
||||
usuarios_quipo_vincular: () => usuarios_quipo_vincular
|
||||
});
|
||||
module.exports = __toCommonJS(usuarios_quipo_vincular_exports);
|
||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
||||
var import_p_respostas = require("p-respostas");
|
||||
const usuarios_quipo_vincular = async ({
|
||||
token_produto,
|
||||
url_api_autenticacao,
|
||||
inquilino_codigo,
|
||||
vinculo,
|
||||
usuario_codigo,
|
||||
email
|
||||
}) => {
|
||||
const url = `${url_api_autenticacao}/api/vinculos__criar`;
|
||||
if (!token_produto) return import_p_respostas.respostaComuns.erro("token_produto n\xE3o informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
const parametros = {
|
||||
vinculos: { inquilino_codigo, usuario_codigo, vinculo },
|
||||
email
|
||||
};
|
||||
return await (0, import_cross_fetch.default)(url, {
|
||||
headers,
|
||||
body: JSON.stringify(parametros),
|
||||
method: "POST"
|
||||
}).then(async (r) => await r.json()).catch(
|
||||
(e) => import_p_respostas.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`)
|
||||
);
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
usuarios_quipo_vincular
|
||||
});
|
||||
56
dist-back/autenticacao/_validarToken.js
Normal file
56
dist-back/autenticacao/_validarToken.js
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
"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 validarToken_exports = {};
|
||||
__export(validarToken_exports, {
|
||||
validarToken: () => validarToken
|
||||
});
|
||||
module.exports = __toCommonJS(validarToken_exports);
|
||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
||||
const validarToken = async ({
|
||||
url_api_autenticacao,
|
||||
post
|
||||
}) => {
|
||||
const url = `${url_api_autenticacao}/api/validar_token`;
|
||||
try {
|
||||
const resposta = await (0, import_cross_fetch.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" }
|
||||
}).then((r) => r.json()).then((r) => r).then(
|
||||
(resposta2) => resposta2.eCerto ? "valido" : "erro"
|
||||
).catch(() => "erro");
|
||||
return resposta;
|
||||
} catch (_e) {
|
||||
return "erro";
|
||||
}
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
validarToken
|
||||
});
|
||||
37
dist-back/autenticacao/index.js
Normal file
37
dist-back/autenticacao/index.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"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 autenticacao_exports = {};
|
||||
__export(autenticacao_exports, {
|
||||
pAutenticacao: () => pAutenticacao
|
||||
});
|
||||
module.exports = __toCommonJS(autenticacao_exports);
|
||||
var import_codigoContaSite = require("./_codigoContaSite");
|
||||
var import_usuarios_quipo = require("./_usuarios_quipo");
|
||||
var import_usuarios_quipo_vincular = require("./_usuarios_quipo_vincular");
|
||||
var import_validarToken = require("./_validarToken");
|
||||
const pAutenticacao = {
|
||||
validarToken: import_validarToken.validarToken,
|
||||
codigoContaSite: import_codigoContaSite.codigoContaSite,
|
||||
usuarios_quipo: import_usuarios_quipo.usuarios_quipo,
|
||||
usuarios_quipo_vincular: import_usuarios_quipo_vincular.usuarios_quipo_vincular
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
pAutenticacao
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue