UNPKG

@godspeedsystems/prisma-deterministic-search-field-encryption

Version:

Transparent and customizable field-level encryption at rest for Prisma based on prisma-field-encryption package

32 lines (31 loc) 943 B
"use strict"; /** * Prisma types -- * * We're copying just what we need for local type safety * without importing Prisma-generated types, as the location * of the generated client can be unknown (when using custom * or multiple client locations). */ Object.defineProperty(exports, "__esModule", { value: true }); exports.dmmfDocumentParser = void 0; // Prisma types -- const zod_1 = require("zod"); const dmmfFieldParser = zod_1.z.object({ name: zod_1.z.string(), isList: zod_1.z.boolean(), isUnique: zod_1.z.boolean(), isId: zod_1.z.boolean(), type: zod_1.z.any(), documentation: zod_1.z.string().optional() }); const dmmfModelParser = zod_1.z.object({ name: zod_1.z.string(), fields: zod_1.z.array(dmmfFieldParser) }); exports.dmmfDocumentParser = zod_1.z.object({ datamodel: zod_1.z.object({ models: zod_1.z.array(dmmfModelParser), types: zod_1.z.array(dmmfModelParser) }) });