pacote
This commit is contained in:
parent
cd1eb0ae39
commit
43f9b8ef94
5 changed files with 485 additions and 260 deletions
213
dist-front/index.d.mts
Normal file
213
dist-front/index.d.mts
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
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, url_api_autenticacao, }: {
|
||||
url_api_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: ({ 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<p_respostas.tipoResposta<string>>;
|
||||
usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: {
|
||||
url_api_autenticacao: string;
|
||||
token_produto: string;
|
||||
inquilino: string;
|
||||
}) => Promise<p_respostas.tipoResposta<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<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: ({ url_api_autenticacao, }: {
|
||||
url_api_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, url_api_autenticacao, desativarCache, }: {
|
||||
url_api_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;
|
||||
};
|
||||
|
||||
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, type tipoRetornoListarPrefeitrua, type tipoUsuarioExterno, type tipoUsuarioTokenAutneticacao, type tipo_retorno_vinculo_listas, type tipo_usuarios__listar_parametros, type tipo_usuarios__listar_retorno, tx_listar_prefeituras, tx_usuarios__listar, tx_vinculos__listar, versao_usuarios };
|
||||
Loading…
Add table
Add a link
Reference in a new issue