trpc-shield
Version:
tRPC permissions as another layer of abstraction!
46 lines (42 loc) • 1.84 kB
text/typescript
import { z } from 'zod';
import { IntWithAggregatesFilterObjectSchema } from './IntWithAggregatesFilter.schema';
import { DateTimeWithAggregatesFilterObjectSchema } from './DateTimeWithAggregatesFilter.schema';
import { StringNullableWithAggregatesFilterObjectSchema } from './StringNullableWithAggregatesFilter.schema';
import { StringWithAggregatesFilterObjectSchema } from './StringWithAggregatesFilter.schema';
import type { Prisma } from '@prisma/client';
const Schema: z.ZodType<any> = z
.object({
AND: z
.union([
z.lazy(() => UserScalarWhereWithAggregatesInputObjectSchema),
z.lazy(() => UserScalarWhereWithAggregatesInputObjectSchema).array(),
])
.optional(),
OR: z
.lazy(() => UserScalarWhereWithAggregatesInputObjectSchema)
.array()
.optional(),
NOT: z
.union([
z.lazy(() => UserScalarWhereWithAggregatesInputObjectSchema),
z.lazy(() => UserScalarWhereWithAggregatesInputObjectSchema).array(),
])
.optional(),
id: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number()]).optional(),
createdAt: z.union([z.lazy(() => DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
username: z
.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()])
.optional()
.nullable(),
password: z
.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()])
.optional()
.nullable(),
email: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
googleId: z
.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()])
.optional()
.nullable(),
})
.strict();
export const UserScalarWhereWithAggregatesInputObjectSchema = Schema;