import { Removed, RemovedType } from '../util/types.js'; /** * Narrows the type of create data to remove unsupported properties. */ export type NarrowCreateData = Removed; export type NarrowUpdateData = Removed; export type NarrowUpsertCreate = Removed; /** * Narrows the type of update data to remove unsupported properties. */ export type NarrowUpdateManyData = Removed; type StripPrimitives = T extends object ? T : never; type OnlyPrimitives = StripPrimitives extends never ? T : never; type StripRelationFields = T extends object ? T extends (infer V)[] ? StripRelationFields[] : { [K in keyof T]: OnlyPrimitives; } : T; /** * Narrow include types to remove the unsupported `_count` and `cursor` properties. */ export type NarrowInclude = Removed; /** * Narrows select types to remove the unsupported `_count` and `cursor` properties * but also related fields as we do not yet support selecting related objects. */ export type NarrowSelect = NarrowInclude>; /** * Narrows where types by removing the unsupported relational filters * and removing Prisma's `QueryMode` because it is used for case-insensitive search * (cf. https://www.prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#case-insensitive-filtering) * but that is not supported at the moment because of differences between SQLite and Postgres. */ export type NarrowWhere = RemovedType, 'mode', 'default' | 'insensitive' | undefined>; export type NarrowOrderBy = StripRelationFields; export {}; /** * Narrows the type of create arguments to remove unsupported properties. */