@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.mjs
CHANGED
|
@@ -1592,6 +1592,7 @@ var PostgresCrudDialect = class PostgresCrudDialect extends LateralJoinDialectBa
|
|
|
1592
1592
|
return value;
|
|
1593
1593
|
}
|
|
1594
1594
|
});
|
|
1595
|
+
pg.types.setTypeParser(pg.types.builtins.DATE, (v) => /* @__PURE__ */ new Date(`${v}T00:00:00Z`));
|
|
1595
1596
|
}).catch(() => {});
|
|
1596
1597
|
}
|
|
1597
1598
|
}
|
|
@@ -2454,12 +2455,17 @@ var ZodSchemaFactory = class {
|
|
|
2454
2455
|
return schema;
|
|
2455
2456
|
}
|
|
2456
2457
|
makeDateTimeValueSchema() {
|
|
2457
|
-
const schema = z.union([
|
|
2458
|
+
const schema = z.union([
|
|
2459
|
+
z.iso.datetime(),
|
|
2460
|
+
z.iso.date(),
|
|
2461
|
+
z.date()
|
|
2462
|
+
]);
|
|
2458
2463
|
this.registerSchema("DateTime", schema);
|
|
2459
2464
|
return schema;
|
|
2460
2465
|
}
|
|
2461
2466
|
makeDateTimeFilterSchema(optional, withAggregations, allowedFilterKinds) {
|
|
2462
|
-
const
|
|
2467
|
+
const filterValueSchema = this.makeDateTimeValueSchema();
|
|
2468
|
+
const schema = this.makeCommonPrimitiveFilterSchema(filterValueSchema, optional, () => z.lazy(() => this.makeDateTimeFilterSchema(optional, withAggregations, allowedFilterKinds)), withAggregations ? [
|
|
2463
2469
|
"_count",
|
|
2464
2470
|
"_min",
|
|
2465
2471
|
"_max"
|