• Build the final Prisma select for a filterMany/filterOne call.

    • No select/include → schema-driven full select (via jsonSchema2PrismaSelect) when includeRelationsByDefault is true; otherwise scalars-only from schema with relations omitted (Prisma-like default).
    • With select → projected fields (+ identity)
    • With include → relations nested; scalars from schema unless select given

    Parameters

    • typeName: string
    • schema: JSONSchema7
    • options: {
          include?: Record<string, NestedIncludeValue>;
          includeRelationsByDefault?: boolean;
          maxRecursion?: number;
          select?: Record<string, boolean>;
      } & WhereToPrismaOptions

    Returns { select: Record<string, unknown> }