This commit is contained in:
Luiz H. R. Silva 2024-07-03 13:25:13 -03:00
parent 2747b6d509
commit 34acfd3e71
11 changed files with 69 additions and 10 deletions

View file

@ -1,6 +1,19 @@
import type { tipoResposta } from "p-respostas";
import { z } from "zod";
import { type zp_produto_conta } from "./variaveis";
export declare const z_filtro: z.ZodObject<{
coluna: z.ZodString;
valor: z.ZodAny;
operador: z.ZodEnum<["=", "!=", ">", "<", ">=", "<=", "∩"]>;
}, "strip", z.ZodTypeAny, {
coluna: string;
operador: "=" | "!=" | ">" | "<" | ">=" | "<=" | "∩";
valor?: any;
}, {
coluna: string;
operador: "=" | "!=" | ">" | "<" | ">=" | "<=" | "∩";
valor?: any;
}>;
export declare const zp_serie_registrar: z.ZodObject<{
tabela: z.ZodString;
colanuEixoX: z.ZodString;

View file

@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.serie_consultar = exports.zp_serie_registrar = void 0;
exports.serie_consultar = exports.zp_serie_registrar = exports.z_filtro = void 0;
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const p_respostas_1 = require("p-respostas");
const zod_1 = require("zod");
const variaveis_1 = require("./variaveis");
const filtro = zod_1.z.object({
exports.z_filtro = zod_1.z.object({
coluna: zod_1.z.string(),
valor: zod_1.z.any(),
operador: variaveis_1.operadores_pilao,
@ -18,7 +18,7 @@ exports.zp_serie_registrar = zod_1.z.object({
colanuEixoX: zod_1.z.string(),
colunaAgrupamento: zod_1.z.string().array().optional(),
agregacao: variaveis_1.tiposSeriesAgregacoes,
filtros: filtro.array().optional(),
filtros: exports.z_filtro.array().optional(),
});
const serie_consultar = (cliente) => (parametros) => {
const dados = async () => {

View file

@ -138,4 +138,17 @@ export declare const pPilao: {
data: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
mes: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
};
z_filtro: import("zod").ZodObject<{
coluna: import("zod").ZodString;
valor: import("zod").ZodAny;
operador: import("zod").ZodEnum<["=", "!=", ">", "<", ">=", "<=", "∩"]>;
}, "strip", import("zod").ZodTypeAny, {
coluna: string;
operador: "=" | "!=" | ">" | "<" | ">=" | "<=" | "∩";
valor?: any;
}, {
coluna: string;
operador: "=" | "!=" | ">" | "<" | ">=" | "<=" | "∩";
valor?: any;
}>;
};

View file

@ -21,4 +21,5 @@ exports.pPilao = {
zp_deletar_registros: _deletar_registros_1.zp_deletar_registros,
operadores_pilao: variaveis_2.operadores_pilao,
operadores_permitidos_por_tipo: variaveis_2.operadores_permitidos_por_tipo,
z_filtro: _serie_consultar_1.z_filtro,
};