melhorias de tipagem

This commit is contained in:
Luiz Silva 2025-08-20 12:09:18 -03:00
parent d53450b686
commit 6480b90500
10 changed files with 54 additions and 21 deletions

View file

@ -26,7 +26,7 @@ const produto_betha_meio_ambiente = new import_tipagem.ProdutoQuipo({
chave_produto: "betha-meio-ambiente", chave_produto: "betha-meio-ambiente",
titulo: "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.", 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 == "anonimo" ? "" : `/${vinculo}#/admin`}` 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: // Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = { 0 && (module.exports = {

View file

@ -26,7 +26,7 @@ const produto_e_licencie_gov = new import_tipagem.ProdutoQuipo({
chave_produto: "e-licencie-gov", chave_produto: "e-licencie-gov",
titulo: "e-licencie.gov", titulo: "e-licencie.gov",
descricao: "e-licencie.gov: Software de gest\xE3o de processos e dados ambientais.", descricao: "e-licencie.gov: Software de gest\xE3o de processos e dados ambientais.",
url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" ? "" : `/${vinculo}#/admin`}` 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: // Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = { 0 && (module.exports = {

View file

@ -23,6 +23,8 @@ __export(produtos_exports, {
listaProdutos: () => listaProdutos, listaProdutos: () => listaProdutos,
opcoesVinculos: () => import_tipagem.opcoesVinculos, opcoesVinculos: () => import_tipagem.opcoesVinculos,
opcoesVinculosGov: () => import_tipagem.opcoesVinculosGov, 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_betha_meio_ambiente: () => import_betha_meio_ambiente.produto_betha_meio_ambiente,
produto_e_licencie: () => import_e_licencie.produto_e_licencie, produto_e_licencie: () => import_e_licencie.produto_e_licencie,
produto_e_licencie_gov: () => import_e_licencie_gov.produto_e_licencie_gov, produto_e_licencie_gov: () => import_e_licencie_gov.produto_e_licencie_gov,
@ -49,6 +51,8 @@ const listaProdutos = {
listaProdutos, listaProdutos,
opcoesVinculos, opcoesVinculos,
opcoesVinculosGov, opcoesVinculosGov,
opcoesVinculosGovDescricao,
opcoesVinculosGovEnum,
produto_betha_meio_ambiente, produto_betha_meio_ambiente,
produto_e_licencie, produto_e_licencie,
produto_e_licencie_gov, produto_e_licencie_gov,

View file

@ -23,6 +23,8 @@ __export(tipagem_exports, {
chaves_produto: () => chaves_produto, chaves_produto: () => chaves_produto,
opcoesVinculos: () => opcoesVinculos, opcoesVinculos: () => opcoesVinculos,
opcoesVinculosGov: () => opcoesVinculosGov, opcoesVinculosGov: () => opcoesVinculosGov,
opcoesVinculosGovDescricao: () => opcoesVinculosGovDescricao,
opcoesVinculosGovEnum: () => opcoesVinculosGovEnum,
opcoesVinculosSuporte: () => opcoesVinculosSuporte, opcoesVinculosSuporte: () => opcoesVinculosSuporte,
provedoresGov: () => provedoresGov, provedoresGov: () => provedoresGov,
tiposAcesso: () => tiposAcesso, tiposAcesso: () => tiposAcesso,
@ -36,21 +38,28 @@ var chaves_produto = /* @__PURE__ */ ((chaves_produto2) => {
chaves_produto2["e-licencie"] = "e-licencie"; chaves_produto2["e-licencie"] = "e-licencie";
return chaves_produto2; return chaves_produto2;
})(chaves_produto || {}); })(chaves_produto || {});
const opcoesVinculosGov = { var opcoesVinculosGovEnum = /* @__PURE__ */ ((opcoesVinculosGovEnum2) => {
opcoesVinculosGovEnum2["governo"] = "governo";
opcoesVinculosGovEnum2["sociedade"] = "sociedade";
opcoesVinculosGovEnum2["anonimo"] = "anonimo";
return opcoesVinculosGovEnum2;
})(opcoesVinculosGovEnum || {});
const opcoesVinculosGovDescricao = {
governo: "Governo", governo: "Governo",
sociedade: "Sociedade", sociedade: "Sociedade",
anonimo: "An\xF4nimo" anonimo: "An\xF4nimo"
}; };
const opcoesVinculosGov = opcoesVinculosGovDescricao;
const opcoesVinculosSuporte = { const opcoesVinculosSuporte = {
"suporte-1": "Suporte Prim\xE1rio" "suporte-1": "Suporte Prim\xE1rio"
}; };
const opcoesVinculos = { const opcoesVinculos = {
["suporte" /* suporte */]: opcoesVinculosSuporte, ["suporte" /* suporte */]: opcoesVinculosSuporte,
["betha-meio-ambiente" /* betha-meio-ambiente */]: opcoesVinculosGov, ["betha-meio-ambiente" /* betha-meio-ambiente */]: opcoesVinculosGovDescricao,
["e-licencie-gov" /* e-licencie-gov */]: opcoesVinculosGov, ["e-licencie-gov" /* e-licencie-gov */]: opcoesVinculosGovDescricao,
["e-licencie" /* e-licencie */]: {} ["e-licencie" /* e-licencie */]: {}
}; };
const tiposAcesso = opcoesVinculosGov; const tiposAcesso = opcoesVinculosGovDescricao;
const provedoresGov = { const provedoresGov = {
/** Sistema de login da Beta */ /** Sistema de login da Beta */
"betha-sistemas": "Betha Sistemas", "betha-sistemas": "Betha Sistemas",
@ -85,6 +94,8 @@ var versao_usuarios = /* @__PURE__ */ ((versao_usuarios2) => {
chaves_produto, chaves_produto,
opcoesVinculos, opcoesVinculos,
opcoesVinculosGov, opcoesVinculosGov,
opcoesVinculosGovDescricao,
opcoesVinculosGovEnum,
opcoesVinculosSuporte, opcoesVinculosSuporte,
provedoresGov, provedoresGov,
tiposAcesso, tiposAcesso,

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "p-autenticacao-drive", "name": "p-autenticacao-drive",
"version": "1.37.0", "version": "1.38.0",
"description": "", "description": "",
"main": "./src/index.ts", "main": "./src/index.ts",
"exports": { "exports": {

View file

@ -1,4 +1,4 @@
import { type opcoesVinculosGov, ProdutoQuipo } from "./tipagem" import { opcoesVinculosGovEnum, ProdutoQuipo } from "./tipagem"
export const produto_betha_meio_ambiente = new ProdutoQuipo({ export const produto_betha_meio_ambiente = new ProdutoQuipo({
chave_produto: "betha-meio-ambiente", chave_produto: "betha-meio-ambiente",
@ -8,8 +8,6 @@ export const produto_betha_meio_ambiente = new ProdutoQuipo({
url_produto: ({ inquilino, base_url, vinculo }) => url_produto: ({ inquilino, base_url, vinculo }) =>
`${base_url}/${inquilino}${ `${base_url}/${inquilino}${
vinculo == ("anonimo" satisfies keyof typeof opcoesVinculosGov) vinculo == (opcoesVinculosGovEnum.anonimo) ? "" : `/${vinculo}#/admin`
? ""
: `/${vinculo}#/admin`
}`, }`,
}) })

View file

@ -1,4 +1,4 @@
import { type opcoesVinculosGov, ProdutoQuipo } from "./tipagem" import { opcoesVinculosGovEnum, ProdutoQuipo } from "./tipagem"
export const produto_e_licencie_gov = new ProdutoQuipo({ export const produto_e_licencie_gov = new ProdutoQuipo({
chave_produto: "e-licencie-gov", chave_produto: "e-licencie-gov",
titulo: "e-licencie.gov", titulo: "e-licencie.gov",
@ -6,8 +6,6 @@ export const produto_e_licencie_gov = new ProdutoQuipo({
"e-licencie.gov: Software de gestão de processos e dados ambientais.", "e-licencie.gov: Software de gestão de processos e dados ambientais.",
url_produto: ({ inquilino, base_url, vinculo }) => url_produto: ({ inquilino, base_url, vinculo }) =>
`${base_url}/${inquilino}${ `${base_url}/${inquilino}${
vinculo == ("anonimo" satisfies keyof typeof opcoesVinculosGov) vinculo == (opcoesVinculosGovEnum.anonimo) ? "" : `/${vinculo}#/admin`
? ""
: `/${vinculo}#/admin`
}`, }`,
}) })

View file

@ -7,6 +7,8 @@ import {
chaves_produto, chaves_produto,
opcoesVinculos, opcoesVinculos,
opcoesVinculosGov, opcoesVinculosGov,
opcoesVinculosGovDescricao,
opcoesVinculosGovEnum,
Produto, Produto,
provedoresGov, provedoresGov,
versao_usuarios, versao_usuarios,
@ -25,6 +27,8 @@ export {
Produto, Produto,
chaves_produto, chaves_produto,
opcoesVinculosGov, opcoesVinculosGov,
opcoesVinculosGovDescricao,
opcoesVinculosGovEnum,
opcoesVinculos, opcoesVinculos,
provedoresGov, provedoresGov,
produto_betha_meio_ambiente, produto_betha_meio_ambiente,

View file

@ -6,11 +6,25 @@ export enum chaves_produto {
"e-licencie" = "e-licencie", "e-licencie" = "e-licencie",
} }
export const opcoesVinculosGov = { export enum opcoesVinculosGovEnum {
governo = "governo",
sociedade = "sociedade",
anonimo = "anonimo",
}
export const opcoesVinculosGovDescricao: {
[k in opcoesVinculosGovEnum]: string
} = {
governo: "Governo", governo: "Governo",
sociedade: "Sociedade", sociedade: "Sociedade",
anonimo: "Anônimo", anonimo: "Anônimo",
} as const }
/**
* @deprecated Esta função será removida em futuras versões.
* opcoesVinculosGovEnum ou opcoesVinculosGovDescricao
*/
export const opcoesVinculosGov = opcoesVinculosGovDescricao
export const opcoesVinculosSuporte = { export const opcoesVinculosSuporte = {
"suporte-1": "Suporte Primário", "suporte-1": "Suporte Primário",
@ -18,12 +32,16 @@ export const opcoesVinculosSuporte = {
export const opcoesVinculos = { export const opcoesVinculos = {
[chaves_produto.suporte]: opcoesVinculosSuporte, [chaves_produto.suporte]: opcoesVinculosSuporte,
[chaves_produto["betha-meio-ambiente"]]: opcoesVinculosGov, [chaves_produto["betha-meio-ambiente"]]: opcoesVinculosGovDescricao,
[chaves_produto["e-licencie-gov"]]: opcoesVinculosGov, [chaves_produto["e-licencie-gov"]]: opcoesVinculosGovDescricao,
[chaves_produto["e-licencie"]]: {}, [chaves_produto["e-licencie"]]: {},
} as const } as const
export const tiposAcesso = opcoesVinculosGov /**
* @deprecated Esta função será removida em futuras versões.
* opcoesVinculosGovEnum ou opcoesVinculosGovDescricao
*/
export const tiposAcesso = opcoesVinculosGovDescricao
export const provedoresGov = { export const provedoresGov = {
/** Sistema de login da Beta */ /** Sistema de login da Beta */