add consultaUsuariosexterno

This commit is contained in:
Luiz H. R. Silva 2024-06-05 19:40:12 -03:00
parent 07a656a2b4
commit 9491278d6c
62 changed files with 489 additions and 200 deletions

View file

@ -1,25 +0,0 @@
import { type tipoResposta } from "p-respostas";
type tipoPostValidarTokem = {
token: string;
};
type tipoPostCodigoContaSite = {
site: string;
};
/** todas as rotas de comunicação com autenticador partem dessa variável */
export declare const pAutenticacao: {
validarToken: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: tipoPostValidarTokem;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostValidarTokem) => Promise<tipoResposta<any>>;
}) => Promise<"valido" | "erro">;
urlAutenticacao: (ambiente: "desenvolvimento" | "producao") => string;
codigoContaSite: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: tipoPostCodigoContaSite;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostCodigoContaSite) => Promise<tipoResposta<string>>;
}) => Promise<tipoResposta<string>>;
};
export {};
//# sourceMappingURL=autenticacao.d.ts.map

View file

@ -1 +0,0 @@
{"version":3,"file":"autenticacao.d.ts","sourceRoot":"","sources":["../src/autenticacao.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/D,KAAK,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAC7C,KAAK,uBAAuB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAgE/C,2EAA2E;AAC3E,eAAO,MAAM,aAAa;;kBAlDd,iBAAiB,GAAG,UAAU;cAClC,oBAAoB;QAC1B,mCAAmC;sBAE5B,MAAM,QACL,oBAAoB,KACvB,QAAQ,aAAa,GAAG,CAAC,CAAC;UAC7B,QAAQ,QAAQ,GAAG,MAAM,CAAC;gCApBK,iBAAiB,GAAG,UAAU;;kBAyCrD,iBAAiB,GAAG,UAAU;cAClC,uBAAuB;QAC7B,mCAAmC;sBAE5B,MAAM,QACL,uBAAuB,KAC1B,QAAQ,aAAa,MAAM,CAAC,CAAC;UAChC,QAAQ,aAAa,MAAM,CAAC,CAAC;CAmBhC,CAAA"}

View file

@ -1 +0,0 @@
{"version":3,"file":"autenticacao.js","sourceRoot":"","sources":["../src/autenticacao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+D;AAI/D,IAAM,eAAe,GAAG,UAAC,QAAwC;IAC/D,OAAA,UACE,QAAQ,IAAI,UAAU;QACpB,CAAC,CAAC,8BAA8B;QAChC,CAAC,CAAC,uBAAuB,kBACd;AAJf,CAIe,CAAA;AAEjB,+BAA+B;AAC/B,IAAM,YAAY,GAAG,UAAO,EAY3B;QAXC,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,MAAM,YAAA;;;;;;oBAUA,GAAG,GAAG,UAAG,eAAe,CAAC,QAAQ,CAAC,uBAAoB,CAAA;;;;oBAGzC,qBAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC;6BACrC,IAAI,CAAC,UAAC,QAAQ;4BACb,OAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAE,QAAkB,CAAC,CAAC,CAAE,MAAgB;wBAAzD,CAAyD,CAC1D;6BACA,KAAK,CAAC,cAAM,OAAA,MAAe,EAAf,CAAe,CAAC,EAAA;;oBAJzB,QAAQ,GAAG,SAIc;oBAE/B,sBAAO,QAAQ,EAAA;;;oBAEf,sBAAO,MAAM,EAAA;;;;;CAEhB,CAAA;AAED,IAAM,eAAe,GAAG,UAAO,EAY9B;QAXC,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,MAAM,YAAA;;;;;;oBAUA,GAAG,GAAG,UAAG,eAAe,CAAC,QAAQ,CAAC,gCAA6B,CAAA;;;;oBAGtD,qBAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,UAAC,CAAC;4BAC3C,OAAA,4BAAc,CAAC,IAAI,CAAC,8CAAkC,CAAC,CAAE,CAAC;wBAA1D,CAA0D,CAC3D,EAAA;;oBAFK,IAAI,GAAG,SAEZ;oBAED,sBAAO,IAAI,EAAA;;;oBAEX,sBAAO,4BAAc,CAAC,IAAI,CAAC,8CAAkC,GAAC,CAAE,CAAC,EAAA;;;;;CAEpE,CAAA;AAED,2EAA2E;AAC9D,QAAA,aAAa,GAAG;IAC3B,YAAY,cAAA;IACZ,eAAe,iBAAA;IACf,eAAe,iBAAA;CAChB,CAAA"}

View file

@ -0,0 +1,12 @@
import { type tipoResposta } from "p-respostas";
type tipoPostCodigoContaSite = {
site: string;
};
export declare const codigoContaSite: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: tipoPostCodigoContaSite;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostCodigoContaSite) => Promise<tipoResposta<string>>;
}) => Promise<tipoResposta<string>>;
export {};
//# sourceMappingURL=_codigoContaSite.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_codigoContaSite.d.ts","sourceRoot":"","sources":["../../src/autenticacao/_codigoContaSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/D,KAAK,uBAAuB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/C,eAAO,MAAM,eAAe;cAKhB,iBAAiB,GAAG,UAAU;UAClC,uBAAuB;IAC7B,mCAAmC;kBAE5B,MAAM,QACL,uBAAuB,KAC1B,QAAQ,aAAa,MAAM,CAAC,CAAC;MAChC,QAAQ,aAAa,MAAM,CAAC,CAY/B,CAAA"}

View file

@ -0,0 +1,68 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.codigoContaSite = void 0;
var p_respostas_1 = require("p-respostas");
var _urlAutenticacao_1 = require("./_urlAutenticacao");
var codigoContaSite = function (_a) {
var ambiente = _a.ambiente, post = _a.post, buscar = _a.buscar;
return __awaiter(void 0, void 0, void 0, function () {
var url, resp, e_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/codigo_prefeitura_site");
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, buscar(url, post).catch(function (e) {
return p_respostas_1.respostaComuns.erro("erro ao buscar c\u00F3digo do site: ".concat(e));
})];
case 2:
resp = _b.sent();
return [2 /*return*/, resp];
case 3:
e_1 = _b.sent();
return [2 /*return*/, p_respostas_1.respostaComuns.erro("erro ao buscar c\u00F3digo do site: ".concat(e_1))];
case 4: return [2 /*return*/];
}
});
});
};
exports.codigoContaSite = codigoContaSite;
//# sourceMappingURL=_codigoContaSite.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_codigoContaSite.js","sourceRoot":"","sources":["../../src/autenticacao/_codigoContaSite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,uDAAoD;AAG7C,IAAM,eAAe,GAAG,UAAO,EAYrC;QAXC,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,MAAM,YAAA;;;;;;oBAUA,GAAG,GAAG,UAAG,IAAA,kCAAe,EAAC,QAAQ,CAAC,gCAA6B,CAAA;;;;oBAGtD,qBAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,UAAC,CAAC;4BAC3C,OAAA,4BAAc,CAAC,IAAI,CAAC,8CAAkC,CAAC,CAAE,CAAC;wBAA1D,CAA0D,CAC3D,EAAA;;oBAFK,IAAI,GAAG,SAEZ;oBAED,sBAAO,IAAI,EAAA;;;oBAEX,sBAAO,4BAAc,CAAC,IAAI,CAAC,8CAAkC,GAAC,CAAE,CAAC,EAAA;;;;;CAEpE,CAAA;AAxBY,QAAA,eAAe,mBAwB3B"}

View file

@ -0,0 +1,16 @@
import { type tipoResposta } from "p-respostas";
export type tipoUsuarioExterno = {
nome: string;
email: string;
telefone: string;
vinculo: string;
codigo_produto: string;
chave_produto: string;
};
export declare const consultaUsuariosexterno: ({ token_produto, ambiente, codigo_produto, chave_produto, }: {
ambiente: "desenvolvimento" | "producao";
token_produto: string;
codigo_produto: string;
chave_produto: string;
}) => Promise<tipoResposta<tipoUsuarioExterno[]>>;
//# sourceMappingURL=_consultaUsuariosexterno.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_consultaUsuariosexterno.d.ts","sourceRoot":"","sources":["../../src/autenticacao/_consultaUsuariosexterno.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,uBAAuB;cAMxB,iBAAiB,GAAG,UAAU;mBACzB,MAAM;oBACL,MAAM;mBACP,MAAM;MACnB,QAAQ,aAAa,kBAAkB,EAAE,CAAC,CAG7C,CAAA"}

View file

@ -0,0 +1,51 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.consultaUsuariosexterno = void 0;
var p_respostas_1 = require("p-respostas");
var consultaUsuariosexterno = function (_a) {
var token_produto = _a.token_produto, ambiente = _a.ambiente, codigo_produto = _a.codigo_produto, chave_produto = _a.chave_produto;
return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_b) {
console.log(token_produto, ambiente, codigo_produto, chave_produto);
return [2 /*return*/, p_respostas_1.respostaComuns.valor([])];
});
});
};
exports.consultaUsuariosexterno = consultaUsuariosexterno;
//# sourceMappingURL=_consultaUsuariosexterno.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_consultaUsuariosexterno.js","sourceRoot":"","sources":["../../src/autenticacao/_consultaUsuariosexterno.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+D;AAWxD,IAAM,uBAAuB,GAAG,UAAO,EAU7C;QATC,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,aAAa,mBAAA;;;YAOb,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,CAAC,CAAA;YACnE,sBAAO,4BAAc,CAAC,KAAK,CAAC,EAAE,CAAC,EAAA;;;CAChC,CAAA;AAbY,QAAA,uBAAuB,2BAanC"}

View file

@ -0,0 +1,2 @@
export declare const urlAutenticacao: (ambiente: "desenvolvimento" | "producao") => string;
//# sourceMappingURL=_urlAutenticacao.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_urlAutenticacao.d.ts","sourceRoot":"","sources":["../../src/autenticacao/_urlAutenticacao.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,aAAc,iBAAiB,GAAG,UAAU,WAKvD,CAAA"}

View file

@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.urlAutenticacao = void 0;
var urlAutenticacao = function (ambiente) {
return "".concat(ambiente == "producao"
? "https://carro-de-boi.idz.one"
: "http://localhost:5030", "/autenticacao");
};
exports.urlAutenticacao = urlAutenticacao;
//# sourceMappingURL=_urlAutenticacao.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_urlAutenticacao.js","sourceRoot":"","sources":["../../src/autenticacao/_urlAutenticacao.ts"],"names":[],"mappings":";;;AAAO,IAAM,eAAe,GAAG,UAAC,QAAwC;IACtE,OAAA,UACE,QAAQ,IAAI,UAAU;QACpB,CAAC,CAAC,8BAA8B;QAChC,CAAC,CAAC,uBAAuB,kBACd;AAJf,CAIe,CAAA;AALJ,QAAA,eAAe,mBAKX"}

View file

@ -0,0 +1,13 @@
import type { tipoResposta } from "p-respostas";
type tipoPostValidarTokem = {
token: string;
};
/** faz a validação do token */
export declare const validarToken: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: tipoPostValidarTokem;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostValidarTokem) => Promise<tipoResposta<any>>;
}) => Promise<"valido" | "erro">;
export {};
//# sourceMappingURL=_validarToken.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_validarToken.d.ts","sourceRoot":"","sources":["../../src/autenticacao/_validarToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,KAAK,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C,+BAA+B;AAC/B,eAAO,MAAM,YAAY;cAKb,iBAAiB,GAAG,UAAU;UAClC,oBAAoB;IAC1B,mCAAmC;kBAE5B,MAAM,QACL,oBAAoB,KACvB,QAAQ,aAAa,GAAG,CAAC,CAAC;MAC7B,QAAQ,QAAQ,GAAG,MAAM,CAc5B,CAAA"}

View file

@ -36,13 +36,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.pAutenticacao = void 0;
var p_respostas_1 = require("p-respostas");
var urlAutenticacao = function (ambiente) {
return "".concat(ambiente == "producao"
? "https://carro-de-boi.idz.one"
: "http://localhost:5030", "/autenticacao");
};
exports.validarToken = void 0;
var _urlAutenticacao_1 = require("./_urlAutenticacao");
/** faz a validação do token */
var validarToken = function (_a) {
var ambiente = _a.ambiente, post = _a.post, buscar = _a.buscar;
@ -51,7 +46,7 @@ var validarToken = function (_a) {
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
url = "".concat(urlAutenticacao(ambiente), "/api/validar_token");
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/validar_token");
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
@ -71,35 +66,5 @@ var validarToken = function (_a) {
});
});
};
var codigoContaSite = function (_a) {
var ambiente = _a.ambiente, post = _a.post, buscar = _a.buscar;
return __awaiter(void 0, void 0, void 0, function () {
var url, resp, e_2;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
url = "".concat(urlAutenticacao(ambiente), "/api/codigo_prefeitura_site");
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, buscar(url, post).catch(function (e) {
return p_respostas_1.respostaComuns.erro("erro ao buscar c\u00F3digo do site: ".concat(e));
})];
case 2:
resp = _b.sent();
return [2 /*return*/, resp];
case 3:
e_2 = _b.sent();
return [2 /*return*/, p_respostas_1.respostaComuns.erro("erro ao buscar c\u00F3digo do site: ".concat(e_2))];
case 4: return [2 /*return*/];
}
});
});
};
/** todas as rotas de comunicação com autenticador partem dessa variável */
exports.pAutenticacao = {
validarToken: validarToken,
urlAutenticacao: urlAutenticacao,
codigoContaSite: codigoContaSite,
};
//# sourceMappingURL=autenticacao.js.map
exports.validarToken = validarToken;
//# sourceMappingURL=_validarToken.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"_validarToken.js","sourceRoot":"","sources":["../../src/autenticacao/_validarToken.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uDAAoD;AAGpD,+BAA+B;AACxB,IAAM,YAAY,GAAG,UAAO,EAYlC;QAXC,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,MAAM,YAAA;;;;;;oBAUA,GAAG,GAAG,UAAG,IAAA,kCAAe,EAAC,QAAQ,CAAC,uBAAoB,CAAA;;;;oBAGzC,qBAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC;6BACrC,IAAI,CAAC,UAAC,QAAQ;4BACb,OAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAE,QAAkB,CAAC,CAAC,CAAE,MAAgB;wBAAzD,CAAyD,CAC1D;6BACA,KAAK,CAAC,cAAM,OAAA,MAAe,EAAf,CAAe,CAAC,EAAA;;oBAJzB,QAAQ,GAAG,SAIc;oBAE/B,sBAAO,QAAQ,EAAA;;;oBAEf,sBAAO,MAAM,EAAA;;;;;CAEhB,CAAA;AA1BY,QAAA,YAAY,gBA0BxB"}

30
dist-require/autenticacao/index.d.ts vendored Normal file
View file

@ -0,0 +1,30 @@
export type { tipoUsuarioExterno } from "./_consultaUsuariosexterno";
/** todas as rotas de comunicação com autenticador partem dessa variável */
export declare const pAutenticacao: {
validarToken: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: {
token: string;
};
buscar: (url: string, post: {
token: string;
}) => Promise<import("p-respostas").tipoResposta<any>>;
}) => Promise<"valido" | "erro">;
urlAutenticacao: (ambiente: "desenvolvimento" | "producao") => string;
codigoContaSite: ({ ambiente, post, buscar, }: {
ambiente: "desenvolvimento" | "producao";
post: {
site: string;
};
buscar: (url: string, post: {
site: string;
}) => Promise<import("p-respostas").tipoResposta<string>>;
}) => Promise<import("p-respostas").tipoResposta<string>>;
consultaUsuariosexterno: ({ token_produto, ambiente, codigo_produto, chave_produto, }: {
ambiente: "desenvolvimento" | "producao";
token_produto: string;
codigo_produto: string;
chave_produto: string;
}) => Promise<import("p-respostas").tipoResposta<import("./_consultaUsuariosexterno").tipoUsuarioExterno[]>>;
};
//# sourceMappingURL=index.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autenticacao/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,2EAA2E;AAC3E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzB,CAAA"}

View file

@ -0,0 +1,15 @@
"use strict";
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 _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,
};
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/autenticacao/index.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,uEAAoE;AACpE,uDAAoD;AACpD,iDAA8C;AAI9C,2EAA2E;AAC9D,QAAA,aAAa,GAAG;IAC3B,YAAY,8BAAA;IACZ,eAAe,oCAAA;IACf,eAAe,oCAAA;IACf,uBAAuB,oDAAA;CACxB,CAAA"}

View file

@ -1,3 +1,3 @@
export * from "./tokenQuipo";
export * from "./autenticacao";
export * from "./autenticacao/_codigoContaSite";
//# sourceMappingURL=index.d.ts.map

View file

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iCAAiC,CAAA"}

View file

@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./tokenQuipo"), exports);
__exportStar(require("./autenticacao"), exports);
__exportStar(require("./autenticacao/_codigoContaSite"), exports);
//# sourceMappingURL=index.js.map

View file

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,iDAA8B"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,kEAA+C"}