.
This commit is contained in:
parent
681141a8d8
commit
a1e543cfb8
12 changed files with 87 additions and 46 deletions
|
|
@ -7,7 +7,10 @@ export type tipoUsuarioExterno = {
|
|||
codigo_conta: string;
|
||||
chave_produto: string;
|
||||
};
|
||||
export declare const consultaUsuariosexterno: ({ token_produto, ambiente, }: {
|
||||
export declare const usuarios_quipo_governo: ({ token_produto, ambiente, buscar, }: {
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
token_produto: string;
|
||||
buscar: (url: string, headers: {
|
||||
[k: string]: string;
|
||||
}) => Promise<tipoResposta<tipoUsuarioExterno[]>>;
|
||||
}) => Promise<tipoResposta<tipoUsuarioExterno[]>>;
|
||||
|
|
@ -36,15 +36,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.consultaUsuariosexterno = void 0;
|
||||
exports.usuarios_quipo_governo = void 0;
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var consultaUsuariosexterno = function (_a) {
|
||||
var token_produto = _a.token_produto, ambiente = _a.ambiente;
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var usuarios_quipo_governo = function (_a) {
|
||||
var token_produto = _a.token_produto, ambiente = _a.ambiente, buscar = _a.buscar;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, headers;
|
||||
return __generator(this, function (_b) {
|
||||
console.log(token_produto, ambiente);
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.valor([])];
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/usuarios_quipo_governo");
|
||||
headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return [2 /*return*/, buscar(url, headers).catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("erro ao buscar usu\u00E1rios quipo governo: ".concat(e));
|
||||
})];
|
||||
});
|
||||
});
|
||||
};
|
||||
exports.consultaUsuariosexterno = consultaUsuariosexterno;
|
||||
exports.usuarios_quipo_governo = usuarios_quipo_governo;
|
||||
10
dist-require/autenticacao/index.d.ts
vendored
10
dist-require/autenticacao/index.d.ts
vendored
|
|
@ -1,4 +1,5 @@
|
|||
export type { tipoUsuarioExterno } from "./_consultaUsuariosexterno";
|
||||
import { type tipoUsuarioExterno } from "./_usuarios_quipo_governo";
|
||||
export type { tipoUsuarioExterno };
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
export declare const pAutenticacao: {
|
||||
validarToken: ({ ambiente, post, buscar, }: {
|
||||
|
|
@ -20,8 +21,11 @@ export declare const pAutenticacao: {
|
|||
site: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
consultaUsuariosexterno: ({ token_produto, ambiente, }: {
|
||||
usuarios_quipo_governo: ({ token_produto, ambiente, buscar, }: {
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
token_produto: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<import("./_consultaUsuariosexterno").tipoUsuarioExterno[]>>;
|
||||
buscar: (url: string, headers: {
|
||||
[k: string]: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<tipoUsuarioExterno[]>>;
|
||||
}) => Promise<import("p-respostas").tipoResposta<tipoUsuarioExterno[]>>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pAutenticacao = void 0;
|
||||
var _codigoContaSite_1 = require("./_codigoContaSite");
|
||||
var _consultaUsuariosexterno_1 = require("./_consultaUsuariosexterno");
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var _usuarios_quipo_governo_1 = require("./_usuarios_quipo_governo");
|
||||
var _validarToken_1 = require("./_validarToken");
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
exports.pAutenticacao = {
|
||||
validarToken: _validarToken_1.validarToken,
|
||||
urlAutenticacao: _urlAutenticacao_1.urlAutenticacao,
|
||||
codigoContaSite: _codigoContaSite_1.codigoContaSite,
|
||||
consultaUsuariosexterno: _consultaUsuariosexterno_1.consultaUsuariosexterno,
|
||||
usuarios_quipo_governo: _usuarios_quipo_governo_1.usuarios_quipo_governo,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue