prisma-guard 1.25.0 → 1.26.0

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.
@@ -1582,6 +1582,18 @@ function createWhereBuilder(typeMap, enumMap, scalarBase, uniqueMap = {}) {
1582
1582
  scalarConditions
1583
1583
  );
1584
1584
  }
1585
+ for (const key of Object.keys(scalarConditions)) {
1586
+ if (COMBINATOR_KEYS.has(key))
1587
+ continue;
1588
+ if (!(key in fieldSchemas)) {
1589
+ fieldSchemas[key] = import_zod4.z.object({}).strict().optional();
1590
+ }
1591
+ }
1592
+ for (const key of Object.keys(relationForced)) {
1593
+ if (!(key in fieldSchemas)) {
1594
+ fieldSchemas[key] = import_zod4.z.object({}).strict().optional();
1595
+ }
1596
+ }
1585
1597
  const schema = Object.keys(fieldSchemas).length > 0 ? import_zod4.z.object(fieldSchemas).strict().optional() : null;
1586
1598
  const forcedOnlyKeys = /* @__PURE__ */ new Set();
1587
1599
  for (const key of Object.keys(whereConfig)) {
@@ -1991,7 +2003,12 @@ function createWhereBuilder(typeMap, enumMap, scalarBase, uniqueMap = {}) {
1991
2003
  fieldSchemas[key] = directSchema;
1992
2004
  continue;
1993
2005
  }
1994
- forcedConditions[key] = parseForcedUniqueValue(model, key, fieldMeta, value);
2006
+ forcedConditions[key] = parseForcedUniqueValue(
2007
+ model,
2008
+ key,
2009
+ fieldMeta,
2010
+ value
2011
+ );
1995
2012
  forcedOnlyKeys.add(key);
1996
2013
  }
1997
2014
  return {