ajuste de libs
This commit is contained in:
parent
caf3f59453
commit
547f693652
22 changed files with 236 additions and 306 deletions
|
|
@ -43,36 +43,34 @@ exports.codigoContaSite = void 0;
|
|||
var p_respostas_1 = require("p-respostas");
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var codigoContaSite = function (_a) {
|
||||
var ambiente = _a.ambiente, post = _a.post;
|
||||
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*/, (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
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*/];
|
||||
}
|
||||
});
|
||||
var codigoContaSite = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, resp, e_1;
|
||||
var ambiente = _b.ambiente, post = _b.post;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/codigo_prefeitura_site");
|
||||
_c.label = 1;
|
||||
case 1:
|
||||
_c.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
case 2:
|
||||
resp = _c.sent();
|
||||
return [2 /*return*/, resp];
|
||||
case 3:
|
||||
e_1 = _c.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;
|
||||
|
|
|
|||
|
|
@ -43,26 +43,24 @@ exports.usuarios_quipo_governo = void 0;
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var usuarios_quipo_governo = function (_a) {
|
||||
var token_produto = _a.token_produto, ambiente = _a.ambiente;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, headers;
|
||||
return __generator(this, function (_b) {
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/usuarios_quipo_governo");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return [2 /*return*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao buscar usu\u00E1rios quipo governo ".concat(e.message));
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
});
|
||||
var usuarios_quipo_governo = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, headers;
|
||||
var token_produto = _b.token_produto, ambiente = _b.ambiente;
|
||||
return __generator(this, function (_c) {
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/usuarios_quipo_governo");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return [2 /*return*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao buscar usu\u00E1rios quipo governo ".concat(e.message));
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
});
|
||||
};
|
||||
}); };
|
||||
exports.usuarios_quipo_governo = usuarios_quipo_governo;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ export declare const usuarios_quipo_vincular: ({ token_produto, ambiente, conta,
|
|||
token_produto: string;
|
||||
conta: string;
|
||||
vinculo: string;
|
||||
codigo_usuario?: string | undefined;
|
||||
codigo_usuario?: string;
|
||||
email: string;
|
||||
}) => Promise<tipoResposta<string>>;
|
||||
|
|
|
|||
|
|
@ -43,41 +43,39 @@ exports.usuarios_quipo_vincular = void 0;
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var usuarios_quipo_vincular = function (_a) {
|
||||
var token_produto = _a.token_produto, ambiente = _a.ambiente, conta = _a.conta, vinculo = _a.vinculo, codigo_usuario = _a.codigo_usuario, email = _a.email;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, headers, parametros;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/vinculos__criar");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
parametros = {
|
||||
vinculos: { codigo_conta: conta, codigo_usuario: codigo_usuario, vinculo: vinculo },
|
||||
email: email,
|
||||
};
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
body: JSON.stringify(parametros),
|
||||
method: "POST",
|
||||
})
|
||||
.then(function (r) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, r.json()];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
}); }); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao criar vinculo de usuario ".concat(e.message));
|
||||
})];
|
||||
case 1: return [2 /*return*/, _b.sent()];
|
||||
}
|
||||
});
|
||||
var usuarios_quipo_vincular = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, headers, parametros;
|
||||
var token_produto = _b.token_produto, ambiente = _b.ambiente, conta = _b.conta, vinculo = _b.vinculo, codigo_usuario = _b.codigo_usuario, email = _b.email;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/vinculos__criar");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
parametros = {
|
||||
vinculos: { codigo_conta: conta, codigo_usuario: codigo_usuario, vinculo: vinculo },
|
||||
email: email,
|
||||
};
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
body: JSON.stringify(parametros),
|
||||
method: "POST",
|
||||
})
|
||||
.then(function (r) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, r.json()];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
}); }); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao criar vinculo de usuario ".concat(e.message));
|
||||
})];
|
||||
case 1: return [2 /*return*/, _c.sent()];
|
||||
}
|
||||
});
|
||||
};
|
||||
}); };
|
||||
exports.usuarios_quipo_vincular = usuarios_quipo_vincular;
|
||||
|
|
|
|||
|
|
@ -43,37 +43,35 @@ exports.validarToken = void 0;
|
|||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
/** faz a validação do token */
|
||||
var validarToken = function (_a) {
|
||||
var ambiente = _a.ambiente, post = _a.post;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, resposta, e_1;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/validar_token");
|
||||
_b.label = 1;
|
||||
case 1:
|
||||
_b.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (r) { return r; })
|
||||
.then(function (resposta) {
|
||||
return resposta.eCerto ? "valido" : "erro";
|
||||
})
|
||||
.catch(function () { return "erro"; })];
|
||||
case 2:
|
||||
resposta = _b.sent();
|
||||
return [2 /*return*/, resposta];
|
||||
case 3:
|
||||
e_1 = _b.sent();
|
||||
return [2 /*return*/, "erro"];
|
||||
case 4: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
var validarToken = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, resposta, e_1;
|
||||
var ambiente = _b.ambiente, post = _b.post;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/validar_token");
|
||||
_c.label = 1;
|
||||
case 1:
|
||||
_c.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (r) { return r; })
|
||||
.then(function (resposta) {
|
||||
return resposta.eCerto ? "valido" : "erro";
|
||||
})
|
||||
.catch(function () { return "erro"; })];
|
||||
case 2:
|
||||
resposta = _c.sent();
|
||||
return [2 /*return*/, resposta];
|
||||
case 3:
|
||||
e_1 = _c.sent();
|
||||
return [2 /*return*/, "erro"];
|
||||
case 4: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
}); };
|
||||
exports.validarToken = validarToken;
|
||||
|
|
|
|||
13
dist-require/autenticacao/index.d.ts
vendored
13
dist-require/autenticacao/index.d.ts
vendored
|
|
@ -3,29 +3,28 @@ export type { tipoUsuarioExterno };
|
|||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
export declare const pAutenticacao: {
|
||||
validarToken: ({ ambiente, post, }: {
|
||||
/** todas as rotas de comunicação com autenticador partem dessa variável */
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
ambiente: import("zod").TypeOf<typeof import("../ts/ambiente").zAmbiente>;
|
||||
post: {
|
||||
token: string;
|
||||
};
|
||||
}) => Promise<"valido" | "erro">;
|
||||
urlAutenticacao: (ambiente: "desenvolvimento" | "producao") => string;
|
||||
urlAutenticacao: (ambiente: import("zod").TypeOf<typeof import("../ts/ambiente").zAmbiente>) => string;
|
||||
codigoContaSite: ({ ambiente, post, }: {
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
ambiente: import("zod").TypeOf<typeof import("../ts/ambiente").zAmbiente>;
|
||||
post: {
|
||||
site: string;
|
||||
};
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
usuarios_quipo_governo: ({ token_produto, ambiente, }: {
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
ambiente: import("zod").TypeOf<typeof import("../ts/ambiente").zAmbiente>;
|
||||
token_produto: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<tipoUsuarioExterno[]>>;
|
||||
usuarios_quipo_vincular: ({ token_produto, ambiente, conta, vinculo, codigo_usuario, email, }: {
|
||||
ambiente: "desenvolvimento" | "producao";
|
||||
ambiente: import("zod").TypeOf<typeof import("../ts/ambiente").zAmbiente>;
|
||||
token_produto: string;
|
||||
conta: string;
|
||||
vinculo: string;
|
||||
codigo_usuario?: string | undefined;
|
||||
codigo_usuario?: string;
|
||||
email: string;
|
||||
}) => Promise<import("p-respostas").tipoResposta<string>>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,39 +51,37 @@ exports.zp_deletar_registros = zod_1.z.object({
|
|||
});
|
||||
var deletar_registros = function (_a) {
|
||||
var conta = _a.conta, produto = _a.produto, emDesenvolvimento = _a.emDesenvolvimento;
|
||||
return function (_a) {
|
||||
var codigos = _a.codigos, tabela = _a.tabela;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, variaveis_1.baseUrlPilao)(emDesenvolvimento)).concat(variaveis_1.PREFIXO, "/").concat(Object.keys({ deletar_registros: exports.deletar_registros })[0], "/").concat(produto, "/").concat(conta));
|
||||
tamanhoBlocos = 1000;
|
||||
_b.label = 1;
|
||||
case 1:
|
||||
if (!(codigos.length > 0)) return [3 /*break*/, 3];
|
||||
bloco = codigos.splice(0, tamanhoBlocos);
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tabela: tabela, codigos: bloco }),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
case 2:
|
||||
resp = _b.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
});
|
||||
return function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
var codigos = _b.codigos, tabela = _b.tabela;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, variaveis_1.baseUrlPilao)(emDesenvolvimento)).concat(variaveis_1.PREFIXO, "/").concat(Object.keys({ deletar_registros: exports.deletar_registros })[0], "/").concat(produto, "/").concat(conta));
|
||||
tamanhoBlocos = 1000;
|
||||
_c.label = 1;
|
||||
case 1:
|
||||
if (!(codigos.length > 0)) return [3 /*break*/, 3];
|
||||
bloco = codigos.splice(0, tamanhoBlocos);
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tabela: tabela, codigos: bloco }),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
case 2:
|
||||
resp = _c.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
});
|
||||
};
|
||||
}); };
|
||||
};
|
||||
exports.deletar_registros = deletar_registros;
|
||||
|
|
|
|||
|
|
@ -77,46 +77,44 @@ exports.zp_enviar_registros = zod_1.z.object({
|
|||
});
|
||||
var enviar_registros = function (_a) {
|
||||
var conta = _a.conta, produto = _a.produto, emDesenvolvimento = _a.emDesenvolvimento;
|
||||
return function (_a) {
|
||||
var registros = _a.registros, tabela = _a.tabela;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, variaveis_1.baseUrlPilao)(emDesenvolvimento)).concat(variaveis_1.PREFIXO, "/").concat(Object.keys({ enviar_registros: exports.enviar_registros })[0], "/").concat(produto, "/").concat(conta));
|
||||
tamanhoBlocos = 1000;
|
||||
_b.label = 1;
|
||||
case 1:
|
||||
if (!(registros.length > 0)) return [3 /*break*/, 3];
|
||||
bloco = registros
|
||||
.splice(0, tamanhoBlocos)
|
||||
.map(function (r) {
|
||||
return Object.fromEntries(Object.entries(r).map(function (_a) {
|
||||
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
||||
return [k, v === undefined ? null : v];
|
||||
}));
|
||||
});
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tabela: tabela, registros: bloco }),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
case 2:
|
||||
resp = _b.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
});
|
||||
return function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
var registros = _b.registros, tabela = _b.tabela;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, variaveis_1.baseUrlPilao)(emDesenvolvimento)).concat(variaveis_1.PREFIXO, "/").concat(Object.keys({ enviar_registros: exports.enviar_registros })[0], "/").concat(produto, "/").concat(conta));
|
||||
tamanhoBlocos = 1000;
|
||||
_c.label = 1;
|
||||
case 1:
|
||||
if (!(registros.length > 0)) return [3 /*break*/, 3];
|
||||
bloco = registros
|
||||
.splice(0, tamanhoBlocos)
|
||||
.map(function (r) {
|
||||
return Object.fromEntries(Object.entries(r).map(function (_a) {
|
||||
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
||||
return [k, v === undefined ? null : v];
|
||||
}));
|
||||
});
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tabela: tabela, registros: bloco }),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message]);
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
case 2:
|
||||
resp = _c.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
});
|
||||
};
|
||||
}); };
|
||||
};
|
||||
exports.enviar_registros = enviar_registros;
|
||||
|
|
|
|||
46
dist-require/pilao-de-dados/index.d.ts
vendored
46
dist-require/pilao-de-dados/index.d.ts
vendored
|
|
@ -1,4 +1,7 @@
|
|||
import { tiposSeriesAgregacoes } from "./variaveis";
|
||||
import { zp_deletar_registros } from "./_deletar_registros";
|
||||
import { zp_enviar_registros } from "./_enviar_registros";
|
||||
import { tiposSeriesAgregacoes, zp_produto_conta } from "./variaveis";
|
||||
import { zp_serie_registrar } from "./_serie_consultar";
|
||||
export { tiposSeriesAgregacoes };
|
||||
export declare const pPilao: {
|
||||
zp_registrar_base_dados: import("zod").ZodObject<{
|
||||
|
|
@ -26,17 +29,7 @@ export declare const pPilao: {
|
|||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
|
||||
}[];
|
||||
}>;
|
||||
enviar_registros: ({ conta, produto, emDesenvolvimento }: {
|
||||
conta: string;
|
||||
produto: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}) => ({ registros, tabela, }: {
|
||||
tabela: string;
|
||||
registros: Record<string, {
|
||||
valor?: any;
|
||||
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
|
||||
}>[];
|
||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
enviar_registros: ({ conta, produto, emDesenvolvimento }: import("zod").TypeOf<typeof zp_produto_conta>) => ({ registros, tabela, }: import("zod").TypeOf<typeof zp_enviar_registros>) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
zp_enviar_registros: import("zod").ZodObject<{
|
||||
tabela: import("zod").ZodString;
|
||||
registros: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
||||
|
|
@ -78,25 +71,11 @@ export declare const pPilao: {
|
|||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
}>;
|
||||
serie_consultar: (cliente: {
|
||||
conta: string;
|
||||
produto: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}) => (parametros: {
|
||||
tabela: string;
|
||||
colanuEixoX: string;
|
||||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
}) => {
|
||||
serie_consultar: (cliente: import("zod").TypeOf<typeof zp_produto_conta>) => (parametros: import("zod").TypeOf<typeof zp_serie_registrar>) => {
|
||||
dados: () => Promise<import("p-respostas").tipoResposta<{
|
||||
registros: any[];
|
||||
legenda: string;
|
||||
serie: {
|
||||
tabela: string;
|
||||
colanuEixoX: string;
|
||||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
};
|
||||
serie: import("zod").TypeOf<typeof zp_serie_registrar>;
|
||||
}>>;
|
||||
url: () => string;
|
||||
};
|
||||
|
|
@ -113,15 +92,8 @@ export declare const pPilao: {
|
|||
produto: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}>;
|
||||
validarZ: <T>(zodType: import("zod").ZodType<T, any, T>, objeto: any, mensagem: string) => import("p-respostas").tipoRespostaErro | import("p-respostas").tipoRespostaSucesso<T>;
|
||||
deletar_registros: ({ conta, produto, emDesenvolvimento }: {
|
||||
conta: string;
|
||||
produto: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}) => ({ codigos, tabela, }: {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
validarZ: <T>(zodType: import("zod").ZodType<T, any>, objeto: any, mensagem: string) => import("p-respostas").tipoRespostaErro | import("p-respostas").tipoRespostaSucesso<T>;
|
||||
deletar_registros: ({ conta, produto, emDesenvolvimento }: import("zod").TypeOf<typeof zp_produto_conta>) => ({ codigos, tabela, }: import("zod").TypeOf<typeof zp_deletar_registros>) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
zp_deletar_registros: import("zod").ZodObject<{
|
||||
tabela: import("zod").ZodString;
|
||||
codigos: import("zod").ZodArray<import("zod").ZodString, "many">;
|
||||
|
|
|
|||
2
dist-require/pilao-de-dados/variaveis.d.ts
vendored
2
dist-require/pilao-de-dados/variaveis.d.ts
vendored
|
|
@ -1,7 +1,7 @@
|
|||
import { z } from "zod";
|
||||
export declare const zAmbiente: z.ZodEnum<["desenvolvimento", "producao"]>;
|
||||
export declare const PREFIXO = "/pilao-de-dados";
|
||||
export declare const validarZ: <T>(zodType: z.ZodType<T, any, T>, objeto: any, mensagem: string) => import("p-respostas").tipoRespostaErro | import("p-respostas").tipoRespostaSucesso<T>;
|
||||
export declare const validarZ: <T>(zodType: z.ZodType<T, any>, objeto: any, mensagem: string) => import("p-respostas").tipoRespostaErro | import("p-respostas").tipoRespostaSucesso<T>;
|
||||
export declare const zp_produto_conta: z.ZodObject<{
|
||||
produto: z.ZodString;
|
||||
conta: z.ZodString;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue