prisma-guard 1.13.1 → 1.14.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.
@@ -12,6 +12,7 @@ interface FieldMeta {
12
12
  isUpdatedAt: boolean;
13
13
  isEnum?: boolean;
14
14
  isUnique?: boolean;
15
+ isUnsupported?: boolean;
15
16
  }
16
17
  interface GuardLogger {
17
18
  warn(message: string): void;
@@ -12,6 +12,7 @@ interface FieldMeta {
12
12
  isUpdatedAt: boolean;
13
13
  isEnum?: boolean;
14
14
  isUnique?: boolean;
15
+ isUnsupported?: boolean;
15
16
  }
16
17
  interface GuardLogger {
17
18
  warn(message: string): void;
@@ -198,7 +198,9 @@ function getSupportedOperators(fieldMeta) {
198
198
  }
199
199
  function createBaseType(fieldMeta, enumMap, scalarBase) {
200
200
  let base;
201
- if (fieldMeta.isEnum) {
201
+ if (fieldMeta.isUnsupported) {
202
+ base = z2.unknown();
203
+ } else if (fieldMeta.isEnum) {
202
204
  const values = enumMap[fieldMeta.type];
203
205
  if (!values || values.length === 0) {
204
206
  throw new ShapeError(`Unknown enum: ${fieldMeta.type}`);