chore: remover dist-back e dist-front do versionamento e atualizar .gitignore
This commit is contained in:
parent
88fae996e9
commit
57e908cca6
22 changed files with 7 additions and 1140 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -1,2 +1,8 @@
|
||||||
node_modules
|
node_modules
|
||||||
pacotes
|
pacotes
|
||||||
|
|
||||||
|
# Builds e compilados
|
||||||
|
dist/
|
||||||
|
dist-*/
|
||||||
|
**/dist/
|
||||||
|
**/dist-*/
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
"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"));
|
|
||||||
var import_site_autenticacao = require("../utilitarios/site_autenticacao");
|
|
||||||
const codigoContaSite = async ({
|
|
||||||
base_url_autenticacao,
|
|
||||||
post
|
|
||||||
}) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_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
|
|
||||||
});
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
"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");
|
|
||||||
var import_site_autenticacao = require("../utilitarios/site_autenticacao");
|
|
||||||
const usuarios_quipo = async ({
|
|
||||||
token_produto,
|
|
||||||
base_url_autenticacao,
|
|
||||||
inquilino
|
|
||||||
}) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_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
|
|
||||||
});
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
"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");
|
|
||||||
var import_site_autenticacao = require("../utilitarios/site_autenticacao");
|
|
||||||
const usuarios_quipo_vincular = async ({
|
|
||||||
token_produto,
|
|
||||||
base_url_autenticacao,
|
|
||||||
inquilino_codigo,
|
|
||||||
vinculo,
|
|
||||||
usuario_codigo,
|
|
||||||
email
|
|
||||||
}) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_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
|
|
||||||
});
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
"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_p_respostas = require("p-respostas");
|
|
||||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
||||||
var import_site_autenticacao = require("../utilitarios/site_autenticacao");
|
|
||||||
const validarToken = async ({
|
|
||||||
base_url_autenticacao,
|
|
||||||
post
|
|
||||||
}) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_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).catch((err) => import_p_respostas.respostaComuns.erro(`Erro: ${err.message}`));
|
|
||||||
return resposta;
|
|
||||||
} catch (err) {
|
|
||||||
return import_p_respostas.respostaComuns.erro(`Erro: ${err.message}`);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
validarToken
|
|
||||||
});
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
"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
|
|
||||||
});
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
"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("./autenticacao"), module.exports);
|
|
||||||
__reExport(index_exports, require("./lista-prefeituras"), module.exports);
|
|
||||||
__reExport(index_exports, require("./lista-usuarios"), module.exports);
|
|
||||||
__reExport(index_exports, require("./lista-vinculos"), module.exports);
|
|
||||||
__reExport(index_exports, require("./produtos"), module.exports);
|
|
||||||
__reExport(index_exports, require("./tokens"), module.exports);
|
|
||||||
__reExport(index_exports, require("./utilitarios/site_autenticacao"), module.exports);
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
...require("./autenticacao"),
|
|
||||||
...require("./lista-prefeituras"),
|
|
||||||
...require("./lista-usuarios"),
|
|
||||||
...require("./lista-vinculos"),
|
|
||||||
...require("./produtos"),
|
|
||||||
...require("./tokens"),
|
|
||||||
...require("./utilitarios/site_autenticacao")
|
|
||||||
});
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
"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 lista_prefeituras_exports = {};
|
|
||||||
__export(lista_prefeituras_exports, {
|
|
||||||
listarPrefeituras: () => listarPrefeituras,
|
|
||||||
tx_listar_prefeituras: () => tx_listar_prefeituras
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(lista_prefeituras_exports);
|
|
||||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
||||||
var import_p_respostas = require("p-respostas");
|
|
||||||
var import_site_autenticacao = require("./utilitarios/site_autenticacao");
|
|
||||||
const tx_listar_prefeituras = "listar_prefeituras";
|
|
||||||
const listarPrefeituras = async ({
|
|
||||||
base_url_autenticacao
|
|
||||||
}) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_autenticacao)}/api/${tx_listar_prefeituras}`;
|
|
||||||
return (0, import_cross_fetch.default)(url).then(async (a) => {
|
|
||||||
const texto = await a.text();
|
|
||||||
try {
|
|
||||||
const res = JSON.parse(texto);
|
|
||||||
return res;
|
|
||||||
} catch (error) {
|
|
||||||
return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
|
|
||||||
}
|
|
||||||
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
listarPrefeituras,
|
|
||||||
tx_listar_prefeituras
|
|
||||||
});
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
"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 lista_usuarios_exports = {};
|
|
||||||
__export(lista_usuarios_exports, {
|
|
||||||
listarUsuarios: () => listarUsuarios,
|
|
||||||
tx_usuarios__listar: () => tx_usuarios__listar
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(lista_usuarios_exports);
|
|
||||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
||||||
var import_p_respostas = require("p-respostas");
|
|
||||||
var import_site_autenticacao = require("./utilitarios/site_autenticacao");
|
|
||||||
const tx_usuarios__listar = "usuarios__listar";
|
|
||||||
const listarUsuarios = async ({ token, base_url_autenticacao }, parametros) => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_autenticacao)}/api/${tx_usuarios__listar}`;
|
|
||||||
return (0, import_cross_fetch.default)(url, {
|
|
||||||
headers: { token, "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify(parametros),
|
|
||||||
method: "post"
|
|
||||||
}).then(async (a) => {
|
|
||||||
const texto = await a.text();
|
|
||||||
try {
|
|
||||||
const res = JSON.parse(texto);
|
|
||||||
return res;
|
|
||||||
} catch (error) {
|
|
||||||
return import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [texto, error]);
|
|
||||||
}
|
|
||||||
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [error]));
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
listarUsuarios,
|
|
||||||
tx_usuarios__listar
|
|
||||||
});
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
"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 lista_vinculos_exports = {};
|
|
||||||
__export(lista_vinculos_exports, {
|
|
||||||
listarVinculos: () => listarVinculos,
|
|
||||||
tx_vinculos__listar: () => tx_vinculos__listar
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(lista_vinculos_exports);
|
|
||||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
||||||
var import_p_comuns = require("p-comuns");
|
|
||||||
var import_p_respostas = require("p-respostas");
|
|
||||||
var import_uuid = require("./plugins/uuid");
|
|
||||||
var import_site_autenticacao = require("./utilitarios/site_autenticacao");
|
|
||||||
const tx_vinculos__listar = "vinculos__listar";
|
|
||||||
const listarVinculos = async ({
|
|
||||||
token,
|
|
||||||
base_url_autenticacao,
|
|
||||||
desativarCache
|
|
||||||
}) => {
|
|
||||||
const chaveCache = (0, import_uuid.uuidV3)({ token, base_url_autenticacao });
|
|
||||||
if (!desativarCache) {
|
|
||||||
const valorCache = (0, import_p_comuns.cacheM)(chaveCache);
|
|
||||||
if (valorCache) return valorCache;
|
|
||||||
}
|
|
||||||
const res = (async () => {
|
|
||||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_autenticacao)}/api/${tx_vinculos__listar}`;
|
|
||||||
return (0, import_cross_fetch.default)(url, {
|
|
||||||
headers: { token, "Content-Type": "application/json" },
|
|
||||||
body: "{}",
|
|
||||||
method: "post"
|
|
||||||
}).then(async (a) => {
|
|
||||||
const texto = await a.text();
|
|
||||||
try {
|
|
||||||
const res2 = JSON.parse(texto);
|
|
||||||
return res2;
|
|
||||||
} catch (error) {
|
|
||||||
return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
|
|
||||||
}
|
|
||||||
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
|
|
||||||
})();
|
|
||||||
(0, import_p_comuns.cacheM)(
|
|
||||||
chaveCache,
|
|
||||||
res.then((a) => {
|
|
||||||
try {
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
return a;
|
|
||||||
}),
|
|
||||||
10
|
|
||||||
);
|
|
||||||
return res;
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
listarVinculos,
|
|
||||||
tx_vinculos__listar
|
|
||||||
});
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
"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 uuid_exports = {};
|
|
||||||
__export(uuid_exports, {
|
|
||||||
uuidV3: () => uuidV3,
|
|
||||||
uuidV4: () => uuidV4
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(uuid_exports);
|
|
||||||
var import_uuid = require("uuid");
|
|
||||||
const uuidV3 = (qualquerCoisa) => (0, import_uuid.v3)(
|
|
||||||
typeof qualquerCoisa == "string" ? qualquerCoisa : typeof qualquerCoisa == "number" ? String(qualquerCoisa) : JSON.stringify(qualquerCoisa),
|
|
||||||
import_uuid.NIL
|
|
||||||
);
|
|
||||||
const uuidV4 = import_uuid.v4;
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
uuidV3,
|
|
||||||
uuidV4
|
|
||||||
});
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
"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 betha_meio_ambiente_exports = {};
|
|
||||||
__export(betha_meio_ambiente_exports, {
|
|
||||||
produto_betha_meio_ambiente: () => produto_betha_meio_ambiente
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(betha_meio_ambiente_exports);
|
|
||||||
var import_tipagem = require("./tipagem");
|
|
||||||
const produto_betha_meio_ambiente = new import_tipagem.ProdutoQuipo({
|
|
||||||
chave_produto: "betha-meio-ambiente",
|
|
||||||
titulo: "Betha Meio Ambiente",
|
|
||||||
descricao: "Betha Meio Ambiente: Software de gest\xE3o de processos ambientais para \xF3rg\xE3os p\xFAblicos da Betha Sistemas.",
|
|
||||||
url_produto: ({ inquilino, base_url, vinculo }) => {
|
|
||||||
const base = (base_url || "").replace(/\/+$/, "");
|
|
||||||
const prefixo = base ? `${base}/${inquilino}` : `/${inquilino}`;
|
|
||||||
return vinculo === import_tipagem.opcoesVinculosGovEnum.anonimo ? `${prefixo}/` : `${prefixo}/quipo/${vinculo}/#/admin`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
produto_betha_meio_ambiente
|
|
||||||
});
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
"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 e_licencie_gov_exports = {};
|
|
||||||
__export(e_licencie_gov_exports, {
|
|
||||||
produto_e_licencie_gov: () => produto_e_licencie_gov
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(e_licencie_gov_exports);
|
|
||||||
var import_tipagem = require("./tipagem");
|
|
||||||
const produto_e_licencie_gov = new import_tipagem.ProdutoQuipo({
|
|
||||||
chave_produto: "e-licencie-gov",
|
|
||||||
titulo: "e-licencie.gov",
|
|
||||||
descricao: "e-licencie.gov: Software de gest\xE3o de processos e dados ambientais.",
|
|
||||||
url_produto: ({ inquilino, base_url, vinculo }) => {
|
|
||||||
const base = (base_url || "").replace(/\/+$/, "");
|
|
||||||
const prefixo = base ? `${base}/${inquilino}` : `/${inquilino}`;
|
|
||||||
return vinculo === import_tipagem.opcoesVinculosGovEnum.anonimo ? `${prefixo}/` : `${prefixo}/quipo/${vinculo}/#/admin`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
produto_e_licencie_gov
|
|
||||||
});
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
"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 e_licencie_exports = {};
|
|
||||||
__export(e_licencie_exports, {
|
|
||||||
produto_e_licencie: () => produto_e_licencie
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(e_licencie_exports);
|
|
||||||
var import_tipagem = require("./tipagem");
|
|
||||||
const produto_e_licencie = new import_tipagem.Produto({
|
|
||||||
chave_produto: "e-licencie",
|
|
||||||
titulo: "e-licencie",
|
|
||||||
descricao: "e-licencie: Software de gest\xE3o de processos e dados ambientais.",
|
|
||||||
url_produto: ({ base_url }) => base_url
|
|
||||||
});
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
produto_e_licencie
|
|
||||||
});
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
"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 suporte_exports = {};
|
|
||||||
__export(suporte_exports, {
|
|
||||||
produto_suporte: () => produto_suporte
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(suporte_exports);
|
|
||||||
var import_tipagem = require("./tipagem");
|
|
||||||
const produto_suporte = new import_tipagem.Produto({
|
|
||||||
chave_produto: "suporte",
|
|
||||||
titulo: "Suporte",
|
|
||||||
descricao: "Gest\xE3o de contas e usu\xE1rios dos produtos da e-licencie",
|
|
||||||
url_produto: ({ base_url }) => base_url
|
|
||||||
});
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
produto_suporte
|
|
||||||
});
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
"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 produtos_exports = {};
|
|
||||||
__export(produtos_exports, {
|
|
||||||
Produto: () => import_tipagem.Produto,
|
|
||||||
chaves_produto: () => import_tipagem.chaves_produto,
|
|
||||||
listaProdutos: () => listaProdutos,
|
|
||||||
opcoesVinculos: () => import_tipagem.opcoesVinculos,
|
|
||||||
opcoesVinculosGov: () => import_tipagem.opcoesVinculosGov,
|
|
||||||
opcoesVinculosGovDescricao: () => import_tipagem.opcoesVinculosGovDescricao,
|
|
||||||
opcoesVinculosGovEnum: () => import_tipagem.opcoesVinculosGovEnum,
|
|
||||||
produto_betha_meio_ambiente: () => import_betha_meio_ambiente.produto_betha_meio_ambiente,
|
|
||||||
produto_e_licencie: () => import_e_licencie.produto_e_licencie,
|
|
||||||
produto_e_licencie_gov: () => import_e_licencie_gov.produto_e_licencie_gov,
|
|
||||||
produto_suporte: () => import_suporte.produto_suporte,
|
|
||||||
provedoresGov: () => import_tipagem.provedoresGov,
|
|
||||||
versao_usuarios: () => import_tipagem.versao_usuarios
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(produtos_exports);
|
|
||||||
var import_betha_meio_ambiente = require("./_betha-meio-ambiente");
|
|
||||||
var import_e_licencie = require("./_e-licencie");
|
|
||||||
var import_e_licencie_gov = require("./_e-licencie-gov");
|
|
||||||
var import_suporte = require("./_suporte");
|
|
||||||
var import_tipagem = require("./tipagem");
|
|
||||||
const listaProdutos = {
|
|
||||||
"betha-meio-ambiente": import_betha_meio_ambiente.produto_betha_meio_ambiente,
|
|
||||||
"e-licencie": import_e_licencie.produto_e_licencie,
|
|
||||||
"e-licencie-gov": import_e_licencie_gov.produto_e_licencie_gov,
|
|
||||||
suporte: import_suporte.produto_suporte
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
Produto,
|
|
||||||
chaves_produto,
|
|
||||||
listaProdutos,
|
|
||||||
opcoesVinculos,
|
|
||||||
opcoesVinculosGov,
|
|
||||||
opcoesVinculosGovDescricao,
|
|
||||||
opcoesVinculosGovEnum,
|
|
||||||
produto_betha_meio_ambiente,
|
|
||||||
produto_e_licencie,
|
|
||||||
produto_e_licencie_gov,
|
|
||||||
produto_suporte,
|
|
||||||
provedoresGov,
|
|
||||||
versao_usuarios
|
|
||||||
});
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
"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 tipagem_exports = {};
|
|
||||||
__export(tipagem_exports, {
|
|
||||||
Produto: () => Produto,
|
|
||||||
ProdutoQuipo: () => ProdutoQuipo,
|
|
||||||
chaves_produto: () => chaves_produto,
|
|
||||||
opcoesVinculos: () => opcoesVinculos,
|
|
||||||
opcoesVinculosGov: () => opcoesVinculosGov,
|
|
||||||
opcoesVinculosGovDescricao: () => opcoesVinculosGovDescricao,
|
|
||||||
opcoesVinculosGovEnum: () => opcoesVinculosGovEnum,
|
|
||||||
opcoesVinculosSuporte: () => opcoesVinculosSuporte,
|
|
||||||
provedoresGov: () => provedoresGov,
|
|
||||||
tiposAcesso: () => tiposAcesso,
|
|
||||||
versao_usuarios: () => versao_usuarios
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(tipagem_exports);
|
|
||||||
var chaves_produto = /* @__PURE__ */ ((chaves_produto2) => {
|
|
||||||
chaves_produto2["suporte"] = "suporte";
|
|
||||||
chaves_produto2["betha-meio-ambiente"] = "betha-meio-ambiente";
|
|
||||||
chaves_produto2["e-licencie-gov"] = "e-licencie-gov";
|
|
||||||
chaves_produto2["e-licencie"] = "e-licencie";
|
|
||||||
return chaves_produto2;
|
|
||||||
})(chaves_produto || {});
|
|
||||||
var opcoesVinculosGovEnum = /* @__PURE__ */ ((opcoesVinculosGovEnum2) => {
|
|
||||||
opcoesVinculosGovEnum2["governo"] = "governo";
|
|
||||||
opcoesVinculosGovEnum2["sociedade"] = "sociedade";
|
|
||||||
opcoesVinculosGovEnum2["anonimo"] = "anonimo";
|
|
||||||
return opcoesVinculosGovEnum2;
|
|
||||||
})(opcoesVinculosGovEnum || {});
|
|
||||||
const opcoesVinculosGovDescricao = {
|
|
||||||
governo: "Governo",
|
|
||||||
sociedade: "Sociedade",
|
|
||||||
anonimo: "An\xF4nimo"
|
|
||||||
};
|
|
||||||
const opcoesVinculosGov = opcoesVinculosGovDescricao;
|
|
||||||
const opcoesVinculosSuporte = {
|
|
||||||
"suporte-1": "Suporte Prim\xE1rio"
|
|
||||||
};
|
|
||||||
const opcoesVinculos = {
|
|
||||||
["suporte" /* suporte */]: opcoesVinculosSuporte,
|
|
||||||
["betha-meio-ambiente" /* betha-meio-ambiente */]: opcoesVinculosGovDescricao,
|
|
||||||
["e-licencie-gov" /* e-licencie-gov */]: opcoesVinculosGovDescricao,
|
|
||||||
["e-licencie" /* e-licencie */]: {}
|
|
||||||
};
|
|
||||||
const tiposAcesso = opcoesVinculosGovDescricao;
|
|
||||||
const provedoresGov = {
|
|
||||||
/** Sistema de login da Beta */
|
|
||||||
"betha-sistemas": "Betha Sistemas",
|
|
||||||
/** sistema de login do altenticado */
|
|
||||||
"e-licencie": "e-licencie"
|
|
||||||
};
|
|
||||||
class Produto {
|
|
||||||
constructor(_) {
|
|
||||||
this.chave_produto = _.chave_produto;
|
|
||||||
this.titulo = _.titulo;
|
|
||||||
this.descricao = _.descricao;
|
|
||||||
this.url_produto = _.url_produto;
|
|
||||||
}
|
|
||||||
extruturaToken(_) {
|
|
||||||
return { ..._, chave_produto: this.chave_produto };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class ProdutoQuipo extends Produto {
|
|
||||||
extruturaToken(_) {
|
|
||||||
return { ..._, chave_produto: this.chave_produto };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var versao_usuarios = /* @__PURE__ */ ((versao_usuarios2) => {
|
|
||||||
versao_usuarios2["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao";
|
|
||||||
versao_usuarios2["versao_usuarios_quipo"] = "versao_usuarios_quipo";
|
|
||||||
return versao_usuarios2;
|
|
||||||
})(versao_usuarios || {});
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
Produto,
|
|
||||||
ProdutoQuipo,
|
|
||||||
chaves_produto,
|
|
||||||
opcoesVinculos,
|
|
||||||
opcoesVinculosGov,
|
|
||||||
opcoesVinculosGovDescricao,
|
|
||||||
opcoesVinculosGovEnum,
|
|
||||||
opcoesVinculosSuporte,
|
|
||||||
provedoresGov,
|
|
||||||
tiposAcesso,
|
|
||||||
versao_usuarios
|
|
||||||
});
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
"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 tokens_exports = {};
|
|
||||||
module.exports = __toCommonJS(tokens_exports);
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
"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 site_autenticacao_exports = {};
|
|
||||||
__export(site_autenticacao_exports, {
|
|
||||||
site_autenticacao: () => site_autenticacao,
|
|
||||||
site_autenticacao_login: () => site_autenticacao_login,
|
|
||||||
tx__token__: () => tx__token__,
|
|
||||||
tx_redirecionar: () => tx_redirecionar
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(site_autenticacao_exports);
|
|
||||||
const site_autenticacao = (base_url_autenticacao) => `${(() => {
|
|
||||||
const x = new URL(base_url_autenticacao);
|
|
||||||
return x.origin;
|
|
||||||
})()}/autenticacao`;
|
|
||||||
const tx_redirecionar = "redirecionar";
|
|
||||||
const tx__token__ = "__token__";
|
|
||||||
const site_autenticacao_login = (base_url_autenticacao, redirecionar) => {
|
|
||||||
const url = new URL(site_autenticacao(base_url_autenticacao));
|
|
||||||
redirecionar && url.searchParams.set(tx_redirecionar, redirecionar);
|
|
||||||
return url.href;
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
site_autenticacao,
|
|
||||||
site_autenticacao_login,
|
|
||||||
tx__token__,
|
|
||||||
tx_redirecionar
|
|
||||||
});
|
|
||||||
|
|
@ -1,230 +0,0 @@
|
||||||
import * as p_respostas from 'p-respostas';
|
|
||||||
import { tipoResposta } from 'p-respostas';
|
|
||||||
|
|
||||||
declare const tx_usuarios__listar: "usuarios__listar";
|
|
||||||
type tipo_usuarios__listar_retorno = {
|
|
||||||
inquilino: string;
|
|
||||||
vinculo: string;
|
|
||||||
codigo: string;
|
|
||||||
cpf: string;
|
|
||||||
data_hora_atualizacao: string;
|
|
||||||
email: string;
|
|
||||||
id_betha_sistema: string;
|
|
||||||
nome: string;
|
|
||||||
telefone: string;
|
|
||||||
};
|
|
||||||
type tipo_usuarios__listar_parametros = {
|
|
||||||
inquilino?: string;
|
|
||||||
};
|
|
||||||
declare const listarUsuarios: ({ token, base_url_autenticacao }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
token: string;
|
|
||||||
}, parametros: tipo_usuarios__listar_parametros) => Promise<tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
|
||||||
|
|
||||||
type tipoUsuarioExterno = {
|
|
||||||
_nome: string;
|
|
||||||
_email: string;
|
|
||||||
_telefone: string;
|
|
||||||
vinculo: string;
|
|
||||||
inquilino: string;
|
|
||||||
chave_produto: string;
|
|
||||||
codigo: string;
|
|
||||||
_cpf: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
|
||||||
declare const pAutenticacao: {
|
|
||||||
validarToken: ({ base_url_autenticacao, post, }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
post: {
|
|
||||||
token: string;
|
|
||||||
};
|
|
||||||
}) => Promise<p_respostas.tipoResposta<tipoUsuarioTokenAutneticacao>>;
|
|
||||||
codigoContaSite: ({ base_url_autenticacao, post, }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
post: {
|
|
||||||
site: string;
|
|
||||||
};
|
|
||||||
}) => Promise<p_respostas.tipoResposta<string>>;
|
|
||||||
usuarios_quipo: ({ token_produto, base_url_autenticacao, inquilino, }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
token_produto: string;
|
|
||||||
inquilino: string;
|
|
||||||
}) => Promise<p_respostas.tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
|
||||||
usuarios_quipo_vincular: ({ token_produto, base_url_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
token_produto: string;
|
|
||||||
inquilino_codigo: string;
|
|
||||||
vinculo: string;
|
|
||||||
usuario_codigo?: string;
|
|
||||||
email: string;
|
|
||||||
}) => Promise<p_respostas.tipoResposta<string>>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Lista dos produtos da e-licencie */
|
|
||||||
declare enum chaves_produto {
|
|
||||||
suporte = "suporte",
|
|
||||||
"betha-meio-ambiente" = "betha-meio-ambiente",
|
|
||||||
"e-licencie-gov" = "e-licencie-gov",
|
|
||||||
"e-licencie" = "e-licencie"
|
|
||||||
}
|
|
||||||
declare enum opcoesVinculosGovEnum {
|
|
||||||
governo = "governo",
|
|
||||||
sociedade = "sociedade",
|
|
||||||
anonimo = "anonimo"
|
|
||||||
}
|
|
||||||
declare const opcoesVinculosGovDescricao: {
|
|
||||||
[k in opcoesVinculosGovEnum]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* @deprecated Esta função será removida em futuras versões.
|
|
||||||
* opcoesVinculosGovEnum ou opcoesVinculosGovDescricao
|
|
||||||
*/
|
|
||||||
declare const opcoesVinculosGov: {
|
|
||||||
governo: string;
|
|
||||||
sociedade: string;
|
|
||||||
anonimo: string;
|
|
||||||
};
|
|
||||||
declare const opcoesVinculos: {
|
|
||||||
readonly suporte: {
|
|
||||||
readonly "suporte-1": "Suporte Primário";
|
|
||||||
};
|
|
||||||
readonly "betha-meio-ambiente": {
|
|
||||||
governo: string;
|
|
||||||
sociedade: string;
|
|
||||||
anonimo: string;
|
|
||||||
};
|
|
||||||
readonly "e-licencie-gov": {
|
|
||||||
governo: string;
|
|
||||||
sociedade: string;
|
|
||||||
anonimo: string;
|
|
||||||
};
|
|
||||||
readonly "e-licencie": {};
|
|
||||||
};
|
|
||||||
declare const provedoresGov: {
|
|
||||||
/** Sistema de login da Beta */
|
|
||||||
readonly "betha-sistemas": "Betha Sistemas";
|
|
||||||
/** sistema de login do altenticado */
|
|
||||||
readonly "e-licencie": "e-licencie";
|
|
||||||
};
|
|
||||||
type extruturaTokenBase = {
|
|
||||||
inquilino_codigo: string;
|
|
||||||
usuario_codigo: string;
|
|
||||||
usuario_nome: string;
|
|
||||||
codigo_acesso_produto: string;
|
|
||||||
codigo_autenticacao: string;
|
|
||||||
};
|
|
||||||
type extrutruaraTokenQuipo = extruturaTokenBase & {
|
|
||||||
inquilino_nome: string;
|
|
||||||
tipo_de_acesso: keyof typeof opcoesVinculosGov;
|
|
||||||
provedor: keyof typeof provedoresGov;
|
|
||||||
};
|
|
||||||
declare class Produto<C extends keyof typeof chaves_produto> {
|
|
||||||
/** Chave do produto*/
|
|
||||||
chave_produto: C;
|
|
||||||
/** Titulo do produto */
|
|
||||||
titulo: string;
|
|
||||||
/** Descrição do módulo */
|
|
||||||
descricao: string;
|
|
||||||
/** URL base do módulo */
|
|
||||||
url_produto: (_: {
|
|
||||||
inquilino: string;
|
|
||||||
base_url: string;
|
|
||||||
vinculo: string;
|
|
||||||
}) => string;
|
|
||||||
constructor(_: {
|
|
||||||
/** Chave do produto*/ chave_produto: C;
|
|
||||||
/** Titulo do produto */
|
|
||||||
titulo: string;
|
|
||||||
/** Descrição do módulo */
|
|
||||||
descricao: string;
|
|
||||||
/** URL base do módulo */
|
|
||||||
url_produto: (_: {
|
|
||||||
inquilino: string;
|
|
||||||
base_url: string;
|
|
||||||
vinculo: string;
|
|
||||||
}) => string;
|
|
||||||
});
|
|
||||||
extruturaToken(_: extruturaTokenBase): extruturaTokenBase & {
|
|
||||||
chave_produto: C;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare class ProdutoQuipo<C extends keyof typeof chaves_produto> extends Produto<C> {
|
|
||||||
extruturaToken(_: extrutruaraTokenQuipo): extrutruaraTokenQuipo & {
|
|
||||||
chave_produto: C;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare enum versao_usuarios {
|
|
||||||
versao_usuarios_autenticacao = "versao_usuarios_autenticacao",
|
|
||||||
versao_usuarios_quipo = "versao_usuarios_quipo"
|
|
||||||
}
|
|
||||||
|
|
||||||
type tipoRetornoListarPrefeitrua = {
|
|
||||||
nome: string;
|
|
||||||
inquilino: string;
|
|
||||||
base_url: string;
|
|
||||||
produto: keyof typeof chaves_produto;
|
|
||||||
};
|
|
||||||
declare const tx_listar_prefeituras: "listar_prefeituras";
|
|
||||||
declare const listarPrefeituras: ({ base_url_autenticacao, }: {
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
}) => Promise<tipoResposta<tipoRetornoListarPrefeitrua[]>>;
|
|
||||||
|
|
||||||
declare const tx_vinculos__listar: "vinculos__listar";
|
|
||||||
type tipo_retorno_vinculo_listas = {
|
|
||||||
codigo: string;
|
|
||||||
usuario_codigo: string;
|
|
||||||
inquilino: string;
|
|
||||||
vinculo: string;
|
|
||||||
chave_produto: string;
|
|
||||||
_usuario_nome: string;
|
|
||||||
_inquilino_nome: string;
|
|
||||||
_inquilino_base_url: string;
|
|
||||||
};
|
|
||||||
declare const listarVinculos: ({ token, base_url_autenticacao, desativarCache, }: {
|
|
||||||
/** http://site.com */
|
|
||||||
base_url_autenticacao: string;
|
|
||||||
token: string;
|
|
||||||
/** por padrão será 10 segundos */
|
|
||||||
desativarCache?: boolean;
|
|
||||||
}) => Promise<tipoResposta<tipo_retorno_vinculo_listas[]>>;
|
|
||||||
|
|
||||||
declare const produto_betha_meio_ambiente: ProdutoQuipo<"betha-meio-ambiente">;
|
|
||||||
|
|
||||||
declare const produto_e_licencie: Produto<"e-licencie">;
|
|
||||||
|
|
||||||
declare const produto_e_licencie_gov: ProdutoQuipo<"e-licencie-gov">;
|
|
||||||
|
|
||||||
declare const produto_suporte: Produto<"suporte">;
|
|
||||||
|
|
||||||
declare const listaProdutos: {
|
|
||||||
[k in keyof typeof chaves_produto]: Produto<k>;
|
|
||||||
};
|
|
||||||
|
|
||||||
type tipoUsuarioTokenAutneticacao = {
|
|
||||||
usuario_codigo: string;
|
|
||||||
usuario_nome: string;
|
|
||||||
usuario_email: string;
|
|
||||||
usuario_cpf: string;
|
|
||||||
autenticacao_codigo: string;
|
|
||||||
eSuporte: boolean;
|
|
||||||
autenticacao_provedor: keyof typeof provedoresGov;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param base_url_autenticacao http://bolinhas.com
|
|
||||||
* @returns http://bolinhas.com/autenticacao
|
|
||||||
*/
|
|
||||||
declare const site_autenticacao: (base_url_autenticacao: string) => string;
|
|
||||||
declare const tx_redirecionar = "redirecionar";
|
|
||||||
declare const tx__token__ = "__token__";
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param base_url_autenticacao http://bolinhas.com
|
|
||||||
* @param redirecionar http://pedrinhas.com?token=__token__
|
|
||||||
* @returns http://bolinhas.com?redirecionar=http%3A%2F%2Fpedrinhas.com%3Ftoken%3D__token__
|
|
||||||
*/
|
|
||||||
declare const site_autenticacao_login: (base_url_autenticacao: string, redirecionar?: string) => string;
|
|
||||||
|
|
||||||
export { Produto, chaves_produto, listaProdutos, listarPrefeituras, listarUsuarios, listarVinculos, opcoesVinculos, opcoesVinculosGov, opcoesVinculosGovDescricao, opcoesVinculosGovEnum, pAutenticacao, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, provedoresGov, site_autenticacao, site_autenticacao_login, type tipoRetornoListarPrefeitrua, type tipoUsuarioExterno, type tipoUsuarioTokenAutneticacao, type tipo_retorno_vinculo_listas, type tipo_usuarios__listar_parametros, type tipo_usuarios__listar_retorno, tx__token__, tx_listar_prefeituras, tx_redirecionar, tx_usuarios__listar, tx_vinculos__listar, versao_usuarios };
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue