65 lines
2.2 KiB
JavaScript
65 lines
2.2 KiB
JavaScript
"use strict";
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
};
|
|
var __copyProps = (to, from, except, desc) => {
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
for (let key of __getOwnPropNames(from))
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
}
|
|
return to;
|
|
};
|
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
var tipoFiltro_26_exports = {};
|
|
__export(tipoFiltro_26_exports, {
|
|
criarFiltro26: () => criarFiltro26,
|
|
operadores26: () => operadores26,
|
|
zFiltro26: () => zFiltro26
|
|
});
|
|
module.exports = __toCommonJS(tipoFiltro_26_exports);
|
|
var import_zod = require("zod");
|
|
var operadores26 = /* @__PURE__ */ ((operadores262) => {
|
|
operadores262["="] = "=";
|
|
operadores262["!="] = "!=";
|
|
operadores262[">"] = ">";
|
|
operadores262[">="] = ">=";
|
|
operadores262["<"] = "<";
|
|
operadores262["<="] = "<=";
|
|
operadores262["like"] = "like";
|
|
operadores262["in"] = "in";
|
|
return operadores262;
|
|
})(operadores26 || {});
|
|
const zOperadores = import_zod.z.nativeEnum(operadores26);
|
|
const zValor = import_zod.z.any();
|
|
const zCondicao = import_zod.z.record(zOperadores, zValor);
|
|
const zFiltro26 = import_zod.z.lazy(
|
|
() => import_zod.z.object({
|
|
E: import_zod.z.array(zFiltro26).optional(),
|
|
OU: import_zod.z.array(zFiltro26).optional()
|
|
}).catchall(import_zod.z.union([zCondicao, zFiltro26]))
|
|
);
|
|
const _filtro = {
|
|
idade: { [">=" /* >= */]: 18 },
|
|
OU: [
|
|
{ nome: { ["like" /* like */]: "%pa%" } },
|
|
{
|
|
E: [
|
|
{ carro: { ano: { ["=" /* = */]: 2020 } } },
|
|
{ carro: { modelo: { ["in" /* in */]: ["Civic", "Corolla"] } } }
|
|
]
|
|
}
|
|
]
|
|
};
|
|
const criarFiltro26 = (filtro) => filtro;
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
0 && (module.exports = {
|
|
criarFiltro26,
|
|
operadores26,
|
|
zFiltro26
|
|
});
|