melhorias de tipagem
This commit is contained in:
parent
1d5d3a48b4
commit
afa28a0699
32 changed files with 435 additions and 486 deletions
14
dist-require/pilao-de-dados/_deletar_registros.d.ts
vendored
Normal file
14
dist-require/pilao-de-dados/_deletar_registros.d.ts
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import type { tipoResposta } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { type zp_produto_conta } from "./variaveis";
|
||||
export declare const zp_deletar_registros: z.ZodObject<{
|
||||
tabela: z.ZodString;
|
||||
codigos: z.ZodArray<z.ZodString, "many">;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}, {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}>;
|
||||
export declare const deletar_registros: ({ conta, produto, emDesenvolvimento }: z.infer<typeof zp_produto_conta>) => ({ codigos, tabela, }: z.infer<typeof zp_deletar_registros>) => Promise<tipoResposta<true>>;
|
||||
|
|
@ -43,44 +43,47 @@ exports.deletar_registros = exports.zp_deletar_registros = void 0;
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var zod_1 = require("zod");
|
||||
var _variaveis_1 = require("./_variaveis");
|
||||
var variaveis_1 = require("./variaveis");
|
||||
//enviar registros para base de dados
|
||||
exports.zp_deletar_registros = zod_1.z.object({
|
||||
tabela: zod_1.z.string(),
|
||||
codigos: zod_1.z.array(zod_1.z.string()),
|
||||
});
|
||||
var deletar_registros = function (_a) {
|
||||
var emDesenvolvimento = _a.emDesenvolvimento, _b = _a.cliente, conta = _b.conta, produto = _b.produto, _c = _a.parametros, codigos = _c.codigos, tabela = _c.tabela;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.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;
|
||||
_d.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 = _d.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
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)];
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
exports.deletar_registros = deletar_registros;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import type { tipoResposta } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { type zp_produto_conta } from "./_variaveis";
|
||||
import { type zp_produto_conta } from "./variaveis";
|
||||
export declare const zp_registrar_base_dados: z.ZodObject<{
|
||||
tabela: z.ZodString;
|
||||
colunas: z.ZodArray<z.ZodObject<{
|
||||
|
|
@ -51,10 +51,4 @@ export declare const zp_enviar_registros: z.ZodObject<{
|
|||
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
|
||||
}>[];
|
||||
}>;
|
||||
export declare const enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
||||
emDesenvolvimento?: boolean | undefined | null;
|
||||
/** Identificação do cliente */
|
||||
cliente: z.infer<typeof zp_produto_conta>;
|
||||
/** Parametros da função */
|
||||
parametros: z.infer<typeof zp_enviar_registros>;
|
||||
}) => Promise<tipoResposta<true>>;
|
||||
export declare const enviar_registros: ({ conta, produto, emDesenvolvimento }: z.infer<typeof zp_produto_conta>) => ({ registros, tabela, }: z.infer<typeof zp_enviar_registros>) => Promise<tipoResposta<true>>;
|
||||
|
|
@ -43,12 +43,12 @@ exports.enviar_registros = exports.zp_enviar_registros = exports.zp_registrar_ba
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var zod_1 = require("zod");
|
||||
var _variaveis_1 = require("./_variaveis");
|
||||
var variaveis_1 = require("./variaveis");
|
||||
exports.zp_registrar_base_dados = zod_1.z.object({
|
||||
tabela: zod_1.z.string(),
|
||||
colunas: zod_1.z.array(zod_1.z.object({
|
||||
coluna: zod_1.z.string(),
|
||||
tipo: _variaveis_1.z_tipo_coluna_base_dados,
|
||||
tipo: variaveis_1.z_tipo_coluna_base_dados,
|
||||
})),
|
||||
});
|
||||
//enviar registros para base de dados
|
||||
|
|
@ -56,41 +56,44 @@ exports.zp_enviar_registros = zod_1.z.object({
|
|||
tabela: zod_1.z.string(),
|
||||
registros: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
||||
valor: zod_1.z.any(),
|
||||
tipo: _variaveis_1.z_tipo_coluna_base_dados.optional().nullable(),
|
||||
tipo: variaveis_1.z_tipo_coluna_base_dados.optional().nullable(),
|
||||
}))),
|
||||
});
|
||||
var enviar_registros = function (_a) {
|
||||
var emDesenvolvimento = _a.emDesenvolvimento, _b = _a.cliente, conta = _b.conta, produto = _b.produto, _c = _a.parametros, registros = _c.registros, tabela = _c.tabela;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, tamanhoBlocos, bloco, resp;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.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;
|
||||
_d.label = 1;
|
||||
case 1:
|
||||
if (!(registros.length > 0)) return [3 /*break*/, 3];
|
||||
bloco = registros.splice(0, tamanhoBlocos);
|
||||
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 = _d.sent();
|
||||
if (resp.eErro) {
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/, p_respostas_1.respostaComuns.valor(true)];
|
||||
}
|
||||
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);
|
||||
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)];
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
exports.enviar_registros = enviar_registros;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import type { tipoResposta } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { type zp_produto_conta } from "./_variaveis";
|
||||
import { type zp_produto_conta } from "./variaveis";
|
||||
export declare const zp_serie_registrar: z.ZodObject<{
|
||||
tabela: z.ZodString;
|
||||
colanuEixoX: z.ZodString;
|
||||
|
|
@ -17,12 +17,7 @@ export declare const zp_serie_registrar: z.ZodObject<{
|
|||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
}>;
|
||||
export declare const serie_consultar: ({ emDesenvolvimento, cliente, parametros, }: {
|
||||
emDesenvolvimento?: boolean | undefined | null;
|
||||
/** Identificação do cliente */
|
||||
cliente: z.infer<typeof zp_produto_conta>;
|
||||
parametros: z.infer<typeof zp_serie_registrar>;
|
||||
}) => {
|
||||
export declare const serie_consultar: (cliente: z.infer<typeof zp_produto_conta>) => (parametros: z.infer<typeof zp_serie_registrar>) => {
|
||||
dados: () => Promise<tipoResposta<{
|
||||
registros: any[];
|
||||
legenda: string;
|
||||
|
|
@ -43,51 +43,52 @@ exports.serie_consultar = exports.zp_serie_registrar = void 0;
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var zod_1 = require("zod");
|
||||
var _variaveis_1 = require("./_variaveis");
|
||||
var variaveis_1 = require("./variaveis");
|
||||
exports.zp_serie_registrar = zod_1.z.object({
|
||||
tabela: zod_1.z.string(),
|
||||
colanuEixoX: zod_1.z.string(),
|
||||
colunaAgrupamento: zod_1.z.string().array().optional(),
|
||||
agregacao: _variaveis_1.tiposSeriesAgregacoes,
|
||||
agregacao: variaveis_1.tiposSeriesAgregacoes,
|
||||
});
|
||||
var serie_consultar = function (_a) {
|
||||
var emDesenvolvimento = _a.emDesenvolvimento, cliente = _a.cliente, parametros = _a.parametros;
|
||||
var dados = function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, resp;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, _variaveis_1.baseUrlPilao)(emDesenvolvimento)).concat("".concat(_variaveis_1.PREFIXO, "/").concat(_variaveis_1.tiposSeriesAgregacoes.enum.contagem, "/").concat(cliente.produto, "/").concat(cliente.conta)));
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify(parametros),
|
||||
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 1:
|
||||
resp = _a.sent();
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
});
|
||||
}); };
|
||||
var url = function () {
|
||||
var pr = {
|
||||
cliente: cliente,
|
||||
parametros: parametros,
|
||||
var serie_consultar = function (cliente) {
|
||||
return function (parametros) {
|
||||
var dados = function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, resp;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
url = new URL("".concat((0, variaveis_1.baseUrlPilao)(cliente.emDesenvolvimento)).concat("".concat(variaveis_1.PREFIXO, "/").concat(variaveis_1.tiposSeriesAgregacoes.enum.contagem, "/").concat(cliente.produto, "/").concat(cliente.conta)));
|
||||
return [4 /*yield*/, (0, cross_fetch_1.default)(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify(parametros),
|
||||
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 1:
|
||||
resp = _a.sent();
|
||||
return [2 /*return*/, resp];
|
||||
}
|
||||
});
|
||||
}); };
|
||||
var url = function () {
|
||||
var pr = {
|
||||
cliente: cliente,
|
||||
parametros: parametros,
|
||||
};
|
||||
var vUrl = new URL("".concat(cliente.emDesenvolvimento
|
||||
? "http://127.0.0.1:5081"
|
||||
: "https://carro-de-boi.idz.one").concat(variaveis_1.PREFIXO, "/").concat(variaveis_1.tiposSeriesAgregacoes.enum.contagem));
|
||||
var serie = encodeURIComponent(JSON.stringify(pr, null, 2));
|
||||
return "".concat(vUrl.href, "?serie=").concat(serie);
|
||||
};
|
||||
return {
|
||||
dados: dados,
|
||||
url: url,
|
||||
};
|
||||
var vUrl = new URL("".concat(emDesenvolvimento
|
||||
? "http://127.0.0.1:5081"
|
||||
: "https://carro-de-boi.idz.one").concat(_variaveis_1.PREFIXO, "/").concat(_variaveis_1.tiposSeriesAgregacoes.enum.contagem));
|
||||
var serie = encodeURIComponent(JSON.stringify(pr, null, 2));
|
||||
return "".concat(vUrl.href, "?serie=").concat(serie);
|
||||
};
|
||||
return {
|
||||
dados: dados,
|
||||
url: url,
|
||||
};
|
||||
};
|
||||
exports.serie_consultar = serie_consultar;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
import type { tipoResposta } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { type zp_produto_conta } from "./_variaveis";
|
||||
export declare const zp_deletar_registros: z.ZodObject<{
|
||||
tabela: z.ZodString;
|
||||
codigos: z.ZodArray<z.ZodString, "many">;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}, {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}>;
|
||||
export declare const deletar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { codigos, tabela }, }: {
|
||||
emDesenvolvimento?: boolean | undefined | null;
|
||||
/** Identificação do cliente */
|
||||
cliente: z.infer<typeof zp_produto_conta>;
|
||||
/** Parametros da função */
|
||||
parametros: z.infer<typeof zp_deletar_registros>;
|
||||
}) => Promise<tipoResposta<true>>;
|
||||
66
dist-require/pilao-de-dados/index.d.ts
vendored
66
dist-require/pilao-de-dados/index.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
|||
import { tiposSeriesAgregacoes } from "./_variaveis";
|
||||
import { tiposSeriesAgregacoes } from "./variaveis";
|
||||
export { tiposSeriesAgregacoes };
|
||||
export declare const pPilao: {
|
||||
zp_registrar_base_dados: import("zod").ZodObject<{
|
||||
|
|
@ -26,19 +26,16 @@ export declare const pPilao: {
|
|||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
|
||||
}[];
|
||||
}>;
|
||||
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
||||
emDesenvolvimento?: boolean | null | undefined;
|
||||
cliente: {
|
||||
produto: string;
|
||||
conta: string;
|
||||
};
|
||||
parametros: {
|
||||
tabela: string;
|
||||
registros: Record<string, {
|
||||
valor?: any;
|
||||
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
|
||||
}>[];
|
||||
};
|
||||
enviar_registros: ({ conta, produto, emDesenvolvimento }: {
|
||||
produto: string;
|
||||
conta: 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>>;
|
||||
zp_enviar_registros: import("zod").ZodObject<{
|
||||
tabela: import("zod").ZodString;
|
||||
|
|
@ -81,18 +78,15 @@ export declare const pPilao: {
|
|||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
}>;
|
||||
serie_consultar: ({ emDesenvolvimento, cliente, parametros, }: {
|
||||
emDesenvolvimento?: boolean | null | undefined;
|
||||
cliente: {
|
||||
produto: string;
|
||||
conta: string;
|
||||
};
|
||||
parametros: {
|
||||
tabela: string;
|
||||
colanuEixoX: string;
|
||||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
};
|
||||
serie_consultar: (cliente: {
|
||||
produto: string;
|
||||
conta: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}) => (parametros: {
|
||||
tabela: string;
|
||||
colanuEixoX: string;
|
||||
agregacao: "contagem" | "somatoria";
|
||||
colunaAgrupamento?: string[] | undefined;
|
||||
}) => {
|
||||
dados: () => Promise<import("p-respostas").tipoResposta<{
|
||||
registros: any[];
|
||||
|
|
@ -109,24 +103,24 @@ export declare const pPilao: {
|
|||
zp_produto_conta: import("zod").ZodObject<{
|
||||
produto: import("zod").ZodString;
|
||||
conta: import("zod").ZodString;
|
||||
emDesenvolvimento: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
||||
}, "strip", import("zod").ZodTypeAny, {
|
||||
produto: string;
|
||||
conta: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}, {
|
||||
produto: string;
|
||||
conta: 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: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { codigos, tabela }, }: {
|
||||
emDesenvolvimento?: boolean | null | undefined;
|
||||
cliente: {
|
||||
produto: string;
|
||||
conta: string;
|
||||
};
|
||||
parametros: {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
};
|
||||
deletar_registros: ({ conta, produto, emDesenvolvimento }: {
|
||||
produto: string;
|
||||
conta: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}) => ({ codigos, tabela, }: {
|
||||
tabela: string;
|
||||
codigos: string[];
|
||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
zp_deletar_registros: import("zod").ZodObject<{
|
||||
tabela: import("zod").ZodString;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pPilao = exports.tiposSeriesAgregacoes = void 0;
|
||||
var _variaveis_1 = require("./_variaveis");
|
||||
Object.defineProperty(exports, "tiposSeriesAgregacoes", { enumerable: true, get: function () { return _variaveis_1.tiposSeriesAgregacoes; } });
|
||||
var deletar_registros_1 = require("./deletar_registros");
|
||||
var enviar_registros_1 = require("./enviar_registros");
|
||||
var serie_consultar_1 = require("./serie_consultar");
|
||||
var _deletar_registros_1 = require("./_deletar_registros");
|
||||
var _enviar_registros_1 = require("./_enviar_registros");
|
||||
var variaveis_1 = require("./variaveis");
|
||||
Object.defineProperty(exports, "tiposSeriesAgregacoes", { enumerable: true, get: function () { return variaveis_1.tiposSeriesAgregacoes; } });
|
||||
var _serie_consultar_1 = require("./_serie_consultar");
|
||||
exports.pPilao = {
|
||||
zp_registrar_base_dados: enviar_registros_1.zp_registrar_base_dados,
|
||||
enviar_registros: enviar_registros_1.enviar_registros,
|
||||
zp_enviar_registros: enviar_registros_1.zp_enviar_registros,
|
||||
zp_serie_registrar: serie_consultar_1.zp_serie_registrar,
|
||||
serie_consultar: serie_consultar_1.serie_consultar,
|
||||
zp_produto_conta: _variaveis_1.zp_produto_conta,
|
||||
validarZ: _variaveis_1.validarZ,
|
||||
deletar_registros: deletar_registros_1.deletar_registros,
|
||||
zp_deletar_registros: deletar_registros_1.zp_deletar_registros,
|
||||
zp_registrar_base_dados: _enviar_registros_1.zp_registrar_base_dados,
|
||||
enviar_registros: _enviar_registros_1.enviar_registros,
|
||||
zp_enviar_registros: _enviar_registros_1.zp_enviar_registros,
|
||||
zp_serie_registrar: _serie_consultar_1.zp_serie_registrar,
|
||||
serie_consultar: _serie_consultar_1.serie_consultar,
|
||||
zp_produto_conta: variaveis_1.zp_produto_conta,
|
||||
validarZ: variaveis_1.validarZ,
|
||||
deletar_registros: _deletar_registros_1.deletar_registros,
|
||||
zp_deletar_registros: _deletar_registros_1.zp_deletar_registros,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@ export declare const validarZ: <T>(zodType: z.ZodType<T, any, T>, objeto: any, m
|
|||
export declare const zp_produto_conta: z.ZodObject<{
|
||||
produto: z.ZodString;
|
||||
conta: z.ZodString;
|
||||
emDesenvolvimento: z.ZodOptional<z.ZodBoolean>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
produto: string;
|
||||
conta: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}, {
|
||||
produto: string;
|
||||
conta: string;
|
||||
emDesenvolvimento?: boolean | undefined;
|
||||
}>;
|
||||
export declare const z_tipo_coluna_base_dados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>;
|
||||
export declare const tiposSeriesAgregacoes: z.ZodEnum<["contagem", "somatoria"]>;
|
||||
|
|
@ -17,6 +17,7 @@ exports.validarZ = validarZ;
|
|||
exports.zp_produto_conta = zod_1.z.object({
|
||||
produto: zod_1.z.string(),
|
||||
conta: zod_1.z.string(),
|
||||
emDesenvolvimento: zod_1.z.boolean().optional(),
|
||||
});
|
||||
exports.z_tipo_coluna_base_dados = zod_1.z.enum([
|
||||
"texto",
|
||||
Loading…
Add table
Add a link
Reference in a new issue