trpc-shield
Version:
tRPC permissions as another layer of abstraction!
29 lines (25 loc) • 1.09 kB
text/typescript
import { z } from 'zod';
import { UserWhereInputObjectSchema } from './UserWhereInput.schema';
import { DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
import { StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
import type { Prisma } from '@prisma/client';
const Schema: z.ZodType<Prisma.UserWhereUniqueInput> = z
.object({
id: z.number(),
username: z.string(),
email: z.string(),
googleId: z.string(),
AND: z.union([z.lazy(() => UserWhereInputObjectSchema), z.lazy(() => UserWhereInputObjectSchema).array()]).optional(),
OR: z
.lazy(() => UserWhereInputObjectSchema)
.array()
.optional(),
NOT: z.union([z.lazy(() => UserWhereInputObjectSchema), z.lazy(() => UserWhereInputObjectSchema).array()]).optional(),
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
password: z
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
.optional()
.nullable(),
})
.strict();
export const UserWhereUniqueInputObjectSchema = Schema;