Compare commits
28 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa636737ab | |||
| 264d126a14 | |||
| 947ffdc815 | |||
| e0a492f7d2 | |||
| 28614966a4 | |||
| 1af1d85a47 | |||
| 6de05c6f04 | |||
| 36247ce2f5 | |||
| 43f9b8ef94 | |||
| cd1eb0ae39 | |||
| 6480b90500 | |||
| d53450b686 | |||
| e8abe4d284 | |||
| bcce75bec4 | |||
| ca56cf8cec | |||
| 0d3357c32f | |||
| f3b5bb3bce | |||
| 81d017e8af | |||
| 9a514d3d82 | |||
| 67c3682eb0 | |||
| 91ec3f86e1 | |||
| c22e4c28fd | |||
| 175d767d27 | |||
| 59e710f6cf | |||
| 89321ac68e | |||
| 763b5784b5 | |||
| 3ac86e7cc3 | |||
| 3f2130169d |
119 changed files with 2484 additions and 1570 deletions
1
.npmignore
Normal file
1
.npmignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.tgz
|
||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports.biome": "always",
|
||||
"source.fixAll.biome": "always"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
biome.json
10
biome.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "node_modules/@biomejs/biome/configuration_schema.json",
|
||||
"extends": [
|
||||
"node_modules/p-comuns/Documentos/biome.json"
|
||||
],
|
||||
"files": {}
|
||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
||||
"extends": ["./node_modules/p-comuns/Documentos/biome.json"],
|
||||
"files": {
|
||||
"includes": ["src/**/*.{js,ts,jsx,tsx}"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
94
bun.lock
94
bun.lock
|
|
@ -1,94 +0,0 @@
|
|||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "p-autenticacao-drive",
|
||||
"dependencies": {
|
||||
"cross-fetch": "4.1.0",
|
||||
"node-cache": "^5.1.2",
|
||||
"p-comuns": "git+https://git2.idz.one/publico/_comuns.git#v.2",
|
||||
"p-respostas": "git+https://git2.idz.one/publico/_respostas.git#v.2",
|
||||
"uuid": "11.1.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.0.6",
|
||||
"@types/node": "^20.19.8",
|
||||
"check-node-version": "^4.2.1",
|
||||
"typescript": "5.5.4",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@biomejs/biome": ["@biomejs/biome@2.0.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.6", "@biomejs/cli-darwin-x64": "2.0.6", "@biomejs/cli-linux-arm64": "2.0.6", "@biomejs/cli-linux-arm64-musl": "2.0.6", "@biomejs/cli-linux-x64": "2.0.6", "@biomejs/cli-linux-x64-musl": "2.0.6", "@biomejs/cli-win32-arm64": "2.0.6", "@biomejs/cli-win32-x64": "2.0.6" }, "bin": { "biome": "bin/biome" } }, "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA=="],
|
||||
|
||||
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.0.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A=="],
|
||||
|
||||
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.0.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw=="],
|
||||
|
||||
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw=="],
|
||||
|
||||
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ=="],
|
||||
|
||||
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.0.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA=="],
|
||||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.0.6", "", { "os": "win32", "cpu": "x64" }, "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw=="],
|
||||
|
||||
"@types/node": ["@types/node@20.19.8", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw=="],
|
||||
|
||||
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
||||
|
||||
"chalk": ["chalk@3.0.0", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="],
|
||||
|
||||
"check-node-version": ["check-node-version@4.2.1", "", { "dependencies": { "chalk": "^3.0.0", "map-values": "^1.0.1", "minimist": "^1.2.0", "object-filter": "^1.0.2", "run-parallel": "^1.1.4", "semver": "^6.3.0" }, "bin": { "check-node-version": "bin.js" } }, "sha512-YYmFYHV/X7kSJhuN/QYHUu998n/TRuDe8UenM3+m5NrkiH670lb9ILqHIvBencvJc4SDh+XcbXMR4b+TtubJiw=="],
|
||||
|
||||
"clone": ["clone@2.1.2", "", {}, "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w=="],
|
||||
|
||||
"color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
||||
|
||||
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||
|
||||
"cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="],
|
||||
|
||||
"has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
|
||||
|
||||
"map-values": ["map-values@1.0.1", "", {}, "sha512-BbShUnr5OartXJe1GeccAWtfro11hhgNJg6G9/UtWKjVGvV5U4C09cg5nk8JUevhXODaXY+hQ3xxMUKSs62ONQ=="],
|
||||
|
||||
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
|
||||
|
||||
"node-cache": ["node-cache@5.1.2", "", { "dependencies": { "clone": "2.x" } }, "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg=="],
|
||||
|
||||
"node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||
|
||||
"object-filter": ["object-filter@1.0.2", "", {}, "sha512-NahvP2vZcy1ZiiYah30CEPw0FpDcSkSePJBMpzl5EQgCmISijiGuJm3SPYp7U+Lf2TljyaIw3E5EgkEx/TNEVA=="],
|
||||
|
||||
"p-comuns": ["p-comuns@git+https://git2.idz.one/publico/_comuns.git#1ae18a1c8a9201a320b87d5f54d90b616d3eb6f3", { "dependencies": { "cross-fetch": "4.1.0", "zod": "3.24.1" } }, "1ae18a1c8a9201a320b87d5f54d90b616d3eb6f3"],
|
||||
|
||||
"p-respostas": ["p-respostas@git+https://git2.idz.one/publico/_respostas.git#54a2e90dbb8d5ae6386b9681beea1742885b5146", { "dependencies": { "p-comuns": "git+https://git2.idz.one/publico/_comuns.git#v.2", "zod": "3.24.1" } }, "54a2e90dbb8d5ae6386b9681beea1742885b5146"],
|
||||
|
||||
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
|
||||
|
||||
"run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],
|
||||
|
||||
"semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||
|
||||
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
||||
|
||||
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
|
||||
"typescript": ["typescript@5.5.4", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
|
||||
"zod": ["zod@3.24.1", "", {}, "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A=="],
|
||||
}
|
||||
}
|
||||
58
dist-back/autenticacao/_codigoContaSite.js
Normal file
58
dist-back/autenticacao/_codigoContaSite.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 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
|
||||
});
|
||||
59
dist-back/autenticacao/_usuarios_quipo.js
Normal file
59
dist-back/autenticacao/_usuarios_quipo.js
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
"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
|
||||
});
|
||||
66
dist-back/autenticacao/_usuarios_quipo_vincular.js
Normal file
66
dist-back/autenticacao/_usuarios_quipo_vincular.js
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
"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
|
||||
});
|
||||
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_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
|
||||
});
|
||||
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
|
||||
});
|
||||
34
dist-back/index.js
Normal file
34
dist-back/index.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"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")
|
||||
});
|
||||
62
dist-back/lista-prefeituras.js
Normal file
62
dist-back/lista-prefeituras.js
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
"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
|
||||
});
|
||||
67
dist-back/lista-usuarios.js
Normal file
67
dist-back/lista-usuarios.js
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
"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
|
||||
});
|
||||
90
dist-back/lista-vinculos.js
Normal file
90
dist-back/lista-vinculos.js
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
"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
|
||||
});
|
||||
35
dist-back/plugins/uuid.js
Normal file
35
dist-back/plugins/uuid.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"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
|
||||
});
|
||||
34
dist-back/produtos/_betha-meio-ambiente.js
Normal file
34
dist-back/produtos/_betha-meio-ambiente.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"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 }) => `${base_url}/${inquilino}${vinculo == import_tipagem.opcoesVinculosGovEnum.anonimo ? "" : `/${vinculo}#/admin`}`
|
||||
});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
produto_betha_meio_ambiente
|
||||
});
|
||||
34
dist-back/produtos/_e-licencie-gov.js
Normal file
34
dist-back/produtos/_e-licencie-gov.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"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 }) => `${base_url}/quipo/${inquilino}${vinculo == import_tipagem.opcoesVinculosGovEnum.anonimo ? "" : `/${vinculo}#/admin`}`
|
||||
});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
produto_e_licencie_gov
|
||||
});
|
||||
34
dist-back/produtos/_e-licencie.js
Normal file
34
dist-back/produtos/_e-licencie.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"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
|
||||
});
|
||||
34
dist-back/produtos/_suporte.js
Normal file
34
dist-back/produtos/_suporte.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"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
dist-back/produtos/doc.js
Normal file
1
dist-back/produtos/doc.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
"use strict";
|
||||
62
dist-back/produtos/index.js
Normal file
62
dist-back/produtos/index.js
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
"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
|
||||
});
|
||||
103
dist-back/produtos/tipagem.js
Normal file
103
dist-back/produtos/tipagem.js
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
"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
|
||||
});
|
||||
16
dist-back/tokens/index.js
Normal file
16
dist-back/tokens/index.js
Normal 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 tokens_exports = {};
|
||||
module.exports = __toCommonJS(tokens_exports);
|
||||
44
dist-back/utilitarios/site_autenticacao.js
Normal file
44
dist-back/utilitarios/site_autenticacao.js
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
"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
|
||||
});
|
||||
230
dist-front/index.d.mts
Normal file
230
dist-front/index.d.mts
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
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 };
|
||||
1
dist-front/index.mjs
Normal file
1
dist-front/index.mjs
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
type tipoPostCodigoContaSite = {
|
||||
site: string;
|
||||
};
|
||||
export declare const codigoContaSite: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: tipoPostCodigoContaSite;
|
||||
}) => Promise<tipoResposta<string>>;
|
||||
export {};
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import { respostaComuns } from "p-respostas";
|
||||
import node_fetch from "cross-fetch";
|
||||
export const codigoContaSite = async ({ url_api_autenticacao, post, }) => {
|
||||
const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`;
|
||||
try {
|
||||
const resp = await node_fetch(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.catch((e) => respostaComuns.erro("Erro ao enviar registros", [e.message]))
|
||||
.then((r) => r);
|
||||
return resp;
|
||||
}
|
||||
catch (e) {
|
||||
return respostaComuns.erro(`erro ao buscar código do site: ${e}`);
|
||||
}
|
||||
};
|
||||
17
dist-import/autenticacao/_usuarios_quipo.d.ts
vendored
17
dist-import/autenticacao/_usuarios_quipo.d.ts
vendored
|
|
@ -1,17 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
import type { tipo_usuarios__listar_retorno } from "../lista-usuarios";
|
||||
export type tipoUsuarioExterno = {
|
||||
_nome: string;
|
||||
_email: string;
|
||||
_telefone: string;
|
||||
vinculo: string;
|
||||
inquilino: string;
|
||||
chave_produto: string;
|
||||
codigo: string;
|
||||
_cpf: string;
|
||||
};
|
||||
export declare const usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino: string;
|
||||
}) => Promise<tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import node_fetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
export const usuarios_quipo = async ({ token_produto, url_api_autenticacao, inquilino, }) => {
|
||||
const url = `${url_api_autenticacao}/api/usuarios__listar`;
|
||||
if (!token_produto)
|
||||
return respostaComuns.erro("token_produto não informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
return node_fetch(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ inquilino }),
|
||||
headers,
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.catch((e) => respostaComuns.erro(`Erro ao buscar usuários quipo governo ${e.message}`))
|
||||
.then((r) => r);
|
||||
};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino_codigo: string;
|
||||
vinculo: string;
|
||||
usuario_codigo?: string;
|
||||
email: string;
|
||||
}) => Promise<tipoResposta<string>>;
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import node_fetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
export 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 respostaComuns.erro("token_produto não informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
const parametros = {
|
||||
vinculos: { inquilino_codigo, usuario_codigo, vinculo },
|
||||
email: email,
|
||||
};
|
||||
return await node_fetch(url, {
|
||||
headers,
|
||||
body: JSON.stringify(parametros),
|
||||
method: "POST",
|
||||
})
|
||||
.then(async (r) => await r.json())
|
||||
.catch((e) => respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`));
|
||||
};
|
||||
9
dist-import/autenticacao/_validarToken.d.ts
vendored
9
dist-import/autenticacao/_validarToken.d.ts
vendored
|
|
@ -1,9 +0,0 @@
|
|||
type tipoPostValidarTokem = {
|
||||
token: string;
|
||||
};
|
||||
/** faz a validação do token */
|
||||
export declare const validarToken: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: tipoPostValidarTokem;
|
||||
}) => Promise<"valido" | "erro">;
|
||||
export {};
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
import node_fetch from "cross-fetch";
|
||||
/** faz a validação do token */
|
||||
export const validarToken = async ({ url_api_autenticacao, post, }) => {
|
||||
const url = `${url_api_autenticacao}/api/validar_token`;
|
||||
try {
|
||||
const resposta = await node_fetch(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((r) => r)
|
||||
.then((resposta) => resposta.eCerto ? "valido" : "erro")
|
||||
.catch(() => "erro");
|
||||
return resposta;
|
||||
}
|
||||
catch (_e) {
|
||||
return "erro";
|
||||
}
|
||||
};
|
||||
30
dist-import/autenticacao/index.d.ts
vendored
30
dist-import/autenticacao/index.d.ts
vendored
|
|
@ -1,30 +0,0 @@
|
|||
import { type tipoUsuarioExterno } from "./_usuarios_quipo";
|
||||
export type { tipoUsuarioExterno };
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
export declare const pAutenticacao: {
|
||||
validarToken: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: {
|
||||
token: string;
|
||||
};
|
||||
}) => Promise<"valido" | "erro">;
|
||||
codigoContaSite: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: {
|
||||
site: string;
|
||||
};
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<import("..").tipo_usuarios__listar_retorno[]>>;
|
||||
usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino_codigo: string;
|
||||
vinculo: string;
|
||||
usuario_codigo?: string;
|
||||
email: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
};
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import { codigoContaSite } from "./_codigoContaSite";
|
||||
import { usuarios_quipo } from "./_usuarios_quipo";
|
||||
import { usuarios_quipo_vincular } from "./_usuarios_quipo_vincular";
|
||||
import { validarToken } from "./_validarToken";
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
export const pAutenticacao = {
|
||||
validarToken,
|
||||
codigoContaSite,
|
||||
usuarios_quipo,
|
||||
usuarios_quipo_vincular,
|
||||
};
|
||||
6
dist-import/index.d.ts
vendored
6
dist-import/index.d.ts
vendored
|
|
@ -1,6 +0,0 @@
|
|||
export * from "./autenticacao";
|
||||
export * from "./lista-prefeituras";
|
||||
export * from "./lista-usuarios";
|
||||
export * from "./lista-vinculos";
|
||||
export * from "./produtos";
|
||||
export * from "./tokens";
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
export * from "./autenticacao";
|
||||
export * from "./lista-prefeituras";
|
||||
export * from "./lista-usuarios";
|
||||
export * from "./lista-vinculos";
|
||||
export * from "./produtos";
|
||||
export * from "./tokens";
|
||||
12
dist-import/lista-prefeituras.d.ts
vendored
12
dist-import/lista-prefeituras.d.ts
vendored
|
|
@ -1,12 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
import type { chaves_produto } from "./produtos/tipagem";
|
||||
export type tipoRetornoListarPrefeitrua = {
|
||||
nome: string;
|
||||
inquilino: string;
|
||||
base_url: string;
|
||||
produto: keyof typeof chaves_produto;
|
||||
};
|
||||
export declare const tx_listar_prefeituras: "listar_prefeituras";
|
||||
export declare const listarPrefeituras: ({ url_api_autenticacao, }: {
|
||||
url_api_autenticacao: string;
|
||||
}) => Promise<tipoResposta<tipoRetornoListarPrefeitrua[]>>;
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
import cFetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
export const tx_listar_prefeituras = "listar_prefeituras";
|
||||
export const listarPrefeituras = async ({ url_api_autenticacao, }) => {
|
||||
const url = `${url_api_autenticacao}/api/${tx_listar_prefeituras}`;
|
||||
return cFetch(url)
|
||||
.then(async (a) => {
|
||||
const texto = await a.text();
|
||||
try {
|
||||
const res = JSON.parse(texto);
|
||||
return res;
|
||||
}
|
||||
catch (error) {
|
||||
return respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
|
||||
texto,
|
||||
error,
|
||||
]);
|
||||
}
|
||||
})
|
||||
.catch((error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
|
||||
};
|
||||
20
dist-import/lista-usuarios.d.ts
vendored
20
dist-import/lista-usuarios.d.ts
vendored
|
|
@ -1,20 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const tx_usuarios__listar: "usuarios__listar";
|
||||
export 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;
|
||||
};
|
||||
export type tipo_usuarios__listar_parametros = {
|
||||
inquilino?: string;
|
||||
};
|
||||
export declare const listarUsuarios: ({ token, url_api_autenticacao, }: {
|
||||
url_api_autenticacao: string;
|
||||
token: string;
|
||||
}, parametros: tipo_usuarios__listar_parametros) => Promise<tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import cFetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
export const tx_usuarios__listar = "usuarios__listar";
|
||||
export const listarUsuarios = async ({ token, url_api_autenticacao, }, parametros) => {
|
||||
const url = `${url_api_autenticacao}/api/${tx_usuarios__listar}`;
|
||||
return cFetch(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 respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [texto, error]);
|
||||
}
|
||||
})
|
||||
.catch((error) => respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [error]));
|
||||
};
|
||||
18
dist-import/lista-vinculos.d.ts
vendored
18
dist-import/lista-vinculos.d.ts
vendored
|
|
@ -1,18 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const tx_vinculos__listar: "vinculos__listar";
|
||||
export 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;
|
||||
};
|
||||
export declare const listarVinculos: ({ token, url_api_autenticacao, desativarCache, }: {
|
||||
url_api_autenticacao: string;
|
||||
token: string;
|
||||
/** por padrão será 10 segundos */
|
||||
desativarCache?: boolean;
|
||||
}) => Promise<tipoResposta<tipo_retorno_vinculo_listas[]>>;
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
import cFetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { cacheAuDrive } from "./plugins/node-cache";
|
||||
import { uuidV3 } from "./plugins/uuid";
|
||||
export const tx_vinculos__listar = "vinculos__listar";
|
||||
export const listarVinculos = async ({ token, url_api_autenticacao, desativarCache, }) => {
|
||||
const chaveCache = uuidV3({ token, url_api_autenticacao });
|
||||
// Buscar promeiro no cache
|
||||
if (!desativarCache) {
|
||||
const valorCache = cacheAuDrive.get(chaveCache);
|
||||
if (valorCache)
|
||||
return valorCache;
|
||||
}
|
||||
const res = (async () => {
|
||||
const url = `${url_api_autenticacao}/api/${tx_vinculos__listar}`;
|
||||
return cFetch(url, {
|
||||
headers: { token, "Content-Type": "application/json" },
|
||||
body: "{}",
|
||||
method: "post",
|
||||
})
|
||||
.then(async (a) => {
|
||||
const texto = await a.text();
|
||||
try {
|
||||
const res = JSON.parse(texto);
|
||||
return res;
|
||||
}
|
||||
catch (error) {
|
||||
return respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
|
||||
}
|
||||
})
|
||||
.catch((error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
|
||||
error,
|
||||
]));
|
||||
})();
|
||||
cacheAuDrive.set(chaveCache, res.then((a) => {
|
||||
try {
|
||||
if (a.eErro) {
|
||||
cacheAuDrive.del(chaveCache);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return a;
|
||||
}), 10);
|
||||
return res;
|
||||
};
|
||||
2
dist-import/plugins/node-cache.d.ts
vendored
2
dist-import/plugins/node-cache.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import NodeCache from "node-cache";
|
||||
export declare const cacheAuDrive: NodeCache;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
import NodeCache from "node-cache";
|
||||
export const cacheAuDrive = new NodeCache();
|
||||
3
dist-import/plugins/uuid.d.ts
vendored
3
dist-import/plugins/uuid.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
|||
import { v4 } from "uuid";
|
||||
export declare const uuidV3: (qualquerCoisa: any) => string;
|
||||
export declare const uuidV4: typeof v4;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import { NIL, v3, v4 } from "uuid";
|
||||
export const uuidV3 = (qualquerCoisa) => v3(typeof qualquerCoisa == "string"
|
||||
? qualquerCoisa
|
||||
: typeof qualquerCoisa == "number"
|
||||
? String(qualquerCoisa)
|
||||
: JSON.stringify(qualquerCoisa), NIL);
|
||||
export const uuidV4 = v4;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
import { ProdutoQuipo } from "./tipagem";
|
||||
export declare const produto_betha_meio_ambiente: ProdutoQuipo<"betha-meio-ambiente">;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import { ProdutoQuipo } from "./tipagem";
|
||||
export const produto_betha_meio_ambiente = new ProdutoQuipo({
|
||||
chave_produto: "betha-meio-ambiente",
|
||||
titulo: "Betha Meio Ambiente",
|
||||
descricao: "Betha Meio Ambiente: Software de gestão de processos ambientais para órgãos públicos da Betha Sistemas.",
|
||||
url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo"
|
||||
? ""
|
||||
: `/${vinculo}#/admin`}`,
|
||||
});
|
||||
2
dist-import/produtos/_e-licencie-gov.d.ts
vendored
2
dist-import/produtos/_e-licencie-gov.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { ProdutoQuipo } from "./tipagem";
|
||||
export declare const produto_e_licencie_gov: ProdutoQuipo<"e-licencie-gov">;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente";
|
||||
import { ProdutoQuipo } from "./tipagem";
|
||||
export const produto_e_licencie_gov = new ProdutoQuipo({
|
||||
...produto_betha_meio_ambiente,
|
||||
titulo: "e-Licencie Gov",
|
||||
chave_produto: "e-licencie-gov",
|
||||
url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo"
|
||||
? ""
|
||||
: `/${vinculo}#/admin`}`,
|
||||
});
|
||||
2
dist-import/produtos/_e-licencie.d.ts
vendored
2
dist-import/produtos/_e-licencie.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export declare const produto_e_licencie: Produto<"e-licencie">;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export const produto_e_licencie = new Produto({
|
||||
chave_produto: "e-licencie",
|
||||
titulo: "e-Licencie",
|
||||
descricao: "e-Licencie: Software de gestão de processos e dados ambientais.",
|
||||
url_produto: ({ base_url }) => base_url,
|
||||
});
|
||||
2
dist-import/produtos/_suporte.d.ts
vendored
2
dist-import/produtos/_suporte.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export declare const produto_suporte: Produto<"suporte">;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export const produto_suporte = new Produto({
|
||||
chave_produto: "suporte",
|
||||
titulo: "Suporte",
|
||||
descricao: "Gestão de contas e usuários dos produtos da e-licencie",
|
||||
url_produto: ({ base_url }) => base_url,
|
||||
});
|
||||
31
dist-import/produtos/doc.d.ts
vendored
31
dist-import/produtos/doc.d.ts
vendored
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
|
||||
Produtos existentes:
|
||||
|
||||
Atenticacao:
|
||||
Acesso a gestão de produtos
|
||||
Apenas uma conta com o código autenticao
|
||||
/autenticacao
|
||||
|
||||
Betha Meio Ambiente:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
Possue limite de acesso a módulos:
|
||||
Licenciamento
|
||||
Fiscalização
|
||||
|
||||
|
||||
|
||||
e-licencie GOV:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
|
||||
|
||||
e-licencie:
|
||||
Acesso a Aplicação e-licencie
|
||||
Adminstrador e Não adminstrasdor
|
||||
|
||||
|
||||
*/
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
"use strict";
|
||||
/**
|
||||
|
||||
Produtos existentes:
|
||||
|
||||
Atenticacao:
|
||||
Acesso a gestão de produtos
|
||||
Apenas uma conta com o código autenticao
|
||||
/autenticacao
|
||||
|
||||
Betha Meio Ambiente:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
Possue limite de acesso a módulos:
|
||||
Licenciamento
|
||||
Fiscalização
|
||||
|
||||
|
||||
|
||||
e-licencie GOV:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
|
||||
|
||||
e-licencie:
|
||||
Acesso a Aplicação e-licencie
|
||||
Adminstrador e Não adminstrasdor
|
||||
|
||||
|
||||
*/
|
||||
9
dist-import/produtos/index.d.ts
vendored
9
dist-import/produtos/index.d.ts
vendored
|
|
@ -1,9 +0,0 @@
|
|||
import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente";
|
||||
import { produto_e_licencie } from "./_e-licencie";
|
||||
import { produto_e_licencie_gov } from "./_e-licencie-gov";
|
||||
import { produto_suporte } from "./_suporte";
|
||||
import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios } from "./tipagem";
|
||||
export declare const listaProdutos: {
|
||||
[k in keyof typeof chaves_produto]: Produto<k>;
|
||||
};
|
||||
export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, };
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente";
|
||||
import { produto_e_licencie } from "./_e-licencie";
|
||||
import { produto_e_licencie_gov } from "./_e-licencie-gov";
|
||||
import { produto_suporte } from "./_suporte";
|
||||
import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios, } from "./tipagem";
|
||||
export const listaProdutos = {
|
||||
"betha-meio-ambiente": produto_betha_meio_ambiente,
|
||||
"e-licencie": produto_e_licencie,
|
||||
"e-licencie-gov": produto_e_licencie_gov,
|
||||
suporte: produto_suporte,
|
||||
};
|
||||
export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, };
|
||||
94
dist-import/produtos/tipagem.d.ts
vendored
94
dist-import/produtos/tipagem.d.ts
vendored
|
|
@ -1,94 +0,0 @@
|
|||
/** Lista dos produtos da e-licencie */
|
||||
export declare enum chaves_produto {
|
||||
suporte = "suporte",
|
||||
"betha-meio-ambiente" = "betha-meio-ambiente",
|
||||
"e-licencie-gov" = "e-licencie-gov",
|
||||
"e-licencie" = "e-licencie"
|
||||
}
|
||||
export declare const opcoesVinculosGov: {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
export declare const opcoesVinculosSuporte: {
|
||||
readonly "suporte-1": "Suporte Primário";
|
||||
};
|
||||
export declare const opcoesVinculos: {
|
||||
readonly suporte: {
|
||||
readonly "suporte-1": "Suporte Primário";
|
||||
};
|
||||
readonly "betha-meio-ambiente": {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
readonly "e-licencie-gov": {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
readonly "e-licencie": {};
|
||||
};
|
||||
export declare const tiposAcesso: {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
export 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;
|
||||
};
|
||||
export 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;
|
||||
};
|
||||
}
|
||||
export declare class ProdutoQuipo<C extends keyof typeof chaves_produto> extends Produto<C> {
|
||||
extruturaToken(_: extrutruaraTokenQuipo): extrutruaraTokenQuipo & {
|
||||
chave_produto: C;
|
||||
};
|
||||
}
|
||||
export declare enum versao_usuarios {
|
||||
versao_usuarios_autenticacao = "versao_usuarios_autenticacao",
|
||||
versao_usuarios_quipo = "versao_usuarios_quipo"
|
||||
}
|
||||
export {};
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/** Lista dos produtos da e-licencie */
|
||||
export var chaves_produto;
|
||||
(function (chaves_produto) {
|
||||
chaves_produto["suporte"] = "suporte";
|
||||
chaves_produto["betha-meio-ambiente"] = "betha-meio-ambiente";
|
||||
chaves_produto["e-licencie-gov"] = "e-licencie-gov";
|
||||
chaves_produto["e-licencie"] = "e-licencie";
|
||||
})(chaves_produto || (chaves_produto = {}));
|
||||
export const opcoesVinculosGov = {
|
||||
governo: "Governo",
|
||||
sociedade: "Sociedade",
|
||||
anonimo: "Anônimo",
|
||||
};
|
||||
export const opcoesVinculosSuporte = {
|
||||
"suporte-1": "Suporte Primário",
|
||||
};
|
||||
export const opcoesVinculos = {
|
||||
[chaves_produto.suporte]: opcoesVinculosSuporte,
|
||||
[chaves_produto["betha-meio-ambiente"]]: opcoesVinculosGov,
|
||||
[chaves_produto["e-licencie-gov"]]: opcoesVinculosGov,
|
||||
[chaves_produto["e-licencie"]]: {},
|
||||
};
|
||||
export const tiposAcesso = opcoesVinculosGov;
|
||||
export const provedoresGov = {
|
||||
/** Sistema de login da Beta */
|
||||
"betha-sistemas": "Betha Sistemas",
|
||||
/** sistema de login do altenticado */
|
||||
"e-licencie": "e-licencie",
|
||||
};
|
||||
export 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 };
|
||||
}
|
||||
}
|
||||
export class ProdutoQuipo extends Produto {
|
||||
extruturaToken(_) {
|
||||
return { ..._, chave_produto: this.chave_produto };
|
||||
}
|
||||
}
|
||||
export var versao_usuarios;
|
||||
(function (versao_usuarios) {
|
||||
versao_usuarios["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao";
|
||||
versao_usuarios["versao_usuarios_quipo"] = "versao_usuarios_quipo";
|
||||
})(versao_usuarios || (versao_usuarios = {}));
|
||||
10
dist-import/tokens/index.d.ts
vendored
10
dist-import/tokens/index.d.ts
vendored
|
|
@ -1,10 +0,0 @@
|
|||
import type { provedoresGov } from "../produtos";
|
||||
export type tipoUsuarioTokenAutneticacao = {
|
||||
usuario_codigo: string;
|
||||
usuario_nome: string;
|
||||
usuario_email: string;
|
||||
usuario_cpf: string;
|
||||
autenticacao_codigo: string;
|
||||
eSuporte: boolean;
|
||||
autenticacao_provedor: keyof typeof provedoresGov;
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
export {};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
type tipoPostCodigoContaSite = {
|
||||
site: string;
|
||||
};
|
||||
export declare const codigoContaSite: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: tipoPostCodigoContaSite;
|
||||
}) => Promise<tipoResposta<string>>;
|
||||
export {};
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
"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;
|
||||
17
dist-require/autenticacao/_usuarios_quipo.d.ts
vendored
17
dist-require/autenticacao/_usuarios_quipo.d.ts
vendored
|
|
@ -1,17 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
import type { tipo_usuarios__listar_retorno } from "../lista-usuarios";
|
||||
export type tipoUsuarioExterno = {
|
||||
_nome: string;
|
||||
_email: string;
|
||||
_telefone: string;
|
||||
vinculo: string;
|
||||
inquilino: string;
|
||||
chave_produto: string;
|
||||
codigo: string;
|
||||
_cpf: string;
|
||||
};
|
||||
export declare const usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino: string;
|
||||
}) => Promise<tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.usuarios_quipo = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
const p_respostas_1 = 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 p_respostas_1.respostaComuns.erro("token_produto não informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
return (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ inquilino }),
|
||||
headers,
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.catch((e) => p_respostas_1.respostaComuns.erro(`Erro ao buscar usuários quipo governo ${e.message}`))
|
||||
.then((r) => r);
|
||||
};
|
||||
exports.usuarios_quipo = usuarios_quipo;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino_codigo: string;
|
||||
vinculo: string;
|
||||
usuario_codigo?: string;
|
||||
email: string;
|
||||
}) => Promise<tipoResposta<string>>;
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.usuarios_quipo_vincular = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
const p_respostas_1 = 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 p_respostas_1.respostaComuns.erro("token_produto não informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
const parametros = {
|
||||
vinculos: { inquilino_codigo, usuario_codigo, vinculo },
|
||||
email: email,
|
||||
};
|
||||
return await (0, cross_fetch_1.default)(url, {
|
||||
headers,
|
||||
body: JSON.stringify(parametros),
|
||||
method: "POST",
|
||||
})
|
||||
.then(async (r) => await r.json())
|
||||
.catch((e) => p_respostas_1.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`));
|
||||
};
|
||||
exports.usuarios_quipo_vincular = usuarios_quipo_vincular;
|
||||
9
dist-require/autenticacao/_validarToken.d.ts
vendored
9
dist-require/autenticacao/_validarToken.d.ts
vendored
|
|
@ -1,9 +0,0 @@
|
|||
type tipoPostValidarTokem = {
|
||||
token: string;
|
||||
};
|
||||
/** faz a validação do token */
|
||||
export declare const validarToken: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: tipoPostValidarTokem;
|
||||
}) => Promise<"valido" | "erro">;
|
||||
export {};
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validarToken = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
/** faz a validação do token */
|
||||
const validarToken = async ({ url_api_autenticacao, post, }) => {
|
||||
const url = `${url_api_autenticacao}/api/validar_token`;
|
||||
try {
|
||||
const resposta = await (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((r) => r)
|
||||
.then((resposta) => resposta.eCerto ? "valido" : "erro")
|
||||
.catch(() => "erro");
|
||||
return resposta;
|
||||
}
|
||||
catch (_e) {
|
||||
return "erro";
|
||||
}
|
||||
};
|
||||
exports.validarToken = validarToken;
|
||||
30
dist-require/autenticacao/index.d.ts
vendored
30
dist-require/autenticacao/index.d.ts
vendored
|
|
@ -1,30 +0,0 @@
|
|||
import { type tipoUsuarioExterno } from "./_usuarios_quipo";
|
||||
export type { tipoUsuarioExterno };
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
export declare const pAutenticacao: {
|
||||
validarToken: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: {
|
||||
token: string;
|
||||
};
|
||||
}) => Promise<"valido" | "erro">;
|
||||
codigoContaSite: ({ url_api_autenticacao, post, }: {
|
||||
url_api_autenticacao: string;
|
||||
post: {
|
||||
site: string;
|
||||
};
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<import("..").tipo_usuarios__listar_retorno[]>>;
|
||||
usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino_codigo: string;
|
||||
vinculo: string;
|
||||
usuario_codigo?: string;
|
||||
email: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
};
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pAutenticacao = void 0;
|
||||
const _codigoContaSite_1 = require("./_codigoContaSite");
|
||||
const _usuarios_quipo_1 = require("./_usuarios_quipo");
|
||||
const _usuarios_quipo_vincular_1 = require("./_usuarios_quipo_vincular");
|
||||
const _validarToken_1 = require("./_validarToken");
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
exports.pAutenticacao = {
|
||||
validarToken: _validarToken_1.validarToken,
|
||||
codigoContaSite: _codigoContaSite_1.codigoContaSite,
|
||||
usuarios_quipo: _usuarios_quipo_1.usuarios_quipo,
|
||||
usuarios_quipo_vincular: _usuarios_quipo_vincular_1.usuarios_quipo_vincular,
|
||||
};
|
||||
6
dist-require/index.d.ts
vendored
6
dist-require/index.d.ts
vendored
|
|
@ -1,6 +0,0 @@
|
|||
export * from "./autenticacao";
|
||||
export * from "./lista-prefeituras";
|
||||
export * from "./lista-usuarios";
|
||||
export * from "./lista-vinculos";
|
||||
export * from "./produtos";
|
||||
export * from "./tokens";
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
"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("./autenticacao"), exports);
|
||||
__exportStar(require("./lista-prefeituras"), exports);
|
||||
__exportStar(require("./lista-usuarios"), exports);
|
||||
__exportStar(require("./lista-vinculos"), exports);
|
||||
__exportStar(require("./produtos"), exports);
|
||||
__exportStar(require("./tokens"), exports);
|
||||
12
dist-require/lista-prefeituras.d.ts
vendored
12
dist-require/lista-prefeituras.d.ts
vendored
|
|
@ -1,12 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
import type { chaves_produto } from "./produtos/tipagem";
|
||||
export type tipoRetornoListarPrefeitrua = {
|
||||
nome: string;
|
||||
inquilino: string;
|
||||
base_url: string;
|
||||
produto: keyof typeof chaves_produto;
|
||||
};
|
||||
export declare const tx_listar_prefeituras: "listar_prefeituras";
|
||||
export declare const listarPrefeituras: ({ url_api_autenticacao, }: {
|
||||
url_api_autenticacao: string;
|
||||
}) => Promise<tipoResposta<tipoRetornoListarPrefeitrua[]>>;
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.listarPrefeituras = exports.tx_listar_prefeituras = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
const p_respostas_1 = require("p-respostas");
|
||||
exports.tx_listar_prefeituras = "listar_prefeituras";
|
||||
const listarPrefeituras = async ({ url_api_autenticacao, }) => {
|
||||
const url = `${url_api_autenticacao}/api/${exports.tx_listar_prefeituras}`;
|
||||
return (0, cross_fetch_1.default)(url)
|
||||
.then(async (a) => {
|
||||
const texto = await a.text();
|
||||
try {
|
||||
const res = JSON.parse(texto);
|
||||
return res;
|
||||
}
|
||||
catch (error) {
|
||||
return p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
|
||||
texto,
|
||||
error,
|
||||
]);
|
||||
}
|
||||
})
|
||||
.catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
|
||||
};
|
||||
exports.listarPrefeituras = listarPrefeituras;
|
||||
20
dist-require/lista-usuarios.d.ts
vendored
20
dist-require/lista-usuarios.d.ts
vendored
|
|
@ -1,20 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const tx_usuarios__listar: "usuarios__listar";
|
||||
export 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;
|
||||
};
|
||||
export type tipo_usuarios__listar_parametros = {
|
||||
inquilino?: string;
|
||||
};
|
||||
export declare const listarUsuarios: ({ token, url_api_autenticacao, }: {
|
||||
url_api_autenticacao: string;
|
||||
token: string;
|
||||
}, parametros: tipo_usuarios__listar_parametros) => Promise<tipoResposta<tipo_usuarios__listar_retorno[]>>;
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.listarUsuarios = exports.tx_usuarios__listar = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
const p_respostas_1 = require("p-respostas");
|
||||
exports.tx_usuarios__listar = "usuarios__listar";
|
||||
const listarUsuarios = async ({ token, url_api_autenticacao, }, parametros) => {
|
||||
const url = `${url_api_autenticacao}/api/${exports.tx_usuarios__listar}`;
|
||||
return (0, cross_fetch_1.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 p_respostas_1.respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [texto, error]);
|
||||
}
|
||||
})
|
||||
.catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [error]));
|
||||
};
|
||||
exports.listarUsuarios = listarUsuarios;
|
||||
18
dist-require/lista-vinculos.d.ts
vendored
18
dist-require/lista-vinculos.d.ts
vendored
|
|
@ -1,18 +0,0 @@
|
|||
import { type tipoResposta } from "p-respostas";
|
||||
export declare const tx_vinculos__listar: "vinculos__listar";
|
||||
export 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;
|
||||
};
|
||||
export declare const listarVinculos: ({ token, url_api_autenticacao, desativarCache, }: {
|
||||
url_api_autenticacao: string;
|
||||
token: string;
|
||||
/** por padrão será 10 segundos */
|
||||
desativarCache?: boolean;
|
||||
}) => Promise<tipoResposta<tipo_retorno_vinculo_listas[]>>;
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.listarVinculos = exports.tx_vinculos__listar = void 0;
|
||||
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
const p_respostas_1 = require("p-respostas");
|
||||
const node_cache_1 = require("./plugins/node-cache");
|
||||
const uuid_1 = require("./plugins/uuid");
|
||||
exports.tx_vinculos__listar = "vinculos__listar";
|
||||
const listarVinculos = async ({ token, url_api_autenticacao, desativarCache, }) => {
|
||||
const chaveCache = (0, uuid_1.uuidV3)({ token, url_api_autenticacao });
|
||||
// Buscar promeiro no cache
|
||||
if (!desativarCache) {
|
||||
const valorCache = node_cache_1.cacheAuDrive.get(chaveCache);
|
||||
if (valorCache)
|
||||
return valorCache;
|
||||
}
|
||||
const res = (async () => {
|
||||
const url = `${url_api_autenticacao}/api/${exports.tx_vinculos__listar}`;
|
||||
return (0, cross_fetch_1.default)(url, {
|
||||
headers: { token, "Content-Type": "application/json" },
|
||||
body: "{}",
|
||||
method: "post",
|
||||
})
|
||||
.then(async (a) => {
|
||||
const texto = await a.text();
|
||||
try {
|
||||
const res = JSON.parse(texto);
|
||||
return res;
|
||||
}
|
||||
catch (error) {
|
||||
return p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
|
||||
}
|
||||
})
|
||||
.catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
|
||||
error,
|
||||
]));
|
||||
})();
|
||||
node_cache_1.cacheAuDrive.set(chaveCache, res.then((a) => {
|
||||
try {
|
||||
if (a.eErro) {
|
||||
node_cache_1.cacheAuDrive.del(chaveCache);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return a;
|
||||
}), 10);
|
||||
return res;
|
||||
};
|
||||
exports.listarVinculos = listarVinculos;
|
||||
2
dist-require/plugins/node-cache.d.ts
vendored
2
dist-require/plugins/node-cache.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import NodeCache from "node-cache";
|
||||
export declare const cacheAuDrive: NodeCache;
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cacheAuDrive = void 0;
|
||||
const node_cache_1 = __importDefault(require("node-cache"));
|
||||
exports.cacheAuDrive = new node_cache_1.default();
|
||||
3
dist-require/plugins/uuid.d.ts
vendored
3
dist-require/plugins/uuid.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
|||
import { v4 } from "uuid";
|
||||
export declare const uuidV3: (qualquerCoisa: any) => string;
|
||||
export declare const uuidV4: typeof v4;
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.uuidV4 = exports.uuidV3 = void 0;
|
||||
const uuid_1 = require("uuid");
|
||||
const uuidV3 = (qualquerCoisa) => (0, uuid_1.v3)(typeof qualquerCoisa == "string"
|
||||
? qualquerCoisa
|
||||
: typeof qualquerCoisa == "number"
|
||||
? String(qualquerCoisa)
|
||||
: JSON.stringify(qualquerCoisa), uuid_1.NIL);
|
||||
exports.uuidV3 = uuidV3;
|
||||
exports.uuidV4 = uuid_1.v4;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
import { ProdutoQuipo } from "./tipagem";
|
||||
export declare const produto_betha_meio_ambiente: ProdutoQuipo<"betha-meio-ambiente">;
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.produto_betha_meio_ambiente = void 0;
|
||||
const tipagem_1 = require("./tipagem");
|
||||
exports.produto_betha_meio_ambiente = new tipagem_1.ProdutoQuipo({
|
||||
chave_produto: "betha-meio-ambiente",
|
||||
titulo: "Betha Meio Ambiente",
|
||||
descricao: "Betha Meio Ambiente: Software de gestão de processos ambientais para órgãos públicos da Betha Sistemas.",
|
||||
url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo"
|
||||
? ""
|
||||
: `/${vinculo}#/admin`}`,
|
||||
});
|
||||
2
dist-require/produtos/_e-licencie-gov.d.ts
vendored
2
dist-require/produtos/_e-licencie-gov.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { ProdutoQuipo } from "./tipagem";
|
||||
export declare const produto_e_licencie_gov: ProdutoQuipo<"e-licencie-gov">;
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.produto_e_licencie_gov = void 0;
|
||||
const _betha_meio_ambiente_1 = require("./_betha-meio-ambiente");
|
||||
const tipagem_1 = require("./tipagem");
|
||||
exports.produto_e_licencie_gov = new tipagem_1.ProdutoQuipo({
|
||||
..._betha_meio_ambiente_1.produto_betha_meio_ambiente,
|
||||
titulo: "e-Licencie Gov",
|
||||
chave_produto: "e-licencie-gov",
|
||||
url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo"
|
||||
? ""
|
||||
: `/${vinculo}#/admin`}`,
|
||||
});
|
||||
2
dist-require/produtos/_e-licencie.d.ts
vendored
2
dist-require/produtos/_e-licencie.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export declare const produto_e_licencie: Produto<"e-licencie">;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.produto_e_licencie = void 0;
|
||||
const tipagem_1 = require("./tipagem");
|
||||
exports.produto_e_licencie = new tipagem_1.Produto({
|
||||
chave_produto: "e-licencie",
|
||||
titulo: "e-Licencie",
|
||||
descricao: "e-Licencie: Software de gestão de processos e dados ambientais.",
|
||||
url_produto: ({ base_url }) => base_url,
|
||||
});
|
||||
2
dist-require/produtos/_suporte.d.ts
vendored
2
dist-require/produtos/_suporte.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
import { Produto } from "./tipagem";
|
||||
export declare const produto_suporte: Produto<"suporte">;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.produto_suporte = void 0;
|
||||
const tipagem_1 = require("./tipagem");
|
||||
exports.produto_suporte = new tipagem_1.Produto({
|
||||
chave_produto: "suporte",
|
||||
titulo: "Suporte",
|
||||
descricao: "Gestão de contas e usuários dos produtos da e-licencie",
|
||||
url_produto: ({ base_url }) => base_url,
|
||||
});
|
||||
31
dist-require/produtos/doc.d.ts
vendored
31
dist-require/produtos/doc.d.ts
vendored
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
|
||||
Produtos existentes:
|
||||
|
||||
Atenticacao:
|
||||
Acesso a gestão de produtos
|
||||
Apenas uma conta com o código autenticao
|
||||
/autenticacao
|
||||
|
||||
Betha Meio Ambiente:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
Possue limite de acesso a módulos:
|
||||
Licenciamento
|
||||
Fiscalização
|
||||
|
||||
|
||||
|
||||
e-licencie GOV:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
|
||||
|
||||
e-licencie:
|
||||
Acesso a Aplicação e-licencie
|
||||
Adminstrador e Não adminstrasdor
|
||||
|
||||
|
||||
*/
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
"use strict";
|
||||
/**
|
||||
|
||||
Produtos existentes:
|
||||
|
||||
Atenticacao:
|
||||
Acesso a gestão de produtos
|
||||
Apenas uma conta com o código autenticao
|
||||
/autenticacao
|
||||
|
||||
Betha Meio Ambiente:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
Possue limite de acesso a módulos:
|
||||
Licenciamento
|
||||
Fiscalização
|
||||
|
||||
|
||||
|
||||
e-licencie GOV:
|
||||
Acesso a gestão da aplicação Quipo
|
||||
Acesso pode ser sociedade ou governo
|
||||
/quipo
|
||||
|
||||
|
||||
e-licencie:
|
||||
Acesso a Aplicação e-licencie
|
||||
Adminstrador e Não adminstrasdor
|
||||
|
||||
|
||||
*/
|
||||
9
dist-require/produtos/index.d.ts
vendored
9
dist-require/produtos/index.d.ts
vendored
|
|
@ -1,9 +0,0 @@
|
|||
import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente";
|
||||
import { produto_e_licencie } from "./_e-licencie";
|
||||
import { produto_e_licencie_gov } from "./_e-licencie-gov";
|
||||
import { produto_suporte } from "./_suporte";
|
||||
import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios } from "./tipagem";
|
||||
export declare const listaProdutos: {
|
||||
[k in keyof typeof chaves_produto]: Produto<k>;
|
||||
};
|
||||
export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, };
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.versao_usuarios = exports.produto_suporte = exports.produto_e_licencie_gov = exports.produto_e_licencie = exports.produto_betha_meio_ambiente = exports.provedoresGov = exports.opcoesVinculos = exports.opcoesVinculosGov = exports.chaves_produto = exports.Produto = exports.listaProdutos = void 0;
|
||||
const _betha_meio_ambiente_1 = require("./_betha-meio-ambiente");
|
||||
Object.defineProperty(exports, "produto_betha_meio_ambiente", { enumerable: true, get: function () { return _betha_meio_ambiente_1.produto_betha_meio_ambiente; } });
|
||||
const _e_licencie_1 = require("./_e-licencie");
|
||||
Object.defineProperty(exports, "produto_e_licencie", { enumerable: true, get: function () { return _e_licencie_1.produto_e_licencie; } });
|
||||
const _e_licencie_gov_1 = require("./_e-licencie-gov");
|
||||
Object.defineProperty(exports, "produto_e_licencie_gov", { enumerable: true, get: function () { return _e_licencie_gov_1.produto_e_licencie_gov; } });
|
||||
const _suporte_1 = require("./_suporte");
|
||||
Object.defineProperty(exports, "produto_suporte", { enumerable: true, get: function () { return _suporte_1.produto_suporte; } });
|
||||
const tipagem_1 = require("./tipagem");
|
||||
Object.defineProperty(exports, "chaves_produto", { enumerable: true, get: function () { return tipagem_1.chaves_produto; } });
|
||||
Object.defineProperty(exports, "opcoesVinculos", { enumerable: true, get: function () { return tipagem_1.opcoesVinculos; } });
|
||||
Object.defineProperty(exports, "opcoesVinculosGov", { enumerable: true, get: function () { return tipagem_1.opcoesVinculosGov; } });
|
||||
Object.defineProperty(exports, "Produto", { enumerable: true, get: function () { return tipagem_1.Produto; } });
|
||||
Object.defineProperty(exports, "provedoresGov", { enumerable: true, get: function () { return tipagem_1.provedoresGov; } });
|
||||
Object.defineProperty(exports, "versao_usuarios", { enumerable: true, get: function () { return tipagem_1.versao_usuarios; } });
|
||||
exports.listaProdutos = {
|
||||
"betha-meio-ambiente": _betha_meio_ambiente_1.produto_betha_meio_ambiente,
|
||||
"e-licencie": _e_licencie_1.produto_e_licencie,
|
||||
"e-licencie-gov": _e_licencie_gov_1.produto_e_licencie_gov,
|
||||
suporte: _suporte_1.produto_suporte,
|
||||
};
|
||||
94
dist-require/produtos/tipagem.d.ts
vendored
94
dist-require/produtos/tipagem.d.ts
vendored
|
|
@ -1,94 +0,0 @@
|
|||
/** Lista dos produtos da e-licencie */
|
||||
export declare enum chaves_produto {
|
||||
suporte = "suporte",
|
||||
"betha-meio-ambiente" = "betha-meio-ambiente",
|
||||
"e-licencie-gov" = "e-licencie-gov",
|
||||
"e-licencie" = "e-licencie"
|
||||
}
|
||||
export declare const opcoesVinculosGov: {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
export declare const opcoesVinculosSuporte: {
|
||||
readonly "suporte-1": "Suporte Primário";
|
||||
};
|
||||
export declare const opcoesVinculos: {
|
||||
readonly suporte: {
|
||||
readonly "suporte-1": "Suporte Primário";
|
||||
};
|
||||
readonly "betha-meio-ambiente": {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
readonly "e-licencie-gov": {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
readonly "e-licencie": {};
|
||||
};
|
||||
export declare const tiposAcesso: {
|
||||
readonly governo: "Governo";
|
||||
readonly sociedade: "Sociedade";
|
||||
readonly anonimo: "Anônimo";
|
||||
};
|
||||
export 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;
|
||||
};
|
||||
export 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;
|
||||
};
|
||||
}
|
||||
export declare class ProdutoQuipo<C extends keyof typeof chaves_produto> extends Produto<C> {
|
||||
extruturaToken(_: extrutruaraTokenQuipo): extrutruaraTokenQuipo & {
|
||||
chave_produto: C;
|
||||
};
|
||||
}
|
||||
export declare enum versao_usuarios {
|
||||
versao_usuarios_autenticacao = "versao_usuarios_autenticacao",
|
||||
versao_usuarios_quipo = "versao_usuarios_quipo"
|
||||
}
|
||||
export {};
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.versao_usuarios = exports.ProdutoQuipo = exports.Produto = exports.provedoresGov = exports.tiposAcesso = exports.opcoesVinculos = exports.opcoesVinculosSuporte = exports.opcoesVinculosGov = exports.chaves_produto = void 0;
|
||||
/** Lista dos produtos da e-licencie */
|
||||
var chaves_produto;
|
||||
(function (chaves_produto) {
|
||||
chaves_produto["suporte"] = "suporte";
|
||||
chaves_produto["betha-meio-ambiente"] = "betha-meio-ambiente";
|
||||
chaves_produto["e-licencie-gov"] = "e-licencie-gov";
|
||||
chaves_produto["e-licencie"] = "e-licencie";
|
||||
})(chaves_produto || (exports.chaves_produto = chaves_produto = {}));
|
||||
exports.opcoesVinculosGov = {
|
||||
governo: "Governo",
|
||||
sociedade: "Sociedade",
|
||||
anonimo: "Anônimo",
|
||||
};
|
||||
exports.opcoesVinculosSuporte = {
|
||||
"suporte-1": "Suporte Primário",
|
||||
};
|
||||
exports.opcoesVinculos = {
|
||||
[chaves_produto.suporte]: exports.opcoesVinculosSuporte,
|
||||
[chaves_produto["betha-meio-ambiente"]]: exports.opcoesVinculosGov,
|
||||
[chaves_produto["e-licencie-gov"]]: exports.opcoesVinculosGov,
|
||||
[chaves_produto["e-licencie"]]: {},
|
||||
};
|
||||
exports.tiposAcesso = exports.opcoesVinculosGov;
|
||||
exports.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 };
|
||||
}
|
||||
}
|
||||
exports.Produto = Produto;
|
||||
class ProdutoQuipo extends Produto {
|
||||
extruturaToken(_) {
|
||||
return { ..._, chave_produto: this.chave_produto };
|
||||
}
|
||||
}
|
||||
exports.ProdutoQuipo = ProdutoQuipo;
|
||||
var versao_usuarios;
|
||||
(function (versao_usuarios) {
|
||||
versao_usuarios["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao";
|
||||
versao_usuarios["versao_usuarios_quipo"] = "versao_usuarios_quipo";
|
||||
})(versao_usuarios || (exports.versao_usuarios = versao_usuarios = {}));
|
||||
10
dist-require/tokens/index.d.ts
vendored
10
dist-require/tokens/index.d.ts
vendored
|
|
@ -1,10 +0,0 @@
|
|||
import type { provedoresGov } from "../produtos";
|
||||
export type tipoUsuarioTokenAutneticacao = {
|
||||
usuario_codigo: string;
|
||||
usuario_nome: string;
|
||||
usuario_email: string;
|
||||
usuario_cpf: string;
|
||||
autenticacao_codigo: string;
|
||||
eSuporte: boolean;
|
||||
autenticacao_provedor: keyof typeof provedoresGov;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue