@zenstackhq/orm 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -1629,6 +1629,7 @@ var PostgresCrudDialect = class PostgresCrudDialect extends LateralJoinDialectBa
|
|
|
1629
1629
|
return value;
|
|
1630
1630
|
}
|
|
1631
1631
|
});
|
|
1632
|
+
pg.types.setTypeParser(pg.types.builtins.DATE, (v) => /* @__PURE__ */ new Date(`${v}T00:00:00Z`));
|
|
1632
1633
|
}).catch(() => {});
|
|
1633
1634
|
}
|
|
1634
1635
|
}
|
|
@@ -2491,12 +2492,17 @@ var ZodSchemaFactory = class {
|
|
|
2491
2492
|
return schema;
|
|
2492
2493
|
}
|
|
2493
2494
|
makeDateTimeValueSchema() {
|
|
2494
|
-
const schema = zod.z.union([
|
|
2495
|
+
const schema = zod.z.union([
|
|
2496
|
+
zod.z.iso.datetime(),
|
|
2497
|
+
zod.z.iso.date(),
|
|
2498
|
+
zod.z.date()
|
|
2499
|
+
]);
|
|
2495
2500
|
this.registerSchema("DateTime", schema);
|
|
2496
2501
|
return schema;
|
|
2497
2502
|
}
|
|
2498
2503
|
makeDateTimeFilterSchema(optional, withAggregations, allowedFilterKinds) {
|
|
2499
|
-
const
|
|
2504
|
+
const filterValueSchema = this.makeDateTimeValueSchema();
|
|
2505
|
+
const schema = this.makeCommonPrimitiveFilterSchema(filterValueSchema, optional, () => zod.z.lazy(() => this.makeDateTimeFilterSchema(optional, withAggregations, allowedFilterKinds)), withAggregations ? [
|
|
2500
2506
|
"_count",
|
|
2501
2507
|
"_min",
|
|
2502
2508
|
"_max"
|