diff --git a/.vscode/launch.json b/.vscode/launch.json index 9fd9823..4b26c43 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -23,5 +23,18 @@ "webRoot": "${workspaceFolder}" } }, + { + "type": "node", + "request": "launch", + "name": "Debug Jest Tests", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": ["--runInBand"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "windows": { + "program": "${workspaceFolder}/node_modules/jest/bin/jest" + } + }, ] } \ No newline at end of file diff --git a/components/FilterControls.tsx b/components/FilterControls.tsx index 574650c..4dc070f 100644 --- a/components/FilterControls.tsx +++ b/components/FilterControls.tsx @@ -4,7 +4,7 @@ import { FunnelIcon } from "@heroicons/react/24/solid" import clsx from "clsx" import { AnimatePresence, motion } from "framer-motion" import { ReactElement, ReactNode, useEffect, useState } from "react" -import { ExtraFilters } from "../lib/web/question_router" +import { ExtraFilters } from "../lib/web/question_router/types" function FilterButton({ onClick, diff --git a/components/Questions.tsx b/components/Questions.tsx index bf0b107..8fa1c0c 100644 --- a/components/Questions.tsx +++ b/components/Questions.tsx @@ -5,7 +5,7 @@ import { LoaderIcon } from "react-hot-toast" import { InView } from "react-intersection-observer" import ReactMarkdown from "react-markdown" import remarkGfm from "remark-gfm" -import { ExtraFilters } from "../lib/web/question_router" +import { ExtraFilters } from "../lib/web/question_router/types" import { api } from "../lib/web/trpc" import { FilterControls } from "./FilterControls" import { Question } from "./questions/Question" diff --git a/components/predict-form/Predict.tsx b/components/predict-form/Predict.tsx index a6cf2b3..39695e1 100644 --- a/components/predict-form/Predict.tsx +++ b/components/predict-form/Predict.tsx @@ -130,7 +130,7 @@ export function Predict({ if (!userId) { localStorage.setItem( "cached_question_content", - SuperJSON.stringify({ ...data, tags: tagsPreview }) + SuperJSON.stringify({ ...data, tags: tagsPreview }), ) if (embedded) { window.open(fatebookUrl, "_blank")?.focus() diff --git a/components/questions/QuestionOrSignIn.tsx b/components/questions/QuestionOrSignIn.tsx index b0e318d..3f88562 100644 --- a/components/questions/QuestionOrSignIn.tsx +++ b/components/questions/QuestionOrSignIn.tsx @@ -18,7 +18,7 @@ export function QuestionOrSignIn({ const { data: session, status: authStatus } = useSession() const questionId = useQuestionId() - const qQuery = api.question.getQuestion.useQuery( + const qQuery = api.legacyQuestion.getQuestion.useQuery( { questionId }, { retry: false }, ) diff --git a/components/questions/UpdateableLatestForecast.tsx b/components/questions/UpdateableLatestForecast.tsx index a87bec4..304a370 100644 --- a/components/questions/UpdateableLatestForecast.tsx +++ b/components/questions/UpdateableLatestForecast.tsx @@ -130,22 +130,27 @@ export function UpdateableLatestForecast({ ], ) - const updateOrReset = useCallback((value: string) => { - const now = Date.now() - if (now - lastUpdateTime.current < 2000) return - lastUpdateTime.current = now + const updateOrReset = useCallback( + (value: string) => { + const now = Date.now() + if (now - lastUpdateTime.current < 2000) return + lastUpdateTime.current = now - if (defaultVal !== value && value !== "") { - updateForecast(value) - } else if (value === "" || !value) { - setLocalForecast(defaultVal) - } - }, [defaultVal, updateForecast]) + if (defaultVal !== value && value !== "") { + updateForecast(value) + } else if (value === "" || !value) { + setLocalForecast(defaultVal) + } + }, + [defaultVal, updateForecast], + ) const updateOrResetDebounced = useDebouncedCallback(updateOrReset, 5000) useEffect(() => { - setIsIOS(/iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream) + setIsIOS( + /iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream, + ) }, []) useEffect(() => { @@ -220,7 +225,7 @@ export function UpdateableLatestForecast({ setErrorMessage(null) e.target.value && checkForErrors(parseFloat(e.target.value) / 100) - + if (isIOS) { updateOrResetDebounced(e.target.value) } diff --git a/jest.config.ts b/jest.config.ts index 005e7c5..15e3e83 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -10,7 +10,21 @@ const createJestConfig = nextJest({ dir: "./", }) -const config: Config = { +// Allows jest to be able to use ESM correctly in test setup +const esModules = [ + "@panva/hkdf", + "data-uri-to-buffer", + "fetch-blob", + "formdata-polyfill", + "jose", + "node-fetch", + "preact", + "preact-render-to-string", + "superjson", + "uncrypto", + "uuid", +] +const customConfig: Config = { clearMocks: true, collectCoverage: false, coverageDirectory: "coverage", @@ -20,7 +34,18 @@ const config: Config = { "!**/vendor/**", ], coverageProvider: "v8", + // setupFilesAfterEnv: ["/jest.setup.ts"], - can uncomment when jest.setup.ts is reintroduced testEnvironment: "jsdom", + transformIgnorePatterns: [`/node_modules/(?!(${esModules.join("|")})/)`], } -export default createJestConfig(config) +module.exports = async () => { + const jestConfig = await createJestConfig(customConfig)() + return { + ...jestConfig, + transformIgnorePatterns: + jestConfig.transformIgnorePatterns?.filter( + (ptn) => ptn !== "/node_modules/", + ) ?? [], + } +} diff --git a/lib/interactive_handlers/postFromWeb.ts b/lib/interactive_handlers/postFromWeb.ts index a81d02c..f1d7d68 100644 --- a/lib/interactive_handlers/postFromWeb.ts +++ b/lib/interactive_handlers/postFromWeb.ts @@ -8,9 +8,9 @@ import { } from "../_utils_server" import { buildQuestionBlocks } from "../blocks-designs/question" import prisma from "../prisma" -import { assertHasAccess } from "../web/question_router" import { getQuestionIdFromUrl } from "../web/question_url" import { getTournamentUrl, getUserListUrl } from "../web/utils" +import { assertHasAccess } from "../web/question_router/assert" export async function postFromWeb( relativePath: string, diff --git a/lib/web/app_router.ts b/lib/web/app_router.ts index 60ff9dc..6f7947e 100644 --- a/lib/web/app_router.ts +++ b/lib/web/app_router.ts @@ -9,15 +9,17 @@ import { import prisma from "../prisma" import { feedbackRouter } from "./feedback_router" import { importRouter } from "./import_router" -import { questionRouter } from "./question_router" import { tagsRouter } from "./tags_router" import { tournamentRouter } from "./tournament_router" import { getClientBaseUrl } from "./trpc" import { publicProcedure, router } from "./trpc_base" import { userListRouter } from "./userList_router" +import { questionRouter } from "./question_router/v1/question_router" +import { questionRouter as legacyQuestionRouter } from "./question_router/v0/question_router" export const appRouter = router({ question: questionRouter, + legacyQuestion: legacyQuestionRouter, userList: userListRouter, tags: tagsRouter, import: importRouter, diff --git a/lib/web/question_router/__tests__/assert.test.ts b/lib/web/question_router/__tests__/assert.test.ts new file mode 100644 index 0000000..e4b59e7 --- /dev/null +++ b/lib/web/question_router/__tests__/assert.test.ts @@ -0,0 +1,183 @@ +import { User } from "@prisma/client" +import { TRPCError } from "@trpc/server" +import { QuestionWithForecastsAndSharedWithAndLists } from "../../../../prisma/additional" +import { assertHasAccess } from "../assert" + +describe("assertHasAccess", () => { + const mockUser: User = { + id: "user1", + email: "user1@user1domain.com", + name: "User One", + image: null, + createdAt: new Date(), + staleReminder: false, + unsubscribedFromEmailsAt: null, + apiKey: null, + discordUserId: null, + emailVerified: null, + } + + const mockOtherUser: User = { + id: "user2", + email: "user2@user2domain.com", + name: "User Two", + image: null, + createdAt: new Date(), + staleReminder: false, + unsubscribedFromEmailsAt: null, + apiKey: null, + discordUserId: null, + emailVerified: null, + } + + const mockQuestion: QuestionWithForecastsAndSharedWithAndLists = { + id: "1", + title: "Test Question", + userId: "user2", + createdAt: new Date(), + comment: null, + profileId: null, + type: "BINARY", + resolveBy: new Date(), + resolved: false, + pingedForResolution: false, + resolution: null, + resolvedAt: null, + notes: null, + hideForecastsUntil: null, + exclusiveAnswers: null, + sharedPublicly: false, + sharedWith: [], + sharedWithLists: [], + forecasts: [], + hideForecastsUntilPrediction: null, + unlisted: false, + } + + it("should throw error if question is null", () => { + expect(() => assertHasAccess(null, mockUser)).toThrow(TRPCError) + }) + + it("should not throw error if question is shared publicly", () => { + const publicQuestion = { ...mockQuestion, sharedPublicly: true } + expect(() => assertHasAccess(publicQuestion, mockUser)).not.toThrow() + }) + + it("should not throw error if user is the question owner", () => { + const ownedQuestion = { ...mockQuestion, userId: "user1" } + expect(() => assertHasAccess(ownedQuestion, mockUser)).not.toThrow() + }) + + it("should throw error if user has no access", () => { + expect(() => assertHasAccess(mockQuestion, mockUser)).toThrow(TRPCError) + }) + + it("should not throw error if question is shared with user", () => { + const sharedQuestion = { + ...mockQuestion, + sharedWith: [ + { + id: "user1", + name: "User One", + createdAt: new Date(), + email: "user1@example.com", + image: null, + staleReminder: false, + unsubscribedFromEmailsAt: null, + apiKey: "apiKey1", + discordUserId: null, + emailVerified: null, + }, + ], + } + expect(() => assertHasAccess(sharedQuestion, mockUser)).not.toThrow() + }) + + it("should not throw error if user is in a userList that the question is shared with", () => { + const sharedQuestion = { + ...mockQuestion, + sharedWithLists: [ + { + id: "list1", + name: "Test List", + createdAt: new Date(), + userId: "otherUser", + inviteId: null, + emailDomains: [], + syncToSlackTeamId: null, + syncToSlackChannelId: null, + authorId: "otherUser", + author: mockOtherUser, + users: [mockUser], + }, + ], + } + expect(() => assertHasAccess(sharedQuestion, mockUser)).not.toThrow() + }) + + it("should not throw error if user is the author of a userList that the question is shared with", () => { + const sharedQuestion = { + ...mockQuestion, + sharedWithLists: [ + { + id: "list1", + name: "Test List", + createdAt: new Date(), + userId: "user1", + inviteId: null, + emailDomains: [], + syncToSlackTeamId: null, + syncToSlackChannelId: null, + authorId: "user1", + author: mockUser, + users: [mockOtherUser], + }, + ], + } + expect(() => assertHasAccess(sharedQuestion, mockUser)).not.toThrow() + }) + + it("should not throw error if user's email domain is in a userList the question is shared with", () => { + const sharedQuestion = { + ...mockQuestion, + sharedWithLists: [ + { + id: "list1", + name: "Test List", + createdAt: new Date(), + userId: "user2", + inviteId: null, + emailDomains: ["user1domain.com"], + syncToSlackTeamId: null, + syncToSlackChannelId: null, + authorId: "user2", + author: mockOtherUser, + users: [mockUser], + }, + ], + } + expect(() => assertHasAccess(sharedQuestion, mockUser)).not.toThrow() + }) + + it("should throw error if user's email domain is not in a userList the question is shared with", () => { + const sharedQuestion = { + ...mockQuestion, + sharedWithLists: [ + { + id: "list1", + name: "Test List", + createdAt: new Date(), + userId: "user2", + inviteId: null, + emailDomains: ["user2domain.com"], + syncToSlackTeamId: null, + syncToSlackChannelId: null, + authorId: "user2", + author: mockOtherUser, + users: [mockOtherUser], + }, + ], + } + expect(() => assertHasAccess(sharedQuestion, mockUser)).toThrow(TRPCError) + }) +}) diff --git a/lib/web/question_router/__tests__/email_shared.test.ts b/lib/web/question_router/__tests__/email_shared.test.ts new file mode 100644 index 0000000..2d8b8d0 --- /dev/null +++ b/lib/web/question_router/__tests__/email_shared.test.ts @@ -0,0 +1,110 @@ +import { emailNewlySharedWithUsers } from "../email_shared" +import prisma from "../../../prisma" +import { createNotification, sendEmailUnbatched } from "../../notifications" +import { getQuestionUrl } from "../../question_url" +import { QuestionWithUserAndSharedWith } from "../../../../prisma/additional" +import { QuestionType } from "@prisma/client" + +jest.mock("../../../prisma", () => ({ + user: { + findUnique: jest.fn(), + }, +})) + +jest.mock("../../notifications", () => ({ + createNotification: jest.fn(), + sendEmailUnbatched: jest.fn(), + fatebookEmailFooter: jest.fn().mockReturnValue(""), +})) + +jest.mock("../../question_url", () => ({ + getQuestionUrl: jest.fn(), +})) + +describe("emailNewlySharedWithUsers", () => { + const mockQuestion: QuestionWithUserAndSharedWith = { + id: "q1", + title: "Test Question", + user: { + id: "user-id", + name: "Test User", + email: "test@example.com", + createdAt: new Date(), + image: null, + staleReminder: false, + unsubscribedFromEmailsAt: null, + apiKey: null, + discordUserId: null, + emailVerified: null, + profiles: [], + }, + sharedWith: [], + createdAt: new Date(), + comment: null, + profileId: null, + type: QuestionType.BINARY, + resolveBy: new Date(), + resolved: false, + pingedForResolution: false, + exclusiveAnswers: null, + resolution: null, + resolvedAt: null, + notes: null, + hideForecastsUntil: null, + hideForecastsUntilPrediction: null, + userId: "u1", + sharedPublicly: false, + unlisted: false, + } as QuestionWithUserAndSharedWith + + beforeEach(() => { + jest.clearAllMocks() + ;(getQuestionUrl as jest.Mock).mockReturnValue("http://example.com/q1") + }) + + it("should create notification for existing users", async () => { + const existingUser = { id: "u2", email: "existing@example.com" } + ;(prisma.user.findUnique as jest.Mock).mockResolvedValue(existingUser) + + await emailNewlySharedWithUsers(["existing@example.com"], mockQuestion) + + expect(createNotification).toHaveBeenCalledWith({ + userId: "u2", + title: "Test User shared a prediction with you", + content: "Test User shared a prediction with you", + url: "http://example.com/q1", + tags: ["shared_prediction", "q1"], + questionId: "q1", + }) + expect(sendEmailUnbatched).not.toHaveBeenCalled() + }) + + it("should send email for non-existing users", async () => { + ;(prisma.user.findUnique as jest.Mock).mockResolvedValue(null) + + await emailNewlySharedWithUsers(["new@example.com"], mockQuestion) + + expect(sendEmailUnbatched).toHaveBeenCalledWith( + expect.objectContaining({ + to: "new@example.com", + subject: "Test User shared a prediction with you", + }), + ) + expect(createNotification).not.toHaveBeenCalled() + }) + + it("should handle multiple users", async () => { + const existingUser = { id: "u2", email: "existing@example.com" } + ;(prisma.user.findUnique as jest.Mock) + .mockResolvedValueOnce(existingUser) + .mockResolvedValueOnce(null) + + await emailNewlySharedWithUsers( + ["existing@example.com", "new@example.com"], + mockQuestion, + ) + + expect(createNotification).toHaveBeenCalledTimes(1) + expect(sendEmailUnbatched).toHaveBeenCalledTimes(1) + }) +}) diff --git a/lib/web/question_router/__tests__/get_questions.test.ts b/lib/web/question_router/__tests__/get_questions.test.ts new file mode 100644 index 0000000..b3f6acb --- /dev/null +++ b/lib/web/question_router/__tests__/get_questions.test.ts @@ -0,0 +1,154 @@ +import prisma from "../../../prisma" +import { Context } from "../../trpc_base" +import { getQuestionsUserCreatedOrForecastedOnOrIsSharedWith } from "../get_questions" +import { ExtraFilters } from "../types" + +jest.mock("../../../prisma", () => ({ + question: { + findMany: jest.fn(), + }, + user: { + findUnique: jest.fn(), + }, +})) + +jest.mock("../assert", () => ({ + assertHasAccess: jest.fn().mockReturnValue(true), +})) + +describe("getQuestionsUserCreatedOrForecastedOnOrIsSharedWith", () => { + const mockContext: Context = { + userId: "user1", + session: null, + } + + const mockInput = { + cursor: 0, + limit: 10, + } + + beforeEach(() => { + jest.clearAllMocks() + }) + + it("should return questions with default settings", async () => { + const mockQuestions = [ + { id: "q1", title: "Question 1" }, + { id: "q2", title: "Question 2" }, + ] + ;(prisma.question.findMany as jest.Mock).mockResolvedValue(mockQuestions) + + const result = await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + mockInput, + mockContext, + ) + + expect(result.items).toEqual(mockQuestions) + expect(result.nextCursor).toBeUndefined() + expect(prisma.question.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + skip: 0, + take: 11, + orderBy: { createdAt: "desc" }, + }), + ) + }) + + it("should handle pagination", async () => { + const mockQuestions = Array(11) + .fill(null) + .map((_, i) => ({ id: `q${i}`, title: `Question ${i}` })) + ;(prisma.question.findMany as jest.Mock).mockResolvedValue(mockQuestions) + + const result = await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + mockInput, + mockContext, + ) + + expect(result.items).toHaveLength(10) + expect(result.nextCursor).toBe(10) + }) + + it("should apply extra filters", async () => { + const extraFilters: ExtraFilters = { + resolved: true, + searchString: "test", + } + ;(prisma.question.findMany as jest.Mock).mockResolvedValue([]) + + await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + { ...mockInput, extraFilters }, + mockContext, + ) + + expect(prisma.question.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + where: expect.objectContaining({ + AND: expect.arrayContaining([ + expect.objectContaining({ + OR: [ + { userId: "user1" }, + { forecasts: { some: { userId: "user1" } } }, + { sharedWith: { some: { id: "user1" } } }, + { + sharedWithLists: { + some: { + OR: [ + { authorId: "user1" }, + { users: expect.anything() }, + { emailDomains: expect.anything() }, + ], + }, + }, + }, + ], + }), + { resolution: { not: null } }, + expect.objectContaining({ + OR: expect.arrayContaining([ + { title: { contains: "test", mode: "insensitive" } }, + { + comments: { + some: { + comment: { contains: "test", mode: "insensitive" }, + }, + }, + }, + { + tags: { + some: { + name: { contains: "test", mode: "insensitive" }, + userId: "user1", + }, + }, + }, + ]), + }), + ]), + }), + }), + ) + }) + + it("should handle showAllPublic filter", async () => { + const extraFilters: ExtraFilters = { + showAllPublic: true, + } + ;(prisma.question.findMany as jest.Mock).mockResolvedValue([]) + + await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + { ...mockInput, extraFilters }, + mockContext, + ) + + expect(prisma.question.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + where: expect.objectContaining({ + AND: expect.arrayContaining([ + { AND: [{ sharedPublicly: true }, { unlisted: false }] }, + ]), + }), + }), + ) + }) +}) diff --git a/lib/web/question_router/__tests__/get_user.test.ts b/lib/web/question_router/__tests__/get_user.test.ts new file mode 100644 index 0000000..5fe2f78 --- /dev/null +++ b/lib/web/question_router/__tests__/get_user.test.ts @@ -0,0 +1,75 @@ +import { + getUserByApiKeyOrThrow, + getUserFromCtxOrApiKeyOrThrow, +} from "../get_user" +import { TRPCError } from "@trpc/server" +import prisma from "../../../prisma" + +jest.mock("../../../prisma", () => ({ + user: { + findFirst: jest.fn(), + findUnique: jest.fn(), + }, +})) + +describe("getUserByApiKeyOrThrow", () => { + it("should return user if found", async () => { + const mockUser = { id: "user1", apiKey: "validKey" } + ;(prisma.user.findFirst as jest.Mock).mockResolvedValue(mockUser) + + const result = await getUserByApiKeyOrThrow("validKey") + expect(result).toEqual(mockUser) + }) + + it("should throw error if user not found", async () => { + ;(prisma.user.findFirst as jest.Mock).mockResolvedValue(null) + + await expect(getUserByApiKeyOrThrow("invalidKey")).rejects.toThrow( + TRPCError, + ) + }) +}) + +describe("getUserFromCtxOrApiKeyOrThrow", () => { + it("should return user from context if userId is present", async () => { + const mockUser = { id: "user1" } + ;(prisma.user.findUnique as jest.Mock).mockResolvedValue(mockUser) + + const result = await getUserFromCtxOrApiKeyOrThrow( + { userId: "user1", session: null }, + undefined, + ) + expect(result).toEqual(mockUser) + }) + + it("should throw error if user not found in context", async () => { + ;(prisma.user.findUnique as jest.Mock).mockResolvedValue(null) + + await expect( + getUserFromCtxOrApiKeyOrThrow( + { userId: "invalidUser", session: null }, + undefined, + ), + ).rejects.toThrow(TRPCError) + }) + + it("should use apiKey if userId is not in context", async () => { + const mockUser = { id: "user1", apiKey: "validKey" } + ;(prisma.user.findFirst as jest.Mock).mockResolvedValue(mockUser) + + const result = await getUserFromCtxOrApiKeyOrThrow( + { userId: undefined, session: null }, + "validKey", + ) + expect(result).toEqual(mockUser) + }) + + it("should throw error if neither userId nor apiKey is provided", async () => { + await expect( + getUserFromCtxOrApiKeyOrThrow( + { userId: undefined, session: null }, + undefined, + ), + ).rejects.toThrow(TRPCError) + }) +}) diff --git a/lib/web/question_router/__tests__/scrub.test.ts b/lib/web/question_router/__tests__/scrub.test.ts new file mode 100644 index 0000000..eeaa62b --- /dev/null +++ b/lib/web/question_router/__tests__/scrub.test.ts @@ -0,0 +1,104 @@ +import { Decimal } from "@prisma/client/runtime/library" +import { QuestionWithForecasts } from "../../../../prisma/additional" +import { + scrubApiKeyPropertyRecursive, + scrubHiddenForecastsAndSensitiveDetailsFromQuestion, +} from "../scrub" + +describe("scrubHiddenForecastsAndSensitiveDetailsFromQuestion", () => { + const mockQuestion: QuestionWithForecasts = { + id: "1", + title: "Test Question", + userId: "user1", + hideForecastsUntilPrediction: true, + forecasts: [ + { + id: 1, + userId: "user1", + forecast: new Decimal(0.5), + createdAt: new Date(), + comment: null, + profileId: null, + questionId: "1", + optionId: null, + }, + { + id: 2, + userId: "user2", + forecast: new Decimal(0.7), + createdAt: new Date(), + comment: null, + profileId: null, + questionId: "1", + optionId: null, + }, + ], + createdAt: new Date(), + comment: null, + profileId: null, + type: "BINARY", + resolveBy: new Date(), + resolved: false, + pingedForResolution: false, + exclusiveAnswers: null, + resolution: null, + resolvedAt: null, + notes: null, + hideForecastsUntil: null, + unlisted: false, + sharedPublicly: false, + sharedWith: [], + sharedWithLists: [], + } as QuestionWithForecasts + + it("should show your and other user's predictions if you've predicted", () => { + const result = scrubHiddenForecastsAndSensitiveDetailsFromQuestion( + mockQuestion, + "user1", + ) + expect(result.forecasts[0].forecast).toStrictEqual(new Decimal(0.5)) + expect(result.forecasts[1].forecast).toStrictEqual(new Decimal(0.7)) + }) + + it("should scrub all forecasts if you haven't predicted", () => { + const result = scrubHiddenForecastsAndSensitiveDetailsFromQuestion( + mockQuestion, + "user3", + ) + expect(result.forecasts[0].forecast).toBeNull() + expect(result.forecasts[1].forecast).toBeNull() + }) + + it("should scrub all forecasts when no user is provided", () => { + const result = scrubHiddenForecastsAndSensitiveDetailsFromQuestion( + mockQuestion, + undefined, + ) + expect(result.forecasts[0].forecast).toBeNull() + expect(result.forecasts[1].forecast).toBeNull() + }) +}) + +describe("scrubApiKeyPropertyRecursive", () => { + it("should remove apiKey from object", () => { + const obj = { name: "Test", apiKey: "12345", nested: { apiKey: "67890" } } + const result = scrubApiKeyPropertyRecursive(obj) + expect(result.apiKey).toBeUndefined() + expect(result.nested.apiKey).toBeUndefined() + expect(result.name).toBe("Test") + }) + + it("should remove specified keys", () => { + const obj = { + name: "Test", + email: "test@example.com", + apiKey: "12345", + nested: { email: "another@example.com" }, + } + const result = scrubApiKeyPropertyRecursive(obj, ["email"]) + expect(result.apiKey).toBeUndefined() + expect(result.email).toBeUndefined() + expect(result.name).toBe("Test") + expect(result.nested.email).toBeUndefined() + }) +}) diff --git a/lib/web/question_router/assert.ts b/lib/web/question_router/assert.ts new file mode 100644 index 0000000..bd9652a --- /dev/null +++ b/lib/web/question_router/assert.ts @@ -0,0 +1,73 @@ +import { Prisma, User } from "@prisma/client" +import { TRPCError } from "@trpc/server" +import { + QuestionWithForecasts, + QuestionWithForecastsAndSharedWithAndLists, +} from "../../../prisma/additional" +import prisma from "../../prisma" +import { getUserByApiKeyOrThrow } from "./get_user" + +export async function getQuestionAssertAuthor( + ctx: { userId: string | undefined }, + questionId: string, + apiKey?: string, + questionInclude?: Prisma.QuestionInclude, +) { + const question = await prisma.question.findUnique({ + where: { + id: questionId, + }, + include: questionInclude, + }) + + const userId = ctx?.userId || (await getUserByApiKeyOrThrow(apiKey || "")).id + + if (!userId) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "You must be logged in to do that", + }) + } + if (!question) { + throw new TRPCError({ code: "NOT_FOUND", message: "Question not found" }) + } + if (question.userId !== userId) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "Only the question's author can do that", + }) + } + + return question +} + +export function assertHasAccess( + question: QuestionWithForecastsAndSharedWithAndLists | null, + user: User | null, +) { + if (question === null) { + throw new TRPCError({ code: "NOT_FOUND", message: "Question not found" }) + } + + const userId = user?.id || "NO MATCH" + + if ( + question.sharedPublicly || + question.sharedWith.some((u) => u.id === userId) || + question.sharedWithLists.some( + (l) => + l.users.some((u) => u.id === userId) || + l.authorId === userId || + l.emailDomains.some((ed) => user && user.email.endsWith(ed)), + ) || + question.userId === userId || + question.forecasts.some((f) => f.userId === userId) // for slack questions + ) { + return question as QuestionWithForecasts + } else { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "You don't have access to that question", + }) + } +} diff --git a/lib/web/question_router/email_shared.ts b/lib/web/question_router/email_shared.ts new file mode 100644 index 0000000..ac0de20 --- /dev/null +++ b/lib/web/question_router/email_shared.ts @@ -0,0 +1,44 @@ +import { QuestionWithUserAndSharedWith } from "../../../prisma/additional" +import prisma from "../../prisma" +import { + createNotification, + fatebookEmailFooter, + sendEmailUnbatched, +} from "../notifications" +import { getQuestionUrl } from "../question_url" +import { getHtmlLinkQuestionTitle } from "../utils" + +export async function emailNewlySharedWithUsers( + newlySharedWith: string[], + question: QuestionWithUserAndSharedWith, +) { + await Promise.all( + newlySharedWith.map(async (email) => { + const author = question.user.name || question.user.email + const user = await prisma.user.findUnique({ where: { email } }) + if (user) { + await createNotification({ + userId: user.id, + title: `${author} shared a prediction with you`, + content: `${author} shared a prediction with you`, + url: getQuestionUrl(question), + tags: ["shared_prediction", question.id], + questionId: question.id, + }) + } else { + await sendEmailUnbatched({ + to: email, + subject: `${author} shared a prediction with you`, + textBody: `"${question.title}"`, + htmlBody: `

${author} shared a prediction with you: ${getHtmlLinkQuestionTitle( + question, + )}

+

See ${author}'s prediction and add your own on Fatebook.

+${fatebookEmailFooter()}`, + }) + } + }), + ) +} diff --git a/lib/web/question_router/get_questions.ts b/lib/web/question_router/get_questions.ts new file mode 100644 index 0000000..d6237b0 --- /dev/null +++ b/lib/web/question_router/get_questions.ts @@ -0,0 +1,263 @@ +import SlackNotify from "slack-notify" +import prisma from "../../prisma" +import { Context } from "../trpc_base" +import { getSearchedPredictionBounds, matchesAnEmailDomain } from "../utils" +import { assertHasAccess } from "./assert" +import { scrubHiddenForecastsAndSensitiveDetailsFromQuestion } from "./scrub" +import { ExtraFilters, questionIncludes } from "./types" + +export async function getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + input: { + cursor: number + limit?: number | null | undefined + extraFilters?: ExtraFilters | undefined + }, + ctx: Context, +) { + const limit = input.limit || 100 + + const skip = input.cursor + const userIdIfAuthed = ctx.userId || "no user id, don't match" // because of prisma undefined rules + + const user = ctx.userId + ? await prisma.user.findUnique({ where: { id: userIdIfAuthed } }) + : null + + const searchedPredictionBounds = getSearchedPredictionBounds( + input.extraFilters?.searchString, + ) + + const questions = await prisma.question.findMany({ + skip: skip, + take: limit + 1, + orderBy: input.extraFilters?.resolvingSoon + ? { + resolveBy: "asc", + } + : input.extraFilters?.filterTournamentId + ? { + createdAt: "asc", + } + : { + createdAt: "desc", + }, + where: { + AND: [ + input.extraFilters?.showAllPublic + ? { + AND: [{ sharedPublicly: true }, { unlisted: false }], + } + : input.extraFilters?.theirUserId || + input.extraFilters?.filterTournamentId + ? { + // show public, not unlisted questions by the user, and questions they've shared with me + userId: input.extraFilters.theirUserId, + tournaments: input.extraFilters.filterTournamentId + ? { + some: { + id: input.extraFilters.filterTournamentId, + }, + } + : undefined, + OR: [ + { + sharedPublicly: true, + unlisted: input.extraFilters?.filterTournamentId + ? undefined + : false, + }, + { sharedWith: { some: { id: userIdIfAuthed } } }, + { + sharedWithLists: { + some: { + OR: [ + { authorId: userIdIfAuthed }, + { users: { some: { id: userIdIfAuthed } } }, + matchesAnEmailDomain(user), + ], + }, + }, + }, + input.extraFilters.filterTournamentId + ? { userId: userIdIfAuthed } + : {}, + ], + } + : input.extraFilters?.filterUserListId + ? { + OR: [ + { + sharedWithLists: { + some: { + id: input.extraFilters.filterUserListId, + OR: [ + { authorId: userIdIfAuthed }, + { users: { some: { id: userIdIfAuthed } } }, + matchesAnEmailDomain(user), + ], + }, + }, + }, + // if the question is in a tournament shared with the user list, also include it + { + tournaments: { + some: { + userList: { + id: input.extraFilters?.filterUserListId, + OR: [ + { authorId: userIdIfAuthed }, + { users: { some: { id: userIdIfAuthed } } }, + matchesAnEmailDomain(user), + ], + }, + }, + }, + }, + ], + } + : { + // only show questions I've created, forecasted on, or are shared with me + OR: [ + { userId: ctx.userId }, + { + forecasts: { + some: { + userId: ctx.userId, + }, + }, + }, + { + sharedWith: { + some: { + id: ctx.userId, + }, + }, + }, + { + sharedWithLists: { + some: { + OR: [ + { authorId: userIdIfAuthed }, + { users: { some: { id: userIdIfAuthed } } }, + matchesAnEmailDomain(user), + ], + }, + }, + }, + ], + }, + input.extraFilters?.resolved + ? { + resolution: { + not: null, + }, + } + : {}, + input.extraFilters?.unresolved + ? { + resolution: null, + } + : {}, + input.extraFilters?.readyToResolve + ? { + resolution: null, + resolveBy: { + lte: new Date(), + }, + } + : {}, + input.extraFilters?.resolvingSoon + ? { + resolveBy: { + gte: new Date(), + }, + resolution: null, + } + : {}, + input.extraFilters?.filterTagIds + ? { + tags: { + some: { + id: { + in: input.extraFilters.filterTagIds, + }, + }, + }, + } + : {}, + searchedPredictionBounds + ? { + forecasts: { + some: { + userId: userIdIfAuthed, + forecast: { + gte: searchedPredictionBounds.lowerBound / 100, + lte: searchedPredictionBounds.upperBound / 100, + }, + }, + }, + } + : input.extraFilters?.searchString + ? { + OR: [ + { + title: { + contains: input.extraFilters.searchString, + mode: "insensitive", + }, + }, + { + comments: { + some: { + comment: { + contains: input.extraFilters.searchString, + mode: "insensitive", + }, + }, + }, + }, + { + tags: { + some: { + name: { + contains: input.extraFilters.searchString, + mode: "insensitive", + }, + userId: userIdIfAuthed, + }, + }, + }, + ], + } + : {}, + ], + }, + include: questionIncludes(ctx.userId), + }) + + // double check that we're not returning questions that the user doesn't have access to + // should never be necessary, but just as a sanity check + const questionsWithAccess = questions.filter((q) => assertHasAccess(q, user)) + if (questionsWithAccess.length !== questions.length) { + const questionsWithoutAccess = questions.filter( + (q) => !questionsWithAccess.includes(q), + ) + const message = `Important warning: ${user?.id || "logged out user"} was prevented from being returned ${questionsWithoutAccess.map((q) => q.id).join(", ")} by assertHasAccess, need to correct getQuestions[...] func` + await SlackNotify(process.env.SAGE_SLACK_WEBHOOK_URL || "").send({ + text: message, + unfurl_links: 0, + }) + console.error(message) + } + + return { + items: questionsWithAccess + .map((q) => + scrubHiddenForecastsAndSensitiveDetailsFromQuestion(q, ctx.userId), + ) + // don't include the extra one - it's just to see if there's another page + .slice(0, limit), + + nextCursor: questionsWithAccess.length > limit ? skip + limit : undefined, + } +} diff --git a/lib/web/question_router/get_user.ts b/lib/web/question_router/get_user.ts new file mode 100644 index 0000000..bda5d5c --- /dev/null +++ b/lib/web/question_router/get_user.ts @@ -0,0 +1,46 @@ +import prisma from "../../prisma" +import { Context } from "../trpc_base" +import { TRPCError } from "@trpc/server" + +export async function getUserByApiKeyOrThrow(apiKey: string) { + const user = await prisma.user.findFirst({ + where: { + apiKey, + }, + }) + if (user) { + return user + } + throw new TRPCError({ + code: "UNAUTHORIZED", + message: + "Could not find a user with that API key. See fatebook.io/api-setup", + }) +} + +export async function getUserFromCtxOrApiKeyOrThrow( + ctx: Context, + apiKey: string | undefined, +) { + if (ctx.userId) { + const user = await prisma.user.findUnique({ + where: { id: ctx.userId || "NO MATCH" }, + }) + if (!user) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "Could not find a user with that ID", + }) + } + return user + } + + if (!apiKey) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "You must provide an API key. See fatebook.io/api-setup", + }) + } + + return await getUserByApiKeyOrThrow(apiKey) +} diff --git a/lib/web/question_router/scrub.ts b/lib/web/question_router/scrub.ts new file mode 100644 index 0000000..335becd --- /dev/null +++ b/lib/web/question_router/scrub.ts @@ -0,0 +1,47 @@ +import { QuestionWithForecasts } from "../../../prisma/additional" +import { forecastsAreHidden } from "../../_utils_common" + +export function scrubHiddenForecastsAndSensitiveDetailsFromQuestion< + QuestionX extends QuestionWithForecasts, +>(question: QuestionX, userId: string | undefined) { + question = scrubApiKeyPropertyRecursive(question, ["email", "discordUserId"]) + + if (!forecastsAreHidden(question, userId)) { + return question + } + + return { + ...question, + forecasts: question.forecasts.map((f) => { + const hideForecast = f.userId !== userId || !userId + return { + ...f, + ...(hideForecast + ? { + forecast: null, + userId: null, + user: null, + profileId: null, + profile: null, + options: null, + } + : {}), + } + }), + } +} + +export function scrubApiKeyPropertyRecursive( + obj: T, + otherKeysToScrub?: string[], +) { + // warning - this mutates the object + for (const key in obj) { + if (key === "apiKey" || otherKeysToScrub?.includes(key)) { + ;(obj as any)[key] = undefined + } else if (typeof obj[key] === "object") { + obj[key] = scrubApiKeyPropertyRecursive(obj[key], otherKeysToScrub) + } + } + return obj +} diff --git a/lib/web/question_router/types.ts b/lib/web/question_router/types.ts new file mode 100644 index 0000000..5de5b20 --- /dev/null +++ b/lib/web/question_router/types.ts @@ -0,0 +1,93 @@ +import { z } from "zod" + +export const questionIncludes = (userId: string | undefined) => ({ + forecasts: { + include: { + user: true, + }, + }, + options: { + include: { + forecasts: { + include: { + user: true, + }, + }, + }, + }, + user: true, + sharedWith: true, + sharedWithLists: { + include: { + author: true, + users: true, + }, + }, + questionMessages: { + include: { + message: true, + }, + }, + comments: { + include: { + user: true, + }, + }, + tags: { + where: { + user: { + id: + userId || "match with no users (because no user with this ID exists)", + }, + }, + }, +}) + +export const zodExtraFilters = z.object({ + resolved: z + .boolean({ description: "Only get resolved questions" }) + .optional(), + unresolved: z + .boolean({ description: "Only get unresolved questions" }) + .optional(), + readyToResolve: z + .boolean({ description: "Only get questions ready to be resolved" }) + .optional(), + resolvingSoon: z + .boolean({ description: "Only get questions that are resolving soon" }) + .optional(), + filterTagIds: z + .array( + z.string({ description: "Only get questions with any of these tags" }), + ) + .optional(), + showAllPublic: z + .boolean({ + description: + "Show all public questions from fatebook.io/public (if false, get only questions you've created, forecasted on, or are shared with you)", + }) + .optional(), + searchString: z + .string({ + description: "Only get questions or tags containing this search string", + }) + .optional(), + theirUserId: z + .string({ + description: + "Show questions created by this user (instead of your questions)", + }) + .optional(), + filterTournamentId: z + .string({ + description: + "Show questions in this tournament (instead of your questions)", + }) + .optional(), + filterUserListId: z + .string({ + description: "Show questions in this team (instead of your questions)", + }) + .optional(), +}) +export type ExtraFilters = z.infer diff --git a/lib/web/question_router.ts b/lib/web/question_router/v0/question_router.ts similarity index 68% rename from lib/web/question_router.ts rename to lib/web/question_router/v0/question_router.ts index 09f3b26..4fb22ee 100644 --- a/lib/web/question_router.ts +++ b/lib/web/question_router/v0/question_router.ts @@ -1,136 +1,43 @@ -import { Prisma, QuestionType, Tag, User } from "@prisma/client" +import { QuestionType, Tag } from "@prisma/client" import { Decimal } from "@prisma/client/runtime/library" import { TRPCError } from "@trpc/server" import { z } from "zod" -import { getBucketedForecasts } from "../../pages/api/calibration_graph" -import { - QuestionWithForecasts, - QuestionWithForecastsAndSharedWithAndLists, - QuestionWithUserAndSharedWith, -} from "../../prisma/additional" +import { getBucketedForecasts } from "../../../../pages/api/calibration_graph" +import { QuestionWithUserAndSharedWith } from "../../../../prisma/additional" import { displayForecast, filterToUniqueIds, forecastsAreHidden, getDateYYYYMMDD, -} from "../_utils_common" +} from "../../../_utils_common" import { backendAnalyticsEvent, updateForecastQuestionMessages, -} from "../_utils_server" -import { deleteQuestion } from "../interactive_handlers/edit_question_modal" -import { syncToSlackIfNeeded } from "../interactive_handlers/postFromWeb" +} from "../../../_utils_server" +import { deleteQuestion } from "../../../interactive_handlers/edit_question_modal" +import { syncToSlackIfNeeded } from "../../../interactive_handlers/postFromWeb" import { handleQuestionResolution, undoQuestionOptionResolution, undoQuestionResolution, -} from "../interactive_handlers/resolve" -import prisma from "../prisma" -import { questionsToCsv } from "./export" +} from "../../../interactive_handlers/resolve" +import prisma from "../../../prisma" +import { questionsToCsv } from "../../export" +import { createNotification } from "../../notifications" +import { getQuestionUrl } from "../../question_url" +import { publicProcedure, router } from "../../trpc_base" +import { zodExtraFilters } from "../types" +import { getQuestionsUserCreatedOrForecastedOnOrIsSharedWith } from "../get_questions" +import { assertHasAccess, getQuestionAssertAuthor } from "../assert" import { - createNotification, - fatebookEmailFooter, - sendEmailUnbatched, -} from "./notifications" -import { getQuestionUrl } from "./question_url" -import { Context, publicProcedure, router } from "./trpc_base" + getUserByApiKeyOrThrow, + getUserFromCtxOrApiKeyOrThrow, +} from "../get_user" +import { emailNewlySharedWithUsers } from "../email_shared" import { - getHtmlLinkQuestionTitle, - getSearchedPredictionBounds, - matchesAnEmailDomain, -} from "./utils" - -const questionIncludes = (userId: string | undefined) => ({ - forecasts: { - include: { - user: true, - }, - }, - options: { - include: { - forecasts: { - include: { - user: true, - }, - }, - }, - }, - user: true, - sharedWith: true, - sharedWithLists: { - include: { - author: true, - users: true, - }, - }, - questionMessages: { - include: { - message: true, - }, - }, - comments: { - include: { - user: true, - }, - }, - tags: { - where: { - user: { - id: - userId || "match with no users (because no user with this ID exists)", - }, - }, - }, -}) - -const zodExtraFilters = z.object({ - resolved: z - .boolean({ description: "Only get resolved questions" }) - .optional(), - unresolved: z - .boolean({ description: "Only get unresolved questions" }) - .optional(), - readyToResolve: z - .boolean({ description: "Only get questions ready to be resolved" }) - .optional(), - resolvingSoon: z - .boolean({ description: "Only get questions that are resolving soon" }) - .optional(), - filterTagIds: z - .array( - z.string({ description: "Only get questions with any of these tags" }), - ) - .optional(), - showAllPublic: z - .boolean({ - description: - "Show all public questions from fatebook.io/public (if false, get only questions you've created, forecasted on, or are shared with you)", - }) - .optional(), - searchString: z - .string({ - description: "Only get questions or tags containing this search string", - }) - .optional(), - theirUserId: z - .string({ - description: - "Show questions created by this user (instead of your questions)", - }) - .optional(), - filterTournamentId: z - .string({ - description: - "Show questions in this tournament (instead of your questions)", - }) - .optional(), - filterUserListId: z - .string({ - description: "Show questions in this team (instead of your questions)", - }) - .optional(), -}) -export type ExtraFilters = z.infer + scrubApiKeyPropertyRecursive, + scrubHiddenForecastsAndSensitiveDetailsFromQuestion, +} from "../scrub" export const questionRouter = router({ getQuestion: publicProcedure @@ -319,6 +226,7 @@ export const questionRouter = router({ path: "/v0/getQuestions", description: "By default, this fetches all questions that you've created, forecasted on, or are shared with you. Alternatively, if you set showAllPublic to true, it fetches all public questions from fatebook.io/public.", + tags: ["v0"], }, }) .output( @@ -601,6 +509,7 @@ export const questionRouter = router({ apiKey: "your_api_key_here", }, }, + tags: ["v0"], }, }) .output(z.undefined()) @@ -666,6 +575,7 @@ export const questionRouter = router({ path: "/v0/setSharedPublicly", description: "Change the visibility of the question. The 'sharedPublicly' parameter sets whether the question is accessible to anyone via a direct link. The 'unlisted' parameter sets whether the question is visible on fatebook.io/public", + tags: ["v0"], }, }) .output(z.undefined()) @@ -871,6 +781,7 @@ export const questionRouter = router({ apiKey: "your_api_key_here", }, }, + tags: ["v0"], }, }) .mutation(async ({ input, ctx }) => { @@ -1053,6 +964,7 @@ export const questionRouter = router({ apiKey: "your_api_key_here", }, }, + tags: ["v0"], }, }) .mutation(async ({ input, ctx }) => { @@ -1265,7 +1177,13 @@ export const questionRouter = router({ }), ) .output(z.undefined()) - .meta({ openapi: { method: "DELETE", path: "/v0/deleteQuestion" } }) + .meta({ + openapi: { + method: "DELETE", + path: "/v0/deleteQuestion", + tags: ["v0"], + } + }) .mutation(async ({ input, ctx }) => { await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) @@ -1287,7 +1205,13 @@ export const questionRouter = router({ }), ) .output(z.undefined()) - .meta({ openapi: { method: "PATCH", path: "/v0/editQuestion" } }) + .meta({ + openapi: { + method: "PATCH", + path: "/v0/editQuestion", + tags: ["v0"], + } + }) .mutation(async ({ input, ctx }) => { await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) @@ -1354,426 +1278,3 @@ export const questionRouter = router({ return csv }), }) - -async function getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( - input: { - cursor: number - limit?: number | null | undefined - extraFilters?: ExtraFilters | undefined - }, - ctx: Context, -) { - const limit = input.limit || 100 - - const skip = input.cursor - const userIdIfAuthed = ctx.userId || "no user id, don't match" // because of prisma undefined rules - - const user = ctx.userId - ? await prisma.user.findUnique({ where: { id: userIdIfAuthed } }) - : null - - const searchedPredictionBounds = getSearchedPredictionBounds( - input.extraFilters?.searchString, - ) - - const questions = await prisma.question.findMany({ - skip: skip, - take: limit + 1, - orderBy: input.extraFilters?.resolvingSoon - ? { - resolveBy: "asc", - } - : input.extraFilters?.filterTournamentId - ? { - createdAt: "asc", - } - : { - createdAt: "desc", - }, - where: { - AND: [ - input.extraFilters?.showAllPublic - ? { - AND: [{ sharedPublicly: true }, { unlisted: false }], - } - : input.extraFilters?.theirUserId || - input.extraFilters?.filterTournamentId - ? { - // show public, not unlisted questions by the user, and questions they've shared with me - userId: input.extraFilters.theirUserId, - tournaments: input.extraFilters.filterTournamentId - ? { - some: { - id: input.extraFilters.filterTournamentId, - }, - } - : undefined, - OR: [ - { - sharedPublicly: true, - unlisted: input.extraFilters?.filterTournamentId - ? undefined - : false, - }, - { sharedWith: { some: { id: userIdIfAuthed } } }, - { - sharedWithLists: { - some: { - OR: [ - { authorId: userIdIfAuthed }, - { users: { some: { id: userIdIfAuthed } } }, - matchesAnEmailDomain(user), - ], - }, - }, - }, - input.extraFilters.filterTournamentId - ? { userId: userIdIfAuthed } - : {}, - ], - } - : input.extraFilters?.filterUserListId - ? { - OR: [ - { - sharedWithLists: { - some: { - id: input.extraFilters.filterUserListId, - OR: [ - { authorId: userIdIfAuthed }, - { users: { some: { id: userIdIfAuthed } } }, - matchesAnEmailDomain(user), - ], - }, - }, - }, - // if the question is in a tournament shared with the user list, also include it - { - tournaments: { - some: { - userList: { - id: input.extraFilters?.filterUserListId, - OR: [ - { authorId: userIdIfAuthed }, - { users: { some: { id: userIdIfAuthed } } }, - matchesAnEmailDomain(user), - ], - }, - }, - }, - }, - ], - } - : { - // only show questions I've created, forecasted on, or are shared with me - OR: [ - { userId: ctx.userId }, - { - forecasts: { - some: { - userId: ctx.userId, - }, - }, - }, - { - sharedWith: { - some: { - id: ctx.userId, - }, - }, - }, - { - sharedWithLists: { - some: { - OR: [ - { authorId: userIdIfAuthed }, - { users: { some: { id: userIdIfAuthed } } }, - matchesAnEmailDomain(user), - ], - }, - }, - }, - ], - }, - input.extraFilters?.resolved - ? { - resolution: { - not: null, - }, - } - : {}, - input.extraFilters?.unresolved - ? { - resolution: null, - } - : {}, - input.extraFilters?.readyToResolve - ? { - resolution: null, - resolveBy: { - lte: new Date(), - }, - } - : {}, - input.extraFilters?.resolvingSoon - ? { - resolveBy: { - gte: new Date(), - }, - resolution: null, - } - : {}, - input.extraFilters?.filterTagIds - ? { - tags: { - some: { - id: { - in: input.extraFilters.filterTagIds, - }, - }, - }, - } - : {}, - searchedPredictionBounds - ? { - forecasts: { - some: { - userId: userIdIfAuthed, - forecast: { - gte: searchedPredictionBounds.lowerBound / 100, - lte: searchedPredictionBounds.upperBound / 100, - }, - }, - }, - } - : input.extraFilters?.searchString - ? { - OR: [ - { - title: { - contains: input.extraFilters.searchString, - mode: "insensitive", - }, - }, - { - comments: { - some: { - comment: { - contains: input.extraFilters.searchString, - mode: "insensitive", - }, - }, - }, - }, - { - tags: { - some: { - name: { - contains: input.extraFilters.searchString, - mode: "insensitive", - }, - userId: userIdIfAuthed, - }, - }, - }, - ], - } - : {}, - ], - }, - include: questionIncludes(ctx.userId), - }) - - return { - items: questions - .map((q) => - scrubHiddenForecastsAndSensitiveDetailsFromQuestion(q, ctx.userId), - ) - // don't include the extra one - it's just to see if there's another page - .slice(0, limit), - - nextCursor: questions.length > limit ? skip + limit : undefined, - } -} - -export async function emailNewlySharedWithUsers( - newlySharedWith: string[], - question: QuestionWithUserAndSharedWith, -) { - await Promise.all( - newlySharedWith.map(async (email) => { - const author = question.user.name || question.user.email - const user = await prisma.user.findUnique({ where: { email } }) - if (user) { - await createNotification({ - userId: user.id, - title: `${author} shared a prediction with you`, - content: `${author} shared a prediction with you`, - url: getQuestionUrl(question), - tags: ["shared_prediction", question.id], - questionId: question.id, - }) - } else { - await sendEmailUnbatched({ - to: email, - subject: `${author} shared a prediction with you`, - textBody: `"${question.title}"`, - htmlBody: `

${author} shared a prediction with you: ${getHtmlLinkQuestionTitle( - question, - )}

-

See ${author}'s prediction and add your own on Fatebook.

-${fatebookEmailFooter()}`, - }) - } - }), - ) -} - -export async function getQuestionAssertAuthor( - ctx: { userId: string | undefined }, - questionId: string, - apiKey?: string, - questionInclude?: Prisma.QuestionInclude, -) { - const question = await prisma.question.findUnique({ - where: { - id: questionId, - }, - include: questionInclude, - }) - - const userId = ctx?.userId || (await getUserByApiKeyOrThrow(apiKey || "")).id - - if (!question) { - throw new TRPCError({ code: "NOT_FOUND", message: "Question not found" }) - } - if (question.userId !== userId) { - throw new TRPCError({ - code: "UNAUTHORIZED", - message: "Only the question's author can do that", - }) - } - - return question -} - -export function assertHasAccess( - question: QuestionWithForecastsAndSharedWithAndLists | null, - user: User | null, -) { - if (question === null) { - throw new TRPCError({ code: "NOT_FOUND", message: "Question not found" }) - } - - const userId = user?.id || "NO MATCH" - - if ( - question.sharedPublicly || - question.sharedWith.some((u) => u.id === userId) || - question.sharedWithLists.some( - (l) => - l.users.some((u) => u.id === userId) || - l.authorId === userId || - l.emailDomains.some((ed) => user && user.email.endsWith(ed)), - ) || - question.userId === userId || - question.forecasts.some((f) => f.userId === userId) // for slack questions - ) { - return question as QuestionWithForecasts - } else { - throw new TRPCError({ - code: "UNAUTHORIZED", - message: "You don't have access to that question", - }) - } -} - -export function scrubHiddenForecastsAndSensitiveDetailsFromQuestion< - QuestionX extends QuestionWithForecasts, ->(question: QuestionX, userId: string | undefined) { - question = scrubApiKeyPropertyRecursive(question, ["email", "discordUserId"]) - - if (!forecastsAreHidden(question, userId)) { - return question - } - - return { - ...question, - forecasts: question.forecasts.map((f) => { - const hideForecast = f.userId !== userId || !userId - return { - ...f, - ...(hideForecast - ? { - forecast: null, - userId: null, - user: null, - profileId: null, - profile: null, - options: null, - } - : {}), - } - }), - } -} - -export function scrubApiKeyPropertyRecursive( - obj: T, - otherKeysToScrub?: string[], -) { - // warning - this mutates the object - for (const key in obj) { - if (key === "apiKey" || otherKeysToScrub?.includes(key)) { - ;(obj as any)[key] = undefined - } else if (typeof obj[key] === "object") { - obj[key] = scrubApiKeyPropertyRecursive(obj[key], otherKeysToScrub) - } - } - return obj -} - -async function getUserByApiKeyOrThrow(apiKey: string) { - const user = await prisma.user.findFirst({ - where: { - apiKey, - }, - }) - if (user) { - return user - } - throw new TRPCError({ - code: "UNAUTHORIZED", - message: - "Could not find a user with that API key. See fatebook.io/api-setup", - }) -} - -async function getUserFromCtxOrApiKeyOrThrow( - ctx: Context, - apiKey: string | undefined, -) { - if (ctx.userId) { - const user = await prisma.user.findUnique({ - where: { id: ctx.userId || "NO MATCH" }, - }) - if (!user) { - throw new TRPCError({ - code: "UNAUTHORIZED", - message: "Could not find a user with that ID", - }) - } - return user - } - - if (!apiKey) { - throw new TRPCError({ - code: "UNAUTHORIZED", - message: "You must provide an API key. See fatebook.io/api-setup", - }) - } - - return await getUserByApiKeyOrThrow(apiKey) -} diff --git a/lib/web/question_router/v1/question_router.ts b/lib/web/question_router/v1/question_router.ts new file mode 100644 index 0000000..6671e8f --- /dev/null +++ b/lib/web/question_router/v1/question_router.ts @@ -0,0 +1,1518 @@ +import { QuestionType, Tag } from "@prisma/client" +import { Decimal } from "@prisma/client/runtime/library" +import { TRPCError } from "@trpc/server" +import { z } from "zod" +import { getBucketedForecasts } from "../../../../pages/api/calibration_graph" +import { QuestionWithUserAndSharedWith } from "../../../../prisma/additional" +import { + ForecastSchema, + QuestionSchema, +} from "../../../../prisma/generated/zod" +import { + displayForecast, + filterToUniqueIds, + forecastsAreHidden, + getDateYYYYMMDD, +} from "../../../_utils_common" +import { + backendAnalyticsEvent, + updateForecastQuestionMessages, +} from "../../../_utils_server" +import { deleteQuestion } from "../../../interactive_handlers/edit_question_modal" +import { syncToSlackIfNeeded } from "../../../interactive_handlers/postFromWeb" +import { + handleQuestionResolution, + undoQuestionOptionResolution, + undoQuestionResolution, +} from "../../../interactive_handlers/resolve" +import prisma from "../../../prisma" +import { questionsToCsv } from "../../export" +import { createNotification } from "../../notifications" +import { getQuestionUrl } from "../../question_url" +import { publicProcedure, router } from "../../trpc_base" +import { assertHasAccess, getQuestionAssertAuthor } from "../assert" +import { emailNewlySharedWithUsers } from "../email_shared" +import { getQuestionsUserCreatedOrForecastedOnOrIsSharedWith } from "../get_questions" +import { + getUserByApiKeyOrThrow, + getUserFromCtxOrApiKeyOrThrow, +} from "../get_user" +import { + scrubApiKeyPropertyRecursive, + scrubHiddenForecastsAndSensitiveDetailsFromQuestion, +} from "../scrub" +import { zodExtraFilters } from "../types" + +const exampleQuestionId = "clkqtczp00001l008qcrma6s7" + +export const questionRouter = router({ + getQuestion: publicProcedure + .input( + z.object({ + questionId: z + .string({ + description: "ID of the question to fetch", + }) + .optional(), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output(QuestionSchema) + .meta({ + openapi: { + method: "GET", + path: "/v1/getQuestion", + description: "Get the details of a specific question from its ID", + tags: ["v1"], + example: { + request: { + questionId: exampleQuestionId, + apiKey: "your_api_key_here", + }, + }, + }, + }) + .query(async ({ input, ctx }) => { + if (!input.questionId) { + return null as any // needed in order to appease type checker + } + + const user = await getUserFromCtxOrApiKeyOrThrow(ctx, input.apiKey) + + const question = await prisma.question.findUnique({ + where: { + id: input.questionId, + }, + include: { + forecasts: { + include: { + user: true, + }, + }, + options: { + include: { + forecasts: { + include: { + user: true, + }, + }, + user: true, + }, + }, + user: true, + sharedWith: true, + sharedWithLists: { + include: { + author: true, + users: true, + }, + }, + questionMessages: { + include: { + message: true, + }, + }, + comments: { + include: { + user: true, + }, + }, + ...(user.id + ? { + tags: { + where: { + user: { + id: user.id, + }, + }, + }, + } + : { + tags: { + where: { + id: { + in: [], + }, + }, + }, + }), + }, + }) + + assertHasAccess(question, user) + return ( + question && + scrubHiddenForecastsAndSensitiveDetailsFromQuestion(question, user.id) + ) + }), + + getQuestionsUserCreatedOrForecastedOnOrIsSharedWith: publicProcedure + .input( + z.object({ + limit: z.number().min(1).nullish(), + cursor: z.number(), + extraFilters: zodExtraFilters.optional(), + }), + ) + .query(async ({ input, ctx }) => { + if ( + !ctx.userId && + !input.extraFilters?.showAllPublic && + !input.extraFilters?.theirUserId && + !input.extraFilters?.filterTournamentId + ) { + return null + } + + return scrubApiKeyPropertyRecursive( + await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith(input, ctx), + [ + "email", + "discordUserId", + "apiKey", + "unsubscribedFromEmailsAt", + "emailVerified", + "staleReminder", + ], + ) + }), + + getOnboardingStage: publicProcedure.query(async ({ ctx }) => { + if (!ctx.userId) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "User not logged in", + }) + } + + const userId = ctx.userId + + const [hasCreatedQuestions, hasForecastsOnOwnQuestions] = await Promise.all( + [ + prisma.question.findFirst({ + where: { userId }, + select: { id: true }, + }), + prisma.forecast.findFirst({ + where: { + userId, + question: { + userId, + }, + }, + }), + ], + ) + + if (!hasCreatedQuestions) { + return "NO_QUESTIONS" + } + + if (!hasForecastsOnOwnQuestions) { + return "NO_FORECASTS_ON_OWN_QUESTIONS" + } + + return "COMPLETE" + }), + + getQuestionsApiProcedure: publicProcedure + .input( + z.object({ + apiKey: z.string({ + description: "Your Fatebook API key. Get it at fatebook.io/api-setup", + }), + ...{ + ...zodExtraFilters.shape, + filterTagIds: z + .string({ + description: + "Comma-separated list of tag IDs. Only get questions with at least one of these tags", + }) + .optional(), + }, + limit: z + .number({ + description: "Maximum number of questions to return. Default = 100", + }) + .optional(), + cursor: z + .number({ + description: + "Used for pagination. 0 = return the first [limit] questions, 100 = skip the first 100 questions and return the next [limit] questions.", + }) + .optional(), + }), + ) + .meta({ + openapi: { + method: "GET", + path: "/v1/getQuestions", + description: + "By default, this fetches all questions that you've created, forecasted on, or are shared with you. Alternatively, if you set showAllPublic to true, it fetches all public questions from fatebook.io/public.", + tags: ["v1"], + }, + }) + .output( + z.object({ + items: z.array(QuestionSchema), + nextCursor: z.number().optional(), + }), + ) + .query(async ({ input }) => { + const user = await getUserByApiKeyOrThrow(input.apiKey) + + const result = scrubApiKeyPropertyRecursive( + await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + { + cursor: input.cursor || 0, + limit: input.limit, + extraFilters: { + ...input, + filterTagIds: input.filterTagIds?.split(","), + }, + }, + { + userId: user.id, + session: null, + }, + ), + [ + "email", + "discordUserId", + "apiKey", + "unsubscribedFromEmailsAt", + "emailVerified", + "staleReminder", + ], + ) + + return { + items: result.items.map((item) => QuestionSchema.parse(item)), + nextCursor: result.nextCursor, + } + }), + + getForecastCountByDate: publicProcedure + .input( + z.object({ + tags: z.array(z.string()).optional(), + userId: z.string(), + }), + ) + .query(async ({ ctx, input }) => { + if (!input.userId) { + return null + } + + const forecasts = await prisma.forecast.findMany({ + where: { + AND: [ + { + userId: input.userId, + }, + input.tags && input.userId === ctx.userId && input.tags.length > 0 + ? { + question: { + tags: { + some: { + name: { + in: input.tags, + }, + userId: input.userId, + }, + }, + }, + } + : {}, + ], + }, + select: { + createdAt: true, + }, + orderBy: { + createdAt: "desc", + }, + }) + + // count number per day + const dateCounts = forecasts + .map((f) => getDateYYYYMMDD(f.createdAt)) + .reduce( + (acc, date) => { + acc[date] = (acc[date] || 0) + 1 + return acc + }, + {} as { [date: string]: number }, + ) + + return { dateCounts, total: forecasts.length } + }), + + create: publicProcedure + .input( + z.object({ + title: z.string(), + resolveBy: z.date({ + description: "Get a resolution reminder on this date", + }), + prediction: z + .number({ + description: "Your initial forecast between 0 and 1", + }) + .max(1) + .min(0) + .optional(), + tags: z.array(z.string()).optional(), + unlisted: z + .boolean({ + description: "Hide from fatebook.io/public", + }) + .optional(), + sharedPublicly: z + .boolean({ + description: "Allow anyone with the link to view", + }) + .optional(), + tournamentId: z + .string({ + description: "ID of a tournament to add this question to", + }) + .optional(), + shareWithListIds: z + .array( + z.string({ + description: "Team IDs to share this question with", + }), + ) + .optional(), + exclusiveAnswers: z + .boolean({ + description: + "For multiple choice: true = you can only resolve to one option", + }) + .optional(), + options: z + .array( + z.object({ + text: z.string({ + description: "Text for this multiple choice option", + }), + prediction: z + .number({ + description: "Your initial forecast for this option (0-1)", + }) + .min(0) + .max(1) + .optional(), + }), + ) + .optional(), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output( + z.object({ + url: z.string(), + title: z.string(), + prediction: z.number().min(0).max(1).optional(), + }), + ) + .meta({ + openapi: { + method: "POST", + path: "/v1/createQuestion", + description: "Create a new question (binary or multiple choice)", + tags: ["v1"], + example: { + request: { + "[Example of creating a binary question]": { + title: "Will it rain tomorrow?", + resolveBy: "2023-12-31T23:59:59Z", + prediction: 0.7, + tags: ["weather"], + unlisted: false, + sharedPublicly: true, + apiKey: "your_api_key_here", + }, + "[Example of creating a multiple choice question]": { + title: "Which team will win the World Cup?", + resolveBy: "2023-12-31T23:59:59Z", + options: [ + { text: "Brazil", prediction: 0.3 }, + { text: "Germany", prediction: 0.25 }, + { text: "France", prediction: 0.2 }, + { text: "Other", prediction: 0.25 }, + ], + tags: ["sports", "football"], + unlisted: false, + sharedPublicly: true, + apiKey: "your_api_key_here", + }, + }, + }, + }, + }) + .mutation(async ({ input, ctx }) => { + let userId: string + if (ctx.userId) { + userId = ctx.userId + } else if (input.apiKey) { + const user = await getUserByApiKeyOrThrow(input.apiKey) + userId = user.id + } else { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: + "You must be logged in or provide a valid API key to create a question", + }) + } + + let tags: Tag[] = [] + if (input.tags && input.tags.length > 0) { + tags = await prisma.tag.findMany({ + where: { + userId: userId, + }, + }) + } + + const isMultiChoice = input.options && input.options.length > 0 + + const question = await prisma.question.create({ + data: { + title: input.title, + resolveBy: input.resolveBy, + user: { connect: { id: userId } }, + type: isMultiChoice + ? QuestionType.MULTIPLE_CHOICE + : QuestionType.BINARY, + unlisted: input.unlisted, + sharedPublicly: input.sharedPublicly, + exclusiveAnswers: input.exclusiveAnswers, + tags: + input.tags && input.tags.length > 0 + ? { + connectOrCreate: input.tags.map((tag) => ({ + where: { + id: + tags.find((t) => t.name === tag)?.id || + "no tag with this id exists", + }, + create: { + name: tag, + userId: userId, + }, + })), + } + : undefined, + tournaments: input.tournamentId + ? { + connect: { + id: input.tournamentId, + }, + } + : undefined, + sharedWithLists: input.shareWithListIds + ? { + connect: input.shareWithListIds.map((id) => ({ id })), + } + : undefined, + options: + isMultiChoice && input.options + ? { + // Reverse the options array to work around Prisma bug + // https://github.com/prisma/prisma/issues/22090 + create: [...input.options].reverse().map((option) => ({ + text: option.text, + user: { connect: { id: userId } }, + })), + } + : undefined, + }, + include: { + tournaments: true, + sharedWithLists: true, + options: true, + tags: true, + }, + }) + + if (isMultiChoice && question.options) { + await Promise.all( + input.options!.map((option) => { + if (option.prediction !== undefined) { + return prisma.forecast.create({ + data: { + question: { connect: { id: question.id } }, + user: { connect: { id: userId } }, + forecast: new Decimal(option.prediction), + option: { + connect: { + id: question.options.find((o) => o.text === option.text) + ?.id, + }, + }, + }, + }) + } + }), + ) + } else if (!isMultiChoice && input.prediction) { + // Create forecast for binary question + await prisma.forecast.create({ + data: { + question: { connect: { id: question.id } }, + user: { connect: { id: userId } }, + forecast: new Decimal(input.prediction), + }, + }) + } + + await backendAnalyticsEvent("question_created", { + platform: "web", + user: userId, + }) + + // TODO: how do we want to handle analytics for MCQ forecasts? + if (input.prediction) { + await backendAnalyticsEvent("forecast_submitted", { + platform: "web", + user: userId, + question: question.id, + forecast: input.prediction, + }) + } + + try { + await syncToSlackIfNeeded(question, userId) + } catch (error) { + if (error instanceof Error && error.message.includes("is_archived")) { + // If the error is due to an archived Slack channel, handle it gracefully + return { + url: getQuestionUrl(question), + ...input, + slackSyncError: "archived_channel", + } + } + throw error + } + + return { url: getQuestionUrl(question), ...input } + }), + + resolveQuestion: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to resolve", + }), + resolution: z.string({ + description: + "Resolve to YES, NO or AMBIGUOUS if it's a binary question and $OPTION, AMBIGUOUS, or OTHER if it's a multi-choice question. You can only resolve your own questions.", + }), + questionType: z.string({ + description: "BINARY or MULTIPLE_CHOICE", + }), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + optionId: z + .string({ + description: "For multiple choice: ID of the option to resolve", + }) + .optional(), + }), + ) + .meta({ + openapi: { + method: "POST", + path: "/v1/resolveQuestion", + description: + "Resolve to YES, NO or AMBIGUOUS if it's a binary question and AMBIGUOUS, OTHER, or $OPTION if it's a multi-choice question", + tags: ["v1"], + example: { + request: { + questionId: exampleQuestionId, + resolution: "YES", + questionType: "BINARY", + apiKey: "your_api_key_here", + }, + }, + }, + }) + .output(z.object({ message: z.string() })) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) + + await handleQuestionResolution( + input.questionId, + input.resolution, + input.questionType as QuestionType, + input.optionId, + ) + + await backendAnalyticsEvent("question_resolved", { + platform: input.apiKey ? "api" : "web", + resolution: input.resolution.toLowerCase(), + }) + + return { + message: `Question ${input.questionId} resolved to ${input.resolution}`, + } + }), + + undoResolution: publicProcedure + .input( + z.object({ + questionId: z.string(), + optionId: z.string().optional(), + }), + ) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId) + + if (input.optionId) { + await undoQuestionOptionResolution(input.optionId) + } + await undoQuestionResolution(input.questionId) + + await backendAnalyticsEvent("question_resolution_undone", { + platform: "web", + user: ctx.userId, + }) + }), + + setSharedPublicly: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to update", + }), + sharedPublicly: z + .boolean({ + description: "Allow anyone with the link to view", + }) + .optional(), + unlisted: z + .boolean({ + description: "Hide from fatebook.io/public", + }) + .optional(), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .meta({ + openapi: { + method: "PATCH", + path: "/v1/setSharedPublicly", + description: + "Change the visibility of the question. The 'sharedPublicly' parameter sets whether the question is accessible to anyone via a direct link. The 'unlisted' parameter sets whether the question is visible on fatebook.io/public", + tags: ["v1"], + }, + }) + .output(z.object({ message: z.string() })) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) + + await prisma.question.update({ + where: { + id: input.questionId, + }, + data: { + sharedPublicly: input.sharedPublicly, + unlisted: input.unlisted, + }, + }) + + return { + message: `Question ${input.questionId} updated; it is now ${input.sharedPublicly ? "shared publicly" : "not shared publicly"} and ${input.unlisted ? "unlisted" : "listed"}.`, + } + }), + + setHideForecastsUntilPrediction: publicProcedure + .input( + z.object({ + questionId: z.string(), + hideForecastsUntilPrediction: z.boolean(), + }), + ) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId) + + await prisma.question.update({ + where: { + id: input.questionId, + }, + data: { + hideForecastsUntilPrediction: input.hideForecastsUntilPrediction, + }, + }) + }), + + setSharedWith: publicProcedure + .input( + z.object({ + questionId: z.string(), + addEmails: z.array(z.string()), + removeUsers: z.array(z.string()), + }), + ) + .mutation(async ({ input, ctx }) => { + const question = (await getQuestionAssertAuthor( + ctx, + input.questionId, + undefined, + { + user: true, + sharedWith: true, + }, + )) as QuestionWithUserAndSharedWith + + const sharedWith = Array.from( + new Set( + [ + ...question.sharedWith.map((u) => u.email), + ...input.addEmails, + ].filter( + (e) => + !question.sharedWith.some( + (user) => + input.removeUsers.includes(user.id) && user.email === e, + ), + ), + ), + ) + const newlySharedWith = sharedWith.filter( + (email) => !question.sharedWith.some((u) => u.email === email), + ) + + if (newlySharedWith.length > 0) { + const existingUsers = await prisma.user.findMany({ + where: { + email: { + in: sharedWith, + }, + }, + }) + + const nonExistingUsers = sharedWith.filter( + (email) => !existingUsers.some((u) => u.email === email), + ) + + if (nonExistingUsers.length > 0) { + await prisma.user.createMany({ + data: nonExistingUsers.map((email) => ({ email })), + }) + } + } + + await prisma.question.update({ + where: { + id: input.questionId, + }, + data: { + sharedWith: { + set: sharedWith.map((email) => ({ email })), + }, + }, + }) + + if (newlySharedWith.length > 0) { + await emailNewlySharedWithUsers(newlySharedWith, question) + } + }), + + getShareSuggestions: publicProcedure.query(async ({ ctx }) => { + if (!ctx.userId) { + throw new TRPCError({ code: "UNAUTHORIZED" }) + } + + // Users that the current user has shared questions with + const sharedWithUsers = await prisma.question + .findMany({ + where: { + userId: ctx.userId, + }, + select: { + sharedWith: true, + }, + }) + .then((results) => results.flatMap((result) => result.sharedWith)) + + // Users that have shared questions with the current user + const sharedByUsers = await prisma.question + .findMany({ + where: { + sharedWith: { + some: { + id: ctx.userId, + }, + }, + }, + select: { + user: true, + }, + }) + .then((results) => results.map((result) => result.user)) + + // Members and authors of lists containing or authored by the current user + const userListUsers = await prisma.userList + .findMany({ + where: { + OR: [ + { users: { some: { id: ctx.userId } } }, + { authorId: ctx.userId }, + ], + }, + select: { + users: true, + author: true, + }, + }) + .then((results) => + results.flatMap((result) => [...result.users, result.author]), + ) + + // Combine all lists and remove duplicates + const allUsers = [...sharedWithUsers, ...sharedByUsers, ...userListUsers] + const uniqueUsers = Array.from( + new Set(allUsers.map((user) => user.id)), + ).map((id) => { + return allUsers.find((user) => user.id === id) + }) + + return uniqueUsers + }), + + addForecast: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to forecast on", + }), + forecast: z + .number({ + description: "Your forecast between 0 and 1", + }) + .max(1) + .min(0), + optionId: z + .string({ + description: "For multiple choice: ID of the option to forecast on", + }) + .optional(), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output( + z + .object({ + message: z.string(), + forecast: ForecastSchema, + }) + .optional(), + ) + .meta({ + openapi: { + method: "POST", + path: "/v1/addForecast", + description: + "Add a forecast to the question. Forecasts are between 0 and 1.", + tags: ["v1"], + example: { + request: { + questionId: exampleQuestionId, + forecast: 0.75, + apiKey: "your_api_key_here", + }, + }, + }, + }) + .mutation(async ({ input, ctx }) => { + const user = await getUserFromCtxOrApiKeyOrThrow(ctx, input.apiKey) + + const question = await prisma.question.findUnique({ + where: { + id: input.questionId, + }, + include: { + forecasts: true, + sharedWith: true, + sharedWithLists: { + include: { + users: true, + author: true, + }, + }, + }, + }) + + assertHasAccess(question, user) + if (question === null) { + throw new TRPCError({ + code: "NOT_FOUND", + message: "Question not found", + }) + } + + if (question.resolution) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "Question has already been resolved", + }) + } + + if (input.optionId && question.type !== "MULTIPLE_CHOICE") { + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Option ID can only be supplied for multiple choice questions. This question is a ${question.type}`, + }) + } + if (!input.optionId && question.type === "MULTIPLE_CHOICE") { + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Option ID must be supplied for multiple choice questions`, + }) + } + + const lastForecastByUser = question.forecasts + .sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime()) // most recent first + .find((f) => f.userId === user.id) + + // disallow submitting the same forecast twice within two minutes + if ( + lastForecastByUser?.forecast.toNumber() === input.forecast && + new Date().getTime() - lastForecastByUser?.createdAt.getTime() < + 1000 * 60 * 2 + ) { + return + } + + const submittedForecast = await prisma.forecast.create({ + data: { + user: { + connect: { + id: user.id, + }, + }, + question: { + connect: { + id: input.questionId, + }, + }, + // If an optionId is set, the forecast goes on that option + // Else it goes on the question itself + ...(input.optionId + ? { + option: { connect: { id: input.optionId } }, + forecast: input.forecast, + } + : { forecast: input.forecast }), + }, + include: { + user: true, + question: { + include: { + forecasts: { + include: { + user: { + include: { + profiles: true, + }, + }, + }, + }, + questionMessages: { + include: { + message: true, + }, + }, + user: { + include: { + profiles: true, + }, + }, + comments: { + include: { + user: true, + }, + }, + sharedWith: true, + sharedWithLists: { + include: { + users: true, + }, + }, + }, + }, + }, + }) + + await updateForecastQuestionMessages( + submittedForecast.question, + "New forecast", + ) + + const q = submittedForecast.question + for (const userToNotify of filterToUniqueIds([ + q.user, + ...q.forecasts.map((f) => f.user), + ...q.comments.map((c) => c.user), + ...q.sharedWith, + ...q.sharedWithLists.flatMap((l) => l.users), + ]).filter((u) => u && u.id !== submittedForecast.user.id)) { + const forecastsHidden = forecastsAreHidden(q, userToNotify.id) + const userPredictedNStr = `${ + (!forecastsHidden && submittedForecast.user.name) || "Someone" + } predicted${ + forecastsHidden + ? "" + : ` ${displayForecast(submittedForecast, 2, true)}` + }` + await createNotification({ + userId: userToNotify.id, + title: `${userPredictedNStr} on "${q.title}"`, + content: userPredictedNStr, + tags: ["new_forecast", q.id], + url: getQuestionUrl(q), + questionId: q.id, + }) + } + + await backendAnalyticsEvent("forecast_submitted", { + platform: input.apiKey ? "api" : "web", + user: user.id, + question: question.id, + forecast: input.forecast, + }) + + return { + message: `Forecast ${input.forecast} successfully added to "${question.title}"`, + forecast: { + questionId: submittedForecast.questionId, + forecast: submittedForecast.forecast, + optionId: submittedForecast.optionId, + id: submittedForecast.id, + createdAt: submittedForecast.createdAt, + comment: submittedForecast.comment, + profileId: submittedForecast.profileId, + userId: submittedForecast.userId, + }, + } + }), + + addComment: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to comment on", + }), + comment: z.string({ + description: "Your comment text", + }), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output( + z.object({ + message: z.string(), + }), + ) + .meta({ + openapi: { + method: "POST", + path: "/v1/addComment", + description: "Add a comment to the question.", + tags: ["v1"], + example: { + request: { + questionId: exampleQuestionId, + comment: "This is an interesting question!", + apiKey: "your_api_key_here", + }, + }, + }, + }) + .mutation(async ({ input, ctx }) => { + const question = await prisma.question.findUnique({ + where: { + id: input.questionId, + }, + include: { + comments: { + include: { + user: true, + }, + }, + forecasts: { + include: { + user: true, + }, + }, + sharedWith: true, + sharedWithLists: { + include: { + users: true, + author: true, + }, + }, + user: true, + }, + }) + + const user = await getUserFromCtxOrApiKeyOrThrow(ctx, input.apiKey) + assertHasAccess(question, user) + if (question === null) { + throw new TRPCError({ + code: "NOT_FOUND", + message: "Question not found", + }) + } + + const newComment = await prisma.comment.create({ + data: { + question: { + connect: { + id: input.questionId, + }, + }, + user: { + connect: { + id: user.id, + }, + }, + comment: input.comment, + }, + include: { + user: true, + }, + }) + + for (const user of filterToUniqueIds([ + question.user, + ...question.forecasts.map((f) => f.user), + ...question.comments.map((c) => c.user), + ...question.sharedWith, + ...question.sharedWithLists.flatMap((l) => l.users), + ]).filter((u) => u && u.id !== newComment.user.id)) { + await createNotification({ + userId: user.id, + title: `${newComment.user.name || "Someone"} commented on "${ + question.title + }"`, + content: `${newComment.user.name || "Someone"} commented:\n\n${ + newComment.comment + }`, + tags: ["new_comment", question.id], + url: getQuestionUrl(question), + questionId: question.id, + }) + } + + await backendAnalyticsEvent("comment_added", { + platform: input.apiKey ? "api" : "web", + user: user.id, + }) + + return { + message: `Comment "${input.comment}" successfully added to "${question.title}"`, + } + }), + + deleteComment: publicProcedure + .input( + z.object({ + commentId: z.number(), + }), + ) + .mutation(async ({ input, ctx }) => { + const comment = await prisma.comment.findUnique({ + where: { + id: input.commentId, + }, + include: { + user: true, + }, + }) + + if (!comment || comment.user.id !== ctx.userId) { + throw new TRPCError({ code: "NOT_FOUND", message: "Comment not found" }) + } + + await prisma.comment.delete({ + where: { + id: input.commentId, + }, + }) + + await backendAnalyticsEvent("comment_deleted", { + platform: "web", + user: ctx.userId, + }) + }), + + getQuestionScores: publicProcedure + .input( + z.object({ + tags: z.array(z.string()).optional(), + userId: z.string(), + }), + ) + .query(async ({ ctx, input }) => { + if (!input.userId) { + return null + } + + const questionScores = await prisma.questionScore.findMany({ + where: { + AND: [ + { + userId: input.userId, + }, + input.tags && input.userId === ctx.userId && input.tags.length > 0 + ? { + question: { + tags: { + some: { + name: { + in: input.tags, + }, + userId: input.userId, + }, + }, + }, + } + : {}, + ], + }, + }) + + return questionScores + }), + + getBrierScorePercentile: publicProcedure + .input( + z.object({ + userId: z.string(), + }), + ) + .query(async ({ input }) => { + if (!input.userId) return null + + const allUsersScores = await prisma.questionScore.groupBy({ + by: ["userId"], + _avg: { + absoluteScore: true, + relativeScore: true, + }, + }) + + const getPercentile = (metric: "relativeScore" | "absoluteScore") => { + const sortedScores = allUsersScores + .filter((score) => score._avg[metric] !== null) + .sort((a, b) => Number(a._avg[metric]) - Number(b._avg[metric])) // ascending + const userScore = sortedScores.find( + (score) => score.userId === input.userId, + ) + if (!userScore) return null + + return sortedScores.indexOf(userScore) / sortedScores.length + } + + return { + relativeScorePercentile: getPercentile("relativeScore"), + absoluteScorePercentile: getPercentile("absoluteScore"), + } + }), + + getBucketedForecasts: publicProcedure + .input( + z.object({ + tags: z.array(z.string()).optional(), + userId: z.string(), + }), + ) + .query(async ({ input }) => { + if (!input.userId) { + return null + } + return await getBucketedForecasts(input.userId, input.tags) + }), + + deleteQuestion: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to delete", + }), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output( + z.object({ + message: z.string(), + }), + ) + .meta({ + openapi: { + method: "DELETE", + path: "/v1/deleteQuestion", + tags: ["v1"], + }, + }) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) + + await deleteQuestion(input.questionId) + + await backendAnalyticsEvent("question_deleted", { + platform: input.apiKey ? "api" : "web", + user: ctx.userId, + }) + + return { + message: `Question "${input.questionId}" successfully deleted`, + } + }), + + editQuestion: publicProcedure + .input( + z.object({ + questionId: z.string({ + description: "ID of the question to edit", + }), + title: z + .string({ + description: "New title for the question", + }) + .optional(), + resolveBy: z + .date({ + description: "New resolution date", + }) + .optional(), + apiKey: z + .string({ + description: + "Your Fatebook API key. Get it at fatebook.io/api-setup", + }) + .optional(), + }), + ) + .output( + z.object({ + message: z.string(), + question: QuestionSchema, + }), + ) + .meta({ + openapi: { + method: "PATCH", + path: "/v1/editQuestion", + tags: ["v1"], + }, + }) + .mutation(async ({ input, ctx }) => { + await getQuestionAssertAuthor(ctx, input.questionId, input.apiKey) + + const question = await prisma.question.update({ + where: { + id: input.questionId, + }, + data: { + title: input.title, + resolveBy: input.resolveBy, + }, + include: { + forecasts: { + include: { + user: { + include: { + profiles: true, + }, + }, + }, + }, + user: { + include: { + profiles: true, + }, + }, + questionMessages: { + include: { + message: true, + }, + }, + }, + }) + + await updateForecastQuestionMessages(question, "Question edited") + + await backendAnalyticsEvent("question_edited", { + platform: input.apiKey ? "api" : "web", + user: ctx.userId, + }) + + return { + message: `Question "${input.questionId}" successfully edited`, + question: question, + } + }), + + exportAllQuestions: publicProcedure.mutation(async ({ ctx }) => { + if (!ctx.userId) { + return null + } + const questionsQ = + await getQuestionsUserCreatedOrForecastedOnOrIsSharedWith( + { + cursor: 0, + limit: 100000, + }, + ctx, + ) + const questions = questionsQ.items + + const csv = await questionsToCsv(questions, ctx.userId) + + await backendAnalyticsEvent("exported_to_csv", { + user: ctx.userId, + platform: "web", + }) + + return csv + }), +}) diff --git a/lib/web/tournament_router.ts b/lib/web/tournament_router.ts index 5e83fff..fca9e53 100644 --- a/lib/web/tournament_router.ts +++ b/lib/web/tournament_router.ts @@ -2,7 +2,7 @@ import { TRPCError } from "@trpc/server" import { z } from "zod" import { syncToSlackIfNeeded } from "../interactive_handlers/postFromWeb" import prisma from "../prisma" -import { scrubApiKeyPropertyRecursive } from "./question_router" +import { scrubApiKeyPropertyRecursive } from "./question_router/scrub" import { publicProcedure, router } from "./trpc_base" import { matchesAnEmailDomain } from "./utils" diff --git a/lib/web/userList_router.ts b/lib/web/userList_router.ts index 96ca73f..cd6ea06 100644 --- a/lib/web/userList_router.ts +++ b/lib/web/userList_router.ts @@ -3,12 +3,10 @@ import { z } from "zod" import { backendAnalyticsEvent, postSlackMessage } from "../_utils_server" import { syncToSlackIfNeeded } from "../interactive_handlers/postFromWeb" import prisma from "../prisma" -import { - emailNewlySharedWithUsers, - getQuestionAssertAuthor, -} from "./question_router" import { publicProcedure, router } from "./trpc_base" import { getUserListUrl, matchesAnEmailDomain } from "./utils" +import { emailNewlySharedWithUsers } from "./question_router/email_shared" +import { getQuestionAssertAuthor } from "./question_router/assert" export const userListRouter = router({ getUserLists: publicProcedure.query(async ({ ctx }) => { diff --git a/lib/web/utils.ts b/lib/web/utils.ts index 68f3902..303bcfc 100644 --- a/lib/web/utils.ts +++ b/lib/web/utils.ts @@ -382,7 +382,9 @@ export function useBrowser() { } export function useOS() { - const [os, setOS] = useState<"Windows" | "macOS" | "iOS" | "Android" | "Linux" | "Unknown">("Unknown") + const [os, setOS] = useState< + "Windows" | "macOS" | "iOS" | "Android" | "Linux" | "Unknown" + >("Unknown") useEffect(() => { const userAgent = window.navigator.userAgent.toLowerCase() @@ -391,7 +393,11 @@ export function useOS() { setOS("Windows") } else if (userAgent.includes("mac")) { setOS("macOS") - } else if (userAgent.includes("iphone") || userAgent.includes("ipad") || userAgent.includes("ipod")) { + } else if ( + userAgent.includes("iphone") || + userAgent.includes("ipad") || + userAgent.includes("ipod") + ) { setOS("iOS") } else if (userAgent.includes("android")) { setOS("Android") diff --git a/package-lock.json b/package-lock.json index 7a4cca0..1ce217e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,22 +66,25 @@ "trpc-openapi": "^1.2.0", "trpc-transformer": "^3.2.2", "use-debounce": "^10.0.1", + "util": "^0.12.5", "vercel": "^34.2.7", "zod": "^3.23.8", - "zod-error": "^1.5.0" + "zod-error": "^1.5.0", + "zod-prisma-types": "^3.1.8" }, "devDependencies": { "@capacitor/cli": "^6.1.0", "@next/eslint-plugin-next": "^14.2.4", "@tailwindcss/typography": "^0.5.13", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.8", - "@testing-library/react": "^16.0.0", + "@testing-library/jest-dom": "^6.5.0", + "@testing-library/react": "^16.0.1", "@types/graceful-fs": "^4.1.9", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.13", "@types/node": "^20.14.5", "@types/react": "^18.3.3", "@types/swagger-ui-react": "^4.18.3", + "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^7.13.1", "@typescript-eslint/parser": "^7.13.1", "@vercel/git-hooks": "^1.0.0", @@ -99,6 +102,7 @@ "prettier": "3.3.2", "prisma": "^5.15.0", "tailwindcss": "^3.3.2", + "ts-jest": "^29.2.5", "typescript": "^5.4.5" } }, @@ -2491,6 +2495,21 @@ "@prisma/get-platform": "5.16.2" } }, + "node_modules/@prisma/generator-helper": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-5.20.0.tgz", + "integrity": "sha512-37Aibw0wVRQgQVtCdNAIN71YFnSQfvetok7vd95KKkYkQRbEx94gsvPDpyN9Mw7p3IwA3nFgPfLc3jBRztUkKw==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.20.0" + } + }, + "node_modules/@prisma/generator-helper/node_modules/@prisma/debug": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.20.0.tgz", + "integrity": "sha512-oCx79MJ4HSujokA8S1g0xgZUGybD4SyIOydoHMngFYiwEwYDQ5tBQkK5XoEHuwOYDKUOKRn/J0MEymckc4IgsQ==", + "license": "Apache-2.0" + }, "node_modules/@prisma/get-platform": { "version": "5.16.2", "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.16.2.tgz", @@ -3293,6 +3312,7 @@ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz", "integrity": "sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==", "dev": true, + "license": "MIT", "dependencies": { "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", @@ -3332,6 +3352,7 @@ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.0.1.tgz", "integrity": "sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5" }, @@ -3748,6 +3769,7 @@ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -3944,6 +3966,16 @@ "@types/react": "*" } }, + "node_modules/@types/testing-library__jest-dom": { + "version": "5.14.9", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.9.tgz", + "integrity": "sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/jest": "*" + } + }, "node_modules/@types/tough-cookie": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", @@ -5254,6 +5286,13 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/async-listen": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/async-listen/-/async-listen-1.2.0.tgz", @@ -5342,7 +5381,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" @@ -5665,6 +5703,19 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -7281,6 +7332,22 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.820", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.820.tgz", @@ -8934,6 +9001,29 @@ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "license": "MIT" }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -9078,7 +9168,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.1.3" @@ -9645,7 +9734,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -10131,7 +10219,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -10229,7 +10316,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -10355,7 +10441,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -10563,7 +10648,6 @@ "version": "1.1.13", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, "license": "MIT", "dependencies": { "which-typed-array": "^1.1.14" @@ -10784,6 +10868,49 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/javascript-stringify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.0.1.tgz", @@ -10795,6 +10922,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -12383,6 +12511,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -14960,7 +15095,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -16598,9 +16732,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -17907,6 +18041,68 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "license": "Apache-2.0" }, + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/ts-mixer": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", @@ -18484,6 +18680,19 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -18846,7 +19055,6 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", @@ -19189,6 +19397,27 @@ "zod": "^3.20.2" } }, + "node_modules/zod-prisma-types": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/zod-prisma-types/-/zod-prisma-types-3.1.8.tgz", + "integrity": "sha512-5oe0ays3ur4u2GtuUqlhgCraKBcsuMaMI8o7VMV4YAnFeOuVid7K2zGvjI19V0ue9PeNF2ICyVREQVohaQm5dw==", + "license": "MIT", + "dependencies": { + "@prisma/generator-helper": "^5.14.0", + "code-block-writer": "^12.0.0", + "lodash": "^4.17.21", + "zod": "^3.23.8" + }, + "bin": { + "zod-prisma-types": "dist/bin.js" + } + }, + "node_modules/zod-prisma-types/node_modules/code-block-writer": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "license": "MIT" + }, "node_modules/zod-to-json-schema": { "version": "3.23.1", "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.23.1.tgz", diff --git a/package.json b/package.json index 5abc22a..31c4f7a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "iOS": "npx next build && npx next export && npx cap sync ios && npx cap run ios", "zip": "echo \"have you set isDev=false and incremented version num?\" && bash zip-extensions.sh", "prepare": "husky install", - "test": "jest" + "test": "jest", + "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand" }, "dependencies": { "@capacitor/android": "^6.1.0", @@ -79,22 +80,25 @@ "trpc-openapi": "^1.2.0", "trpc-transformer": "^3.2.2", "use-debounce": "^10.0.1", + "util": "^0.12.5", "vercel": "^34.2.7", "zod": "^3.23.8", - "zod-error": "^1.5.0" + "zod-error": "^1.5.0", + "zod-prisma-types": "^3.1.8" }, "devDependencies": { "@capacitor/cli": "^6.1.0", "@next/eslint-plugin-next": "^14.2.4", "@tailwindcss/typography": "^0.5.13", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.8", - "@testing-library/react": "^16.0.0", + "@testing-library/jest-dom": "^6.5.0", + "@testing-library/react": "^16.0.1", "@types/graceful-fs": "^4.1.9", - "@types/jest": "^29.5.12", + "@types/jest": "^29.5.13", "@types/node": "^20.14.5", "@types/react": "^18.3.3", "@types/swagger-ui-react": "^4.18.3", + "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^7.13.1", "@typescript-eslint/parser": "^7.13.1", "@vercel/git-hooks": "^1.0.0", @@ -112,6 +116,7 @@ "prettier": "3.3.2", "prisma": "^5.15.0", "tailwindcss": "^3.3.2", + "ts-jest": "^29.2.5", "typescript": "^5.4.5" }, "lint-staged": { diff --git a/pages/api-setup.tsx b/pages/api-setup.tsx index 4c1f979..23e8033 100644 --- a/pages/api-setup.tsx +++ b/pages/api-setup.tsx @@ -1,3 +1,6 @@ +import { Disclosure, DisclosurePanel } from "@headlessui/react" +import { ChevronDownIcon } from "@heroicons/react/20/solid" +import clsx from "clsx" import { NextSeo } from "next-seo" import dynamic from "next/dynamic" import Link from "next/link" @@ -24,15 +27,26 @@ export default function ApiPage() {

Fatebook API

-

Use the API to create Fatebook questions from a URL

+

+ You can use the API to create, get, and resolve Fatebook questions + from other applications. +

+

+ Get help on using the API in our{" "} + + Discord + + . You might also be interested in embedding{" "} + Fatebook questions in your own website . +

{!userId && (
) } diff --git a/pages/api/v0/createQuestion.ts b/pages/api/v0/createQuestion.ts index f8277ea..766a877 100644 --- a/pages/api/v0/createQuestion.ts +++ b/pages/api/v0/createQuestion.ts @@ -4,9 +4,9 @@ import { z } from "zod" import { generateErrorMessage } from "zod-error" import { backendAnalyticsEvent } from "../../../lib/_utils_server" import prisma from "../../../lib/prisma" -import { emailNewlySharedWithUsers } from "../../../lib/web/question_router" import { getQuestionUrl } from "../../../lib/web/question_url" import { UserListWithAuthorAndUsers } from "../../../prisma/additional" +import { emailNewlySharedWithUsers } from "../../../lib/web/question_router/email_shared" const createQuestionSchema = z.object({ apiKey: z.string().nonempty({ diff --git a/pages/api/v0/getQuestion.ts b/pages/api/v0/getQuestion.ts index 09890ea..0655ecf 100644 --- a/pages/api/v0/getQuestion.ts +++ b/pages/api/v0/getQuestion.ts @@ -2,14 +2,13 @@ import { NextApiRequest, NextApiResponse } from "next" import { getServerSession } from "next-auth" import NextCors from "nextjs-cors" import prisma from "../../../lib/prisma" +import { authOptions } from "../auth/[...nextauth]" +import { assertHasAccess } from "../../../lib/web/question_router/assert" +import { getMostRecentForecastForUser } from "../../../lib/_utils_common" import { - assertHasAccess, scrubApiKeyPropertyRecursive, scrubHiddenForecastsAndSensitiveDetailsFromQuestion, -} from "../../../lib/web/question_router" -import { authOptions } from "../auth/[...nextauth]" - -import { getMostRecentForecastForUser } from "../../../lib/_utils_common" +} from "../../../lib/web/question_router/scrub" interface Request extends NextApiRequest { query: { diff --git a/pages/blog/concrete-benefits-of-making-predictions.tsx b/pages/blog/concrete-benefits-of-making-predictions.tsx index 995b23e..d88ac33 100644 --- a/pages/blog/concrete-benefits-of-making-predictions.tsx +++ b/pages/blog/concrete-benefits-of-making-predictions.tsx @@ -10,18 +10,21 @@ export const metadata = { title: "Concrete benefits of making predictions", date: "2024-10-17", author: "Jonny Spicer", - authorLink: "https://fatebook.io/user/Jonny-Spicer--289" + authorLink: "https://fatebook.io/user/Jonny-Spicer--289", } export default function BlogPage() { return (
- + Back to Blog - @@ -30,7 +33,7 @@ export default function BlogPage() { components={{ p: ({ node, children, ...props }) => { const hasImage = node?.children?.some( - (child) => child.type === "element" && child.tagName === "img" + (child) => child.type === "element" && child.tagName === "img", ) if (hasImage) { @@ -43,7 +46,7 @@ export default function BlogPage() { return

{children}

}, - img: ({ src, alt, className}) => { + img: ({ src, alt, className }) => { return ( = async () => { const postsDirectory = path.join(process.cwd(), "pages/blog") - + try { const filenames = fs.readdirSync(postsDirectory) - const posts = await Promise.all(filenames - .filter((filename) => filename.endsWith(".tsx") && filename !== "index.tsx") - .map(async (filename) => { - const filePath = path.join(postsDirectory, filename) - const fileContent = await fs.promises.readFile(filePath, 'utf8') - - const metadataMatch = fileContent.match(/export const metadata = ({[\s\S]*?})/) - let metadata = { title: '', date: '', author: '' } - - if (metadataMatch) { - // Use eval to parse the metadata object (be cautious with this approach in production) - metadata = eval(`(${metadataMatch[1]})`) - } + const posts = await Promise.all( + filenames + .filter( + (filename) => filename.endsWith(".tsx") && filename !== "index.tsx", + ) + .map(async (filename) => { + const filePath = path.join(postsDirectory, filename) + const fileContent = await fs.promises.readFile(filePath, "utf8") + + const metadataMatch = fileContent.match( + /export const metadata = ({[\s\S]*?})/, + ) + let metadata = { title: "", date: "", author: "" } + + if (metadataMatch) { + // Use eval to parse the metadata object (be cautious with this approach in production) + metadata = eval(`(${metadataMatch[1]})`) + } - const slug = filename.replace(".tsx", "") - return { - slug, - title: metadata.title || slug.replace(/-/g, " ").toLowerCase().replace(/^[a-z]/, c => c.toUpperCase()), - date: metadata.date || '', - author: metadata.author || '' - } - })) + const slug = filename.replace(".tsx", "") + return { + slug, + title: + metadata.title || + slug + .replace(/-/g, " ") + .toLowerCase() + .replace(/^[a-z]/, (c) => c.toUpperCase()), + date: metadata.date || "", + author: metadata.author || "", + } + }), + ) return { props: { - posts: posts.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()), + posts: posts.sort( + (a, b) => new Date(b.date).getTime() - new Date(a.date).getTime(), + ), }, } } catch (error) { @@ -70,11 +83,7 @@ export default function BlogPage({ posts }: BlogPageProps) {
    {posts.map((post) => (
  • - - {post.title} - + {post.title}
    {post.date && {post.date}} {post.date && post.author && • } diff --git a/pages/extension.tsx b/pages/extension.tsx index cc46a4a..32a5514 100644 --- a/pages/extension.tsx +++ b/pages/extension.tsx @@ -165,29 +165,47 @@ export default function ExtensionPage() { > {browser === "Firefox" ? ( <> - + {os === "macOS" ? "cmd" : "ctrl"} {"+"} - + {os === "macOS" ? "opt" : "alt"} {"+"} - + Q ) : ( <> - + {os === "macOS" ? "cmd" : "ctrl"} {"+"} - + shift {"+"} - + F diff --git a/pages/team/[list_id].tsx b/pages/team/[list_id].tsx index 1bb74c3..2d6ee8b 100644 --- a/pages/team/[list_id].tsx +++ b/pages/team/[list_id].tsx @@ -24,7 +24,11 @@ export default function ListPage() { return (
    - +
    {!userId && ( diff --git a/prisma/generated/zod/index.ts b/prisma/generated/zod/index.ts new file mode 100644 index 0000000..731c474 --- /dev/null +++ b/prisma/generated/zod/index.ts @@ -0,0 +1,54881 @@ +import { z } from "zod" +import { Prisma } from "@prisma/client" +import Decimal from "decimal.js" + +///////////////////////////////////////// +// HELPER FUNCTIONS +///////////////////////////////////////// + +// DECIMAL +//------------------------------------------------------ + +export const DecimalJsLikeSchema: z.ZodType = z.object({ + d: z.array(z.number()), + e: z.number(), + s: z.number(), + toFixed: z.function(z.tuple([]), z.string()), +}) + +export const DECIMAL_STRING_REGEX = + /^(?:-?Infinity|NaN|-?(?:0[bB][01]+(?:\.[01]+)?(?:[pP][-+]?\d+)?|0[oO][0-7]+(?:\.[0-7]+)?(?:[pP][-+]?\d+)?|0[xX][\da-fA-F]+(?:\.[\da-fA-F]+)?(?:[pP][-+]?\d+)?|(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?))$/ + +export const isValidDecimalInput = ( + v?: null | string | number | Prisma.DecimalJsLike, +): v is string | number | Prisma.DecimalJsLike => { + if (v === undefined || v === null) return false + return ( + (typeof v === "object" && + "d" in v && + "e" in v && + "s" in v && + "toFixed" in v) || + (typeof v === "string" && DECIMAL_STRING_REGEX.test(v)) || + typeof v === "number" + ) +} + +///////////////////////////////////////// +// ENUMS +///////////////////////////////////////// + +export const TransactionIsolationLevelSchema = z.enum([ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable", +]) + +export const WorkspaceScalarFieldEnumSchema = z.enum([ + "teamId", + "teamName", + "token", + "createdAt", +]) + +export const ForecastScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "comment", + "forecast", + "profileId", + "questionId", + "optionId", + "userId", +]) + +export const QuestionScoreScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "relativeScore", + "questionId", + "userQuestionComboId", + "absoluteScore", + "rank", + "userId", + "questionOptionId", +]) + +export const QuestionOptionScalarFieldEnumSchema = z.enum([ + "id", + "questionId", + "text", + "resolution", + "createdAt", + "userId", + "resolvedAt", +]) + +export const QuestionScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "comment", + "profileId", + "title", + "type", + "resolveBy", + "resolved", + "pingedForResolution", + "resolution", + "resolvedAt", + "notes", + "hideForecastsUntil", + "hideForecastsUntilPrediction", + "userId", + "sharedPublicly", + "unlisted", + "exclusiveAnswers", +]) + +export const TagScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "name", + "userId", +]) + +export const ResolutionSlackMessageScalarFieldEnumSchema = z.enum([ + "id", + "questionId", + "detailsId", + "profileId", +]) + +export const PingSlackMessageScalarFieldEnumSchema = z.enum([ + "id", + "questionId", + "detailsId", +]) + +export const QuestionSlackMessageScalarFieldEnumSchema = z.enum([ + "id", + "questionId", + "detailsId", + "updatedAt", +]) + +export const SlackMessageScalarFieldEnumSchema = z.enum([ + "id", + "ts", + "channel", + "teamId", +]) + +export const UserScalarFieldEnumSchema = z.enum([ + "id", + "name", + "createdAt", + "email", + "image", + "staleReminder", + "unsubscribedFromEmailsAt", + "apiKey", + "discordUserId", + "emailVerified", +]) + +export const ProfileScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "slackId", + "slackTeamId", + "userId", +]) + +export const GroupScalarFieldEnumSchema = z.enum([ + "id", + "type", + "createdAt", + "name", + "slackTeamId", +]) + +export const TargetScalarFieldEnumSchema = z.enum([ + "id", + "userId", + "profileId", + "type", + "goal", + "lastFailedAt", + "notifyOn", + "lastNotified", +]) + +export const AccountScalarFieldEnumSchema = z.enum([ + "id", + "userId", + "type", + "provider", + "providerAccountId", + "refresh_token", + "access_token", + "expires_at", + "token_type", + "scope", + "id_token", + "session_state", +]) + +export const CommentScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "comment", + "questionId", + "userId", +]) + +export const UserListScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "inviteId", + "name", + "emailDomains", + "syncToSlackTeamId", + "syncToSlackChannelId", + "authorId", +]) + +export const TournamentScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "name", + "description", + "authorId", + "sharedPublicly", + "unlisted", + "userListId", + "anyoneInListCanEdit", + "showLeaderboard", + "predictYourYear", + "syncToSlackTeamId", + "syncToSlackChannelId", +]) + +export const NotificationScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "emailSentAt", + "title", + "content", + "url", + "tags", + "read", + "userId", + "questionId", +]) + +export const FeedbackScalarFieldEnumSchema = z.enum([ + "id", + "createdAt", + "type", + "message", + "email", + "userId", +]) + +export const SortOrderSchema = z.enum(["asc", "desc"]) + +export const QueryModeSchema = z.enum(["default", "insensitive"]) + +export const WorkspaceOrderByRelevanceFieldEnumSchema = z.enum([ + "teamId", + "teamName", + "token", +]) + +export const NullsOrderSchema = z.enum(["first", "last"]) + +export const ForecastOrderByRelevanceFieldEnumSchema = z.enum([ + "comment", + "questionId", + "optionId", + "userId", +]) + +export const QuestionScoreOrderByRelevanceFieldEnumSchema = z.enum([ + "questionId", + "userQuestionComboId", + "userId", + "questionOptionId", +]) + +export const QuestionOptionOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "questionId", + "text", + "userId", +]) + +export const QuestionOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "comment", + "title", + "notes", + "userId", +]) + +export const TagOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "name", + "userId", +]) + +export const ResolutionSlackMessageOrderByRelevanceFieldEnumSchema = z.enum([ + "questionId", +]) + +export const PingSlackMessageOrderByRelevanceFieldEnumSchema = z.enum([ + "questionId", +]) + +export const QuestionSlackMessageOrderByRelevanceFieldEnumSchema = z.enum([ + "questionId", +]) + +export const SlackMessageOrderByRelevanceFieldEnumSchema = z.enum([ + "ts", + "channel", + "teamId", +]) + +export const UserOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "name", + "email", + "image", + "apiKey", + "discordUserId", +]) + +export const ProfileOrderByRelevanceFieldEnumSchema = z.enum([ + "slackId", + "slackTeamId", + "userId", +]) + +export const GroupOrderByRelevanceFieldEnumSchema = z.enum([ + "name", + "slackTeamId", +]) + +export const TargetOrderByRelevanceFieldEnumSchema = z.enum(["userId"]) + +export const AccountOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "userId", + "type", + "provider", + "providerAccountId", + "refresh_token", + "access_token", + "token_type", + "scope", + "id_token", + "session_state", +]) + +export const CommentOrderByRelevanceFieldEnumSchema = z.enum([ + "comment", + "questionId", + "userId", +]) + +export const UserListOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "inviteId", + "name", + "emailDomains", + "syncToSlackTeamId", + "syncToSlackChannelId", + "authorId", +]) + +export const TournamentOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "name", + "description", + "authorId", + "userListId", + "syncToSlackTeamId", + "syncToSlackChannelId", +]) + +export const NotificationOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "title", + "content", + "url", + "tags", + "userId", + "questionId", +]) + +export const FeedbackOrderByRelevanceFieldEnumSchema = z.enum([ + "id", + "type", + "message", + "email", + "userId", +]) + +export const QuestionTypeSchema = z.enum([ + "BINARY", + "MULTIPLE_CHOICE", + "QUANTITY", +]) + +export type QuestionTypeType = `${z.infer}` + +export const DayOfTheWeekSchema = z.enum([ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY", +]) + +export type DayOfTheWeekType = `${z.infer}` + +export const TargetTypeSchema = z.enum(["FORECAST", "QUESTION"]) + +export type TargetTypeType = `${z.infer}` + +export const GroupTypeSchema = z.enum(["WEB", "SLACK"]) + +export type GroupTypeType = `${z.infer}` + +export const ResolutionSchema = z.enum(["YES", "NO", "AMBIGUOUS"]) + +export type ResolutionType = `${z.infer}` + +///////////////////////////////////////// +// MODELS +///////////////////////////////////////// + +///////////////////////////////////////// +// WORKSPACE SCHEMA +///////////////////////////////////////// + +export const WorkspaceSchema = z.object({ + teamId: z.string(), + teamName: z.string(), + token: z.string(), + createdAt: z.coerce.date(), +}) + +export type Workspace = z.infer + +///////////////////////////////////////// +// FORECAST SCHEMA +///////////////////////////////////////// + +export const ForecastSchema = z.object({ + id: z.number().int(), + createdAt: z.coerce.date(), + comment: z.string().nullable(), + forecast: z.instanceof(Prisma.Decimal, { + message: + "Field 'forecast' must be a Decimal. Location: ['Models', 'Forecast']", + }), + profileId: z.number().int().nullable(), + questionId: z.string(), + optionId: z.string().nullable(), + userId: z.string(), +}) + +export type Forecast = z.infer + +///////////////////////////////////////// +// QUESTION SCORE SCHEMA +///////////////////////////////////////// + +export const QuestionScoreSchema = z.object({ + id: z.number().int(), + createdAt: z.coerce.date(), + relativeScore: z + .instanceof(Prisma.Decimal, { + message: + "Field 'relativeScore' must be a Decimal. Location: ['Models', 'QuestionScore']", + }) + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z.instanceof(Prisma.Decimal, { + message: + "Field 'absoluteScore' must be a Decimal. Location: ['Models', 'QuestionScore']", + }), + rank: z.number().int(), + userId: z.string(), + questionOptionId: z.string().nullable(), +}) + +export type QuestionScore = z.infer + +///////////////////////////////////////// +// QUESTION OPTION SCHEMA +///////////////////////////////////////// + +export const QuestionOptionSchema = z.object({ + resolution: ResolutionSchema.nullable(), + id: z.string().cuid(), + questionId: z.string(), + text: z.string(), + createdAt: z.coerce.date(), + userId: z.string(), + resolvedAt: z.coerce.date().nullable(), +}) + +export type QuestionOption = z.infer + +///////////////////////////////////////// +// QUESTION SCHEMA +///////////////////////////////////////// + +export const QuestionSchema = z.object({ + type: QuestionTypeSchema, + resolution: ResolutionSchema.nullable(), + id: z.string().cuid(), + createdAt: z.coerce.date(), + comment: z.string().nullable(), + profileId: z.number().int().nullable(), + title: z.string(), + resolveBy: z.coerce.date(), + resolved: z.boolean(), + pingedForResolution: z.boolean(), + resolvedAt: z.coerce.date().nullable(), + notes: z.string().nullable(), + hideForecastsUntil: z.coerce.date().nullable(), + hideForecastsUntilPrediction: z.boolean().nullable(), + userId: z.string(), + sharedPublicly: z.boolean(), + unlisted: z.boolean(), + exclusiveAnswers: z.boolean().nullable(), +}) + +export type Question = z.infer + +///////////////////////////////////////// +// TAG SCHEMA +///////////////////////////////////////// + +export const TagSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + name: z.string(), + userId: z.string(), +}) + +export type Tag = z.infer + +///////////////////////////////////////// +// RESOLUTION SLACK MESSAGE SCHEMA +///////////////////////////////////////// + +export const ResolutionSlackMessageSchema = z.object({ + id: z.number().int(), + questionId: z.string(), + detailsId: z.number().int(), + profileId: z.number().int().nullable(), +}) + +export type ResolutionSlackMessage = z.infer< + typeof ResolutionSlackMessageSchema +> + +///////////////////////////////////////// +// PING SLACK MESSAGE SCHEMA +///////////////////////////////////////// + +export const PingSlackMessageSchema = z.object({ + id: z.number().int(), + questionId: z.string(), + detailsId: z.number().int(), +}) + +export type PingSlackMessage = z.infer + +///////////////////////////////////////// +// QUESTION SLACK MESSAGE SCHEMA +///////////////////////////////////////// + +export const QuestionSlackMessageSchema = z.object({ + id: z.number().int(), + questionId: z.string(), + detailsId: z.number().int(), + updatedAt: z.coerce.date(), +}) + +export type QuestionSlackMessage = z.infer + +///////////////////////////////////////// +// SLACK MESSAGE SCHEMA +///////////////////////////////////////// + +export const SlackMessageSchema = z.object({ + id: z.number().int(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), +}) + +export type SlackMessage = z.infer + +///////////////////////////////////////// +// USER SCHEMA +///////////////////////////////////////// + +export const UserSchema = z.object({ + id: z.string().cuid(), + name: z.string().nullable(), + createdAt: z.coerce.date(), + email: z.string(), + image: z.string().nullable(), + staleReminder: z.boolean(), + unsubscribedFromEmailsAt: z.coerce.date().nullable(), + apiKey: z.string().nullable(), + discordUserId: z.string().nullable(), + emailVerified: z.coerce.date().nullable(), +}) + +export type User = z.infer + +///////////////////////////////////////// +// PROFILE SCHEMA +///////////////////////////////////////// + +export const ProfileSchema = z.object({ + id: z.number().int(), + createdAt: z.coerce.date(), + slackId: z.string().nullable(), + slackTeamId: z.string().nullable(), + userId: z.string(), +}) + +export type Profile = z.infer + +///////////////////////////////////////// +// GROUP SCHEMA +///////////////////////////////////////// + +export const GroupSchema = z.object({ + type: GroupTypeSchema, + id: z.number().int(), + createdAt: z.coerce.date(), + name: z.string(), + slackTeamId: z.string().nullable(), +}) + +export type Group = z.infer + +///////////////////////////////////////// +// TARGET SCHEMA +///////////////////////////////////////// + +export const TargetSchema = z.object({ + type: TargetTypeSchema, + notifyOn: DayOfTheWeekSchema, + id: z.number().int(), + userId: z.string(), + profileId: z.number().int().nullable(), + goal: z.number().int(), + lastFailedAt: z.coerce.date(), + lastNotified: z.coerce.date(), +}) + +export type Target = z.infer + +///////////////////////////////////////// +// ACCOUNT SCHEMA +///////////////////////////////////////// + +export const AccountSchema = z.object({ + id: z.string().cuid(), + userId: z.string(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().nullable(), + access_token: z.string().nullable(), + expires_at: z.number().int().nullable(), + token_type: z.string().nullable(), + scope: z.string().nullable(), + id_token: z.string().nullable(), + session_state: z.string().nullable(), +}) + +export type Account = z.infer + +///////////////////////////////////////// +// COMMENT SCHEMA +///////////////////////////////////////// + +export const CommentSchema = z.object({ + id: z.number().int(), + createdAt: z.coerce.date(), + comment: z.string(), + questionId: z.string(), + userId: z.string(), +}) + +export type Comment = z.infer + +///////////////////////////////////////// +// USER LIST SCHEMA +///////////////////////////////////////// + +export const UserListSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + inviteId: z.string().cuid().nullable(), + name: z.string(), + emailDomains: z.string().array(), + syncToSlackTeamId: z.string().nullable(), + syncToSlackChannelId: z.string().nullable(), + authorId: z.string(), +}) + +export type UserList = z.infer + +///////////////////////////////////////// +// TOURNAMENT SCHEMA +///////////////////////////////////////// + +export const TournamentSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + name: z.string(), + description: z.string().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean(), + unlisted: z.boolean(), + userListId: z.string().nullable(), + anyoneInListCanEdit: z.boolean(), + showLeaderboard: z.boolean(), + predictYourYear: z.number().int().nullable(), + syncToSlackTeamId: z.string().nullable(), + syncToSlackChannelId: z.string().nullable(), +}) + +export type Tournament = z.infer + +///////////////////////////////////////// +// NOTIFICATION SCHEMA +///////////////////////////////////////// + +export const NotificationSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + emailSentAt: z.coerce.date().nullable(), + title: z.string(), + content: z.string(), + url: z.string().nullable(), + tags: z.string().array(), + read: z.boolean(), + userId: z.string(), + questionId: z.string().nullable(), +}) + +export type Notification = z.infer + +///////////////////////////////////////// +// FEEDBACK SCHEMA +///////////////////////////////////////// + +export const FeedbackSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + type: z.string(), + message: z.string(), + email: z.string().nullable(), + userId: z.string().nullable(), +}) + +export type Feedback = z.infer + +///////////////////////////////////////// +// SELECT & INCLUDE +///////////////////////////////////////// + +// WORKSPACE +//------------------------------------------------------ + +export const WorkspaceSelectSchema: z.ZodType = z + .object({ + teamId: z.boolean().optional(), + teamName: z.boolean().optional(), + token: z.boolean().optional(), + createdAt: z.boolean().optional(), + }) + .strict() + +// FORECAST +//------------------------------------------------------ + +export const ForecastIncludeSchema: z.ZodType = z + .object({ + option: z + .union([z.boolean(), z.lazy(() => QuestionOptionArgsSchema)]) + .optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +export const ForecastArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => ForecastSelectSchema).optional(), + include: z.lazy(() => ForecastIncludeSchema).optional(), + }) + .strict() + +export const ForecastSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + comment: z.boolean().optional(), + forecast: z.boolean().optional(), + profileId: z.boolean().optional(), + questionId: z.boolean().optional(), + optionId: z.boolean().optional(), + userId: z.boolean().optional(), + option: z + .union([z.boolean(), z.lazy(() => QuestionOptionArgsSchema)]) + .optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +// QUESTION SCORE +//------------------------------------------------------ + +export const QuestionScoreIncludeSchema: z.ZodType = + z + .object({ + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + QuestionOption: z + .union([z.boolean(), z.lazy(() => QuestionOptionArgsSchema)]) + .optional(), + }) + .strict() + +export const QuestionScoreArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => QuestionScoreSelectSchema).optional(), + include: z.lazy(() => QuestionScoreIncludeSchema).optional(), + }) + .strict() + +export const QuestionScoreSelectSchema: z.ZodType = + z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + relativeScore: z.boolean().optional(), + questionId: z.boolean().optional(), + userQuestionComboId: z.boolean().optional(), + absoluteScore: z.boolean().optional(), + rank: z.boolean().optional(), + userId: z.boolean().optional(), + questionOptionId: z.boolean().optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + QuestionOption: z + .union([z.boolean(), z.lazy(() => QuestionOptionArgsSchema)]) + .optional(), + }) + .strict() + +// QUESTION OPTION +//------------------------------------------------------ + +export const QuestionOptionIncludeSchema: z.ZodType = + z + .object({ + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + _count: z + .union([ + z.boolean(), + z.lazy(() => QuestionOptionCountOutputTypeArgsSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => QuestionOptionSelectSchema).optional(), + include: z.lazy(() => QuestionOptionIncludeSchema).optional(), + }) + .strict() + +export const QuestionOptionCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => QuestionOptionCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const QuestionOptionCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + forecasts: z.boolean().optional(), + questionScores: z.boolean().optional(), + }) + .strict() + +export const QuestionOptionSelectSchema: z.ZodType = + z + .object({ + id: z.boolean().optional(), + questionId: z.boolean().optional(), + text: z.boolean().optional(), + resolution: z.boolean().optional(), + createdAt: z.boolean().optional(), + userId: z.boolean().optional(), + resolvedAt: z.boolean().optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + _count: z + .union([ + z.boolean(), + z.lazy(() => QuestionOptionCountOutputTypeArgsSchema), + ]) + .optional(), + }) + .strict() + +// QUESTION +//------------------------------------------------------ + +export const QuestionIncludeSchema: z.ZodType = z + .object({ + options: z + .union([z.boolean(), z.lazy(() => QuestionOptionFindManyArgsSchema)]) + .optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + pingResolveMessages: z + .union([z.boolean(), z.lazy(() => PingSlackMessageFindManyArgsSchema)]) + .optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + sharedWith: z + .union([z.boolean(), z.lazy(() => UserFindManyArgsSchema)]) + .optional(), + sharedWithLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + questionMessages: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageFindManyArgsSchema), + ]) + .optional(), + resolutionMessages: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageFindManyArgsSchema), + ]) + .optional(), + comments: z + .union([z.boolean(), z.lazy(() => CommentFindManyArgsSchema)]) + .optional(), + tags: z + .union([z.boolean(), z.lazy(() => TagFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + notifications: z + .union([z.boolean(), z.lazy(() => NotificationFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => QuestionCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const QuestionArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => QuestionSelectSchema).optional(), + include: z.lazy(() => QuestionIncludeSchema).optional(), + }) + .strict() + +export const QuestionCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => QuestionCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const QuestionCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + options: z.boolean().optional(), + forecasts: z.boolean().optional(), + pingResolveMessages: z.boolean().optional(), + sharedWith: z.boolean().optional(), + sharedWithLists: z.boolean().optional(), + questionScores: z.boolean().optional(), + questionMessages: z.boolean().optional(), + resolutionMessages: z.boolean().optional(), + comments: z.boolean().optional(), + tags: z.boolean().optional(), + tournaments: z.boolean().optional(), + notifications: z.boolean().optional(), + }) + .strict() + +export const QuestionSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + comment: z.boolean().optional(), + profileId: z.boolean().optional(), + title: z.boolean().optional(), + type: z.boolean().optional(), + resolveBy: z.boolean().optional(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z.boolean().optional(), + resolvedAt: z.boolean().optional(), + notes: z.boolean().optional(), + hideForecastsUntil: z.boolean().optional(), + hideForecastsUntilPrediction: z.boolean().optional(), + userId: z.boolean().optional(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional(), + options: z + .union([z.boolean(), z.lazy(() => QuestionOptionFindManyArgsSchema)]) + .optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + pingResolveMessages: z + .union([z.boolean(), z.lazy(() => PingSlackMessageFindManyArgsSchema)]) + .optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + sharedWith: z + .union([z.boolean(), z.lazy(() => UserFindManyArgsSchema)]) + .optional(), + sharedWithLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + questionMessages: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageFindManyArgsSchema), + ]) + .optional(), + resolutionMessages: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageFindManyArgsSchema), + ]) + .optional(), + comments: z + .union([z.boolean(), z.lazy(() => CommentFindManyArgsSchema)]) + .optional(), + tags: z + .union([z.boolean(), z.lazy(() => TagFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + notifications: z + .union([z.boolean(), z.lazy(() => NotificationFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => QuestionCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// TAG +//------------------------------------------------------ + +export const TagIncludeSchema: z.ZodType = z + .object({ + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => TagCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const TagArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => TagSelectSchema).optional(), + include: z.lazy(() => TagIncludeSchema).optional(), + }) + .strict() + +export const TagCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => TagCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const TagCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + questions: z.boolean().optional(), + }) + .strict() + +export const TagSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + name: z.boolean().optional(), + userId: z.boolean().optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => TagCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// RESOLUTION SLACK MESSAGE +//------------------------------------------------------ + +export const ResolutionSlackMessageIncludeSchema: z.ZodType = + z + .object({ + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + profile: z + .union([z.boolean(), z.lazy(() => ProfileArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => ResolutionSlackMessageSelectSchema).optional(), + include: z.lazy(() => ResolutionSlackMessageIncludeSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageSelectSchema: z.ZodType = + z + .object({ + id: z.boolean().optional(), + questionId: z.boolean().optional(), + detailsId: z.boolean().optional(), + profileId: z.boolean().optional(), + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + profile: z + .union([z.boolean(), z.lazy(() => ProfileArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +// PING SLACK MESSAGE +//------------------------------------------------------ + +export const PingSlackMessageIncludeSchema: z.ZodType = + z + .object({ + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +export const PingSlackMessageArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => PingSlackMessageSelectSchema).optional(), + include: z.lazy(() => PingSlackMessageIncludeSchema).optional(), + }) + .strict() + +export const PingSlackMessageSelectSchema: z.ZodType = + z + .object({ + id: z.boolean().optional(), + questionId: z.boolean().optional(), + detailsId: z.boolean().optional(), + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +// QUESTION SLACK MESSAGE +//------------------------------------------------------ + +export const QuestionSlackMessageIncludeSchema: z.ZodType = + z + .object({ + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => QuestionSlackMessageSelectSchema).optional(), + include: z.lazy(() => QuestionSlackMessageIncludeSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageSelectSchema: z.ZodType = + z + .object({ + id: z.boolean().optional(), + questionId: z.boolean().optional(), + detailsId: z.boolean().optional(), + updatedAt: z.boolean().optional(), + message: z + .union([z.boolean(), z.lazy(() => SlackMessageArgsSchema)]) + .optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +// SLACK MESSAGE +//------------------------------------------------------ + +export const SlackMessageIncludeSchema: z.ZodType = + z + .object({ + pingSlackMessage: z + .union([z.boolean(), z.lazy(() => PingSlackMessageArgsSchema)]) + .optional(), + questionSlackMessage: z + .union([z.boolean(), z.lazy(() => QuestionSlackMessageArgsSchema)]) + .optional(), + resolutionSlackMessage: z + .union([z.boolean(), z.lazy(() => ResolutionSlackMessageArgsSchema)]) + .optional(), + }) + .strict() + +export const SlackMessageArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => SlackMessageSelectSchema).optional(), + include: z.lazy(() => SlackMessageIncludeSchema).optional(), + }) + .strict() + +export const SlackMessageSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + ts: z.boolean().optional(), + channel: z.boolean().optional(), + teamId: z.boolean().optional(), + pingSlackMessage: z + .union([z.boolean(), z.lazy(() => PingSlackMessageArgsSchema)]) + .optional(), + questionSlackMessage: z + .union([z.boolean(), z.lazy(() => QuestionSlackMessageArgsSchema)]) + .optional(), + resolutionSlackMessage: z + .union([z.boolean(), z.lazy(() => ResolutionSlackMessageArgsSchema)]) + .optional(), + }) + .strict() + +// USER +//------------------------------------------------------ + +export const UserIncludeSchema: z.ZodType = z + .object({ + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + profiles: z + .union([z.boolean(), z.lazy(() => ProfileFindManyArgsSchema)]) + .optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + questionsSharedWith: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + comments: z + .union([z.boolean(), z.lazy(() => CommentFindManyArgsSchema)]) + .optional(), + target: z.union([z.boolean(), z.lazy(() => TargetArgsSchema)]).optional(), + authorOfLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + memberOfLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + tags: z + .union([z.boolean(), z.lazy(() => TagFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + notifications: z + .union([z.boolean(), z.lazy(() => NotificationFindManyArgsSchema)]) + .optional(), + questionOptions: z + .union([z.boolean(), z.lazy(() => QuestionOptionFindManyArgsSchema)]) + .optional(), + accounts: z + .union([z.boolean(), z.lazy(() => AccountFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => UserCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const UserArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => UserSelectSchema).optional(), + include: z.lazy(() => UserIncludeSchema).optional(), + }) + .strict() + +export const UserCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => UserCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const UserCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + forecasts: z.boolean().optional(), + profiles: z.boolean().optional(), + questions: z.boolean().optional(), + questionScores: z.boolean().optional(), + questionsSharedWith: z.boolean().optional(), + comments: z.boolean().optional(), + authorOfLists: z.boolean().optional(), + memberOfLists: z.boolean().optional(), + tags: z.boolean().optional(), + tournaments: z.boolean().optional(), + notifications: z.boolean().optional(), + questionOptions: z.boolean().optional(), + accounts: z.boolean().optional(), + }) + .strict() + +export const UserSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + name: z.boolean().optional(), + createdAt: z.boolean().optional(), + email: z.boolean().optional(), + image: z.boolean().optional(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.boolean().optional(), + apiKey: z.boolean().optional(), + discordUserId: z.boolean().optional(), + emailVerified: z.boolean().optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + profiles: z + .union([z.boolean(), z.lazy(() => ProfileFindManyArgsSchema)]) + .optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + questionScores: z + .union([z.boolean(), z.lazy(() => QuestionScoreFindManyArgsSchema)]) + .optional(), + questionsSharedWith: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + comments: z + .union([z.boolean(), z.lazy(() => CommentFindManyArgsSchema)]) + .optional(), + target: z.union([z.boolean(), z.lazy(() => TargetArgsSchema)]).optional(), + authorOfLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + memberOfLists: z + .union([z.boolean(), z.lazy(() => UserListFindManyArgsSchema)]) + .optional(), + tags: z + .union([z.boolean(), z.lazy(() => TagFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + notifications: z + .union([z.boolean(), z.lazy(() => NotificationFindManyArgsSchema)]) + .optional(), + questionOptions: z + .union([z.boolean(), z.lazy(() => QuestionOptionFindManyArgsSchema)]) + .optional(), + accounts: z + .union([z.boolean(), z.lazy(() => AccountFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => UserCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// PROFILE +//------------------------------------------------------ + +export const ProfileIncludeSchema: z.ZodType = z + .object({ + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + resolutionMessages: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageFindManyArgsSchema), + ]) + .optional(), + target: z.union([z.boolean(), z.lazy(() => TargetArgsSchema)]).optional(), + _count: z + .union([z.boolean(), z.lazy(() => ProfileCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const ProfileArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => ProfileSelectSchema).optional(), + include: z.lazy(() => ProfileIncludeSchema).optional(), + }) + .strict() + +export const ProfileCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => ProfileCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const ProfileCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + forecasts: z.boolean().optional(), + questions: z.boolean().optional(), + resolutionMessages: z.boolean().optional(), + }) + .strict() + +export const ProfileSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + slackId: z.boolean().optional(), + slackTeamId: z.boolean().optional(), + userId: z.boolean().optional(), + forecasts: z + .union([z.boolean(), z.lazy(() => ForecastFindManyArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + resolutionMessages: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageFindManyArgsSchema), + ]) + .optional(), + target: z.union([z.boolean(), z.lazy(() => TargetArgsSchema)]).optional(), + _count: z + .union([z.boolean(), z.lazy(() => ProfileCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// GROUP +//------------------------------------------------------ + +export const GroupSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + type: z.boolean().optional(), + createdAt: z.boolean().optional(), + name: z.boolean().optional(), + slackTeamId: z.boolean().optional(), + }) + .strict() + +// TARGET +//------------------------------------------------------ + +export const TargetIncludeSchema: z.ZodType = z + .object({ + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + }) + .strict() + +export const TargetArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => TargetSelectSchema).optional(), + include: z.lazy(() => TargetIncludeSchema).optional(), + }) + .strict() + +export const TargetSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + userId: z.boolean().optional(), + profileId: z.boolean().optional(), + type: z.boolean().optional(), + goal: z.boolean().optional(), + lastFailedAt: z.boolean().optional(), + notifyOn: z.boolean().optional(), + lastNotified: z.boolean().optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + profile: z.union([z.boolean(), z.lazy(() => ProfileArgsSchema)]).optional(), + }) + .strict() + +// ACCOUNT +//------------------------------------------------------ + +export const AccountIncludeSchema: z.ZodType = z + .object({ + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +export const AccountArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => AccountSelectSchema).optional(), + include: z.lazy(() => AccountIncludeSchema).optional(), + }) + .strict() + +export const AccountSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + userId: z.boolean().optional(), + type: z.boolean().optional(), + provider: z.boolean().optional(), + providerAccountId: z.boolean().optional(), + refresh_token: z.boolean().optional(), + access_token: z.boolean().optional(), + expires_at: z.boolean().optional(), + token_type: z.boolean().optional(), + scope: z.boolean().optional(), + id_token: z.boolean().optional(), + session_state: z.boolean().optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +// COMMENT +//------------------------------------------------------ + +export const CommentIncludeSchema: z.ZodType = z + .object({ + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +export const CommentArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => CommentSelectSchema).optional(), + include: z.lazy(() => CommentIncludeSchema).optional(), + }) + .strict() + +export const CommentSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + comment: z.boolean().optional(), + questionId: z.boolean().optional(), + userId: z.boolean().optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + }) + .strict() + +// USER LIST +//------------------------------------------------------ + +export const UserListIncludeSchema: z.ZodType = z + .object({ + author: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + users: z + .union([z.boolean(), z.lazy(() => UserFindManyArgsSchema)]) + .optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => UserListCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const UserListArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => UserListSelectSchema).optional(), + include: z.lazy(() => UserListIncludeSchema).optional(), + }) + .strict() + +export const UserListCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => UserListCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const UserListCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + users: z.boolean().optional(), + questions: z.boolean().optional(), + tournaments: z.boolean().optional(), + }) + .strict() + +export const UserListSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + inviteId: z.boolean().optional(), + name: z.boolean().optional(), + emailDomains: z.boolean().optional(), + syncToSlackTeamId: z.boolean().optional(), + syncToSlackChannelId: z.boolean().optional(), + authorId: z.boolean().optional(), + author: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + users: z + .union([z.boolean(), z.lazy(() => UserFindManyArgsSchema)]) + .optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + tournaments: z + .union([z.boolean(), z.lazy(() => TournamentFindManyArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => UserListCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// TOURNAMENT +//------------------------------------------------------ + +export const TournamentIncludeSchema: z.ZodType = z + .object({ + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + author: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + userList: z + .union([z.boolean(), z.lazy(() => UserListArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => TournamentCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +export const TournamentArgsSchema: z.ZodType = z + .object({ + select: z.lazy(() => TournamentSelectSchema).optional(), + include: z.lazy(() => TournamentIncludeSchema).optional(), + }) + .strict() + +export const TournamentCountOutputTypeArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => TournamentCountOutputTypeSelectSchema).nullish(), + }) + .strict() + +export const TournamentCountOutputTypeSelectSchema: z.ZodType = + z + .object({ + questions: z.boolean().optional(), + }) + .strict() + +export const TournamentSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + name: z.boolean().optional(), + description: z.boolean().optional(), + authorId: z.boolean().optional(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.boolean().optional(), + syncToSlackTeamId: z.boolean().optional(), + syncToSlackChannelId: z.boolean().optional(), + questions: z + .union([z.boolean(), z.lazy(() => QuestionFindManyArgsSchema)]) + .optional(), + author: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + userList: z + .union([z.boolean(), z.lazy(() => UserListArgsSchema)]) + .optional(), + _count: z + .union([z.boolean(), z.lazy(() => TournamentCountOutputTypeArgsSchema)]) + .optional(), + }) + .strict() + +// NOTIFICATION +//------------------------------------------------------ + +export const NotificationIncludeSchema: z.ZodType = + z + .object({ + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +export const NotificationArgsSchema: z.ZodType = + z + .object({ + select: z.lazy(() => NotificationSelectSchema).optional(), + include: z.lazy(() => NotificationIncludeSchema).optional(), + }) + .strict() + +export const NotificationSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + emailSentAt: z.boolean().optional(), + title: z.boolean().optional(), + content: z.boolean().optional(), + url: z.boolean().optional(), + tags: z.boolean().optional(), + read: z.boolean().optional(), + userId: z.boolean().optional(), + questionId: z.boolean().optional(), + user: z.union([z.boolean(), z.lazy(() => UserArgsSchema)]).optional(), + question: z + .union([z.boolean(), z.lazy(() => QuestionArgsSchema)]) + .optional(), + }) + .strict() + +// FEEDBACK +//------------------------------------------------------ + +export const FeedbackSelectSchema: z.ZodType = z + .object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + type: z.boolean().optional(), + message: z.boolean().optional(), + email: z.boolean().optional(), + userId: z.boolean().optional(), + }) + .strict() + +///////////////////////////////////////// +// INPUT TYPES +///////////////////////////////////////// + +export const WorkspaceWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => WorkspaceWhereInputSchema), + z.lazy(() => WorkspaceWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => WorkspaceWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => WorkspaceWhereInputSchema), + z.lazy(() => WorkspaceWhereInputSchema).array(), + ]) + .optional(), + teamId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + teamName: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + token: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + }) + .strict() + +export const WorkspaceOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + teamId: z.lazy(() => SortOrderSchema).optional(), + teamName: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + _relevance: z.lazy(() => WorkspaceOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const WorkspaceWhereUniqueInputSchema: z.ZodType = + z + .object({ + teamId: z.string(), + }) + .and( + z + .object({ + teamId: z.string().optional(), + AND: z + .union([ + z.lazy(() => WorkspaceWhereInputSchema), + z.lazy(() => WorkspaceWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => WorkspaceWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => WorkspaceWhereInputSchema), + z.lazy(() => WorkspaceWhereInputSchema).array(), + ]) + .optional(), + teamName: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + token: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + }) + .strict(), + ) + +export const WorkspaceOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + teamId: z.lazy(() => SortOrderSchema).optional(), + teamName: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + _count: z + .lazy(() => WorkspaceCountOrderByAggregateInputSchema) + .optional(), + _max: z.lazy(() => WorkspaceMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => WorkspaceMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const WorkspaceScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => WorkspaceScalarWhereWithAggregatesInputSchema), + z.lazy(() => WorkspaceScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => WorkspaceScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => WorkspaceScalarWhereWithAggregatesInputSchema), + z.lazy(() => WorkspaceScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + teamId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + teamName: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + token: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + }) + .strict() + +export const ForecastWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => ForecastWhereInputSchema), + z.lazy(() => ForecastWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ForecastWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ForecastWhereInputSchema), + z.lazy(() => ForecastWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + forecast: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + optionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + option: z + .union([ + z.lazy(() => QuestionOptionNullableRelationFilterSchema), + z.lazy(() => QuestionOptionWhereInputSchema), + ]) + .optional() + .nullable(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + optionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + option: z + .lazy(() => QuestionOptionOrderByWithRelationInputSchema) + .optional(), + profile: z.lazy(() => ProfileOrderByWithRelationInputSchema).optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + _relevance: z.lazy(() => ForecastOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const ForecastWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.number().int(), + }) + .and( + z + .object({ + id: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => ForecastWhereInputSchema), + z.lazy(() => ForecastWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ForecastWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ForecastWhereInputSchema), + z.lazy(() => ForecastWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + forecast: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number().int()]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + optionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + option: z + .union([ + z.lazy(() => QuestionOptionNullableRelationFilterSchema), + z.lazy(() => QuestionOptionWhereInputSchema), + ]) + .optional() + .nullable(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const ForecastOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + optionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ForecastCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => ForecastAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ForecastMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ForecastMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => ForecastSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const ForecastScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ForecastScalarWhereWithAggregatesInputSchema), + z.lazy(() => ForecastScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ForecastScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ForecastScalarWhereWithAggregatesInputSchema), + z.lazy(() => ForecastScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + comment: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z.lazy(() => DecimalWithAggregatesFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + profileId: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + optionId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const QuestionScoreWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionScoreWhereInputSchema), + z.lazy(() => QuestionScoreWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScoreWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScoreWhereInputSchema), + z.lazy(() => QuestionScoreWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + relativeScore: z + .union([ + z.lazy(() => DecimalNullableFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userQuestionComboId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + absoluteScore: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + rank: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionOptionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + QuestionOption: z + .union([ + z.lazy(() => QuestionOptionNullableRelationFilterSchema), + z.lazy(() => QuestionOptionWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userQuestionComboId: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionOptionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + QuestionOption: z + .lazy(() => QuestionOptionOrderByWithRelationInputSchema) + .optional(), + _relevance: z + .lazy(() => QuestionScoreOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const QuestionScoreWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.number().int(), + userQuestionComboId: z.string(), + }), + z.object({ + id: z.number().int(), + }), + z.object({ + userQuestionComboId: z.string(), + }), + ]) + .and( + z + .object({ + id: z.number().int().optional(), + userQuestionComboId: z.string().optional(), + AND: z + .union([ + z.lazy(() => QuestionScoreWhereInputSchema), + z.lazy(() => QuestionScoreWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScoreWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScoreWhereInputSchema), + z.lazy(() => QuestionScoreWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + relativeScore: z + .union([ + z.lazy(() => DecimalNullableFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + absoluteScore: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + rank: z + .union([z.lazy(() => IntFilterSchema), z.number().int()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionOptionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + QuestionOption: z + .union([ + z.lazy(() => QuestionOptionNullableRelationFilterSchema), + z.lazy(() => QuestionOptionWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const QuestionScoreOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userQuestionComboId: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionOptionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z + .lazy(() => QuestionScoreCountOrderByAggregateInputSchema) + .optional(), + _avg: z + .lazy(() => QuestionScoreAvgOrderByAggregateInputSchema) + .optional(), + _max: z + .lazy(() => QuestionScoreMaxOrderByAggregateInputSchema) + .optional(), + _min: z + .lazy(() => QuestionScoreMinOrderByAggregateInputSchema) + .optional(), + _sum: z + .lazy(() => QuestionScoreSumOrderByAggregateInputSchema) + .optional(), + }) + .strict() + +export const QuestionScoreScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionScoreScalarWhereWithAggregatesInputSchema), + z + .lazy(() => QuestionScoreScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScoreScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScoreScalarWhereWithAggregatesInputSchema), + z + .lazy(() => QuestionScoreScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + relativeScore: z + .union([ + z.lazy(() => DecimalNullableWithAggregatesFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + userQuestionComboId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + absoluteScore: z + .union([ + z.lazy(() => DecimalWithAggregatesFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + rank: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + questionOptionId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionOptionWhereInputSchema), + z.lazy(() => QuestionOptionWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionOptionWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionOptionWhereInputSchema), + z.lazy(() => QuestionOptionWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + text: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + resolvedAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + }) + .strict() + +export const QuestionOptionOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + text: z.lazy(() => SortOrderSchema).optional(), + resolution: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + forecasts: z + .lazy(() => ForecastOrderByRelationAggregateInputSchema) + .optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + questionScores: z + .lazy(() => QuestionScoreOrderByRelationAggregateInputSchema) + .optional(), + _relevance: z + .lazy(() => QuestionOptionOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const QuestionOptionWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid(), + }) + .and( + z + .object({ + id: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => QuestionOptionWhereInputSchema), + z.lazy(() => QuestionOptionWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionOptionWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionOptionWhereInputSchema), + z.lazy(() => QuestionOptionWhereInputSchema).array(), + ]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + text: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + resolvedAt: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + }) + .strict(), + ) + +export const QuestionOptionOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + text: z.lazy(() => SortOrderSchema).optional(), + resolution: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z + .lazy(() => QuestionOptionCountOrderByAggregateInputSchema) + .optional(), + _max: z + .lazy(() => QuestionOptionMaxOrderByAggregateInputSchema) + .optional(), + _min: z + .lazy(() => QuestionOptionMinOrderByAggregateInputSchema) + .optional(), + }) + .strict() + +export const QuestionOptionScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionOptionScalarWhereWithAggregatesInputSchema), + z + .lazy(() => QuestionOptionScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionOptionScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionOptionScalarWhereWithAggregatesInputSchema), + z + .lazy(() => QuestionOptionScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + text: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableWithAggregatesFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + resolvedAt: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => QuestionWhereInputSchema), + z.lazy(() => QuestionWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionWhereInputSchema), + z.lazy(() => QuestionWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + title: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + type: z + .union([ + z.lazy(() => EnumQuestionTypeFilterSchema), + z.lazy(() => QuestionTypeSchema), + ]) + .optional(), + resolveBy: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + resolved: z.union([z.lazy(() => BoolFilterSchema), z.boolean()]).optional(), + pingedForResolution: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + notes: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z.union([z.lazy(() => BoolFilterSchema), z.boolean()]).optional(), + exclusiveAnswers: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + options: z.lazy(() => QuestionOptionListRelationFilterSchema).optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageListRelationFilterSchema) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + sharedWith: z.lazy(() => UserListRelationFilterSchema).optional(), + sharedWithLists: z.lazy(() => UserListListRelationFilterSchema).optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + questionMessages: z + .lazy(() => QuestionSlackMessageListRelationFilterSchema) + .optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageListRelationFilterSchema) + .optional(), + comments: z.lazy(() => CommentListRelationFilterSchema).optional(), + tags: z.lazy(() => TagListRelationFilterSchema).optional(), + tournaments: z.lazy(() => TournamentListRelationFilterSchema).optional(), + notifications: z + .lazy(() => NotificationListRelationFilterSchema) + .optional(), + }) + .strict() + +export const QuestionOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + title: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + resolveBy: z.lazy(() => SortOrderSchema).optional(), + resolved: z.lazy(() => SortOrderSchema).optional(), + pingedForResolution: z.lazy(() => SortOrderSchema).optional(), + resolution: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + notes: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + hideForecastsUntil: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + hideForecastsUntilPrediction: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + exclusiveAnswers: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + options: z + .lazy(() => QuestionOptionOrderByRelationAggregateInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastOrderByRelationAggregateInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageOrderByRelationAggregateInputSchema) + .optional(), + profile: z.lazy(() => ProfileOrderByWithRelationInputSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + sharedWith: z + .lazy(() => UserOrderByRelationAggregateInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListOrderByRelationAggregateInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreOrderByRelationAggregateInputSchema) + .optional(), + questionMessages: z + .lazy(() => QuestionSlackMessageOrderByRelationAggregateInputSchema) + .optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageOrderByRelationAggregateInputSchema) + .optional(), + comments: z + .lazy(() => CommentOrderByRelationAggregateInputSchema) + .optional(), + tags: z.lazy(() => TagOrderByRelationAggregateInputSchema).optional(), + tournaments: z + .lazy(() => TournamentOrderByRelationAggregateInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationOrderByRelationAggregateInputSchema) + .optional(), + _relevance: z.lazy(() => QuestionOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const QuestionWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid(), + }) + .and( + z + .object({ + id: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => QuestionWhereInputSchema), + z.lazy(() => QuestionWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionWhereInputSchema), + z.lazy(() => QuestionWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number().int()]) + .optional() + .nullable(), + title: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + type: z + .union([ + z.lazy(() => EnumQuestionTypeFilterSchema), + z.lazy(() => QuestionTypeSchema), + ]) + .optional(), + resolveBy: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + resolved: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + pingedForResolution: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + notes: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + exclusiveAnswers: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionListRelationFilterSchema) + .optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageListRelationFilterSchema) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + sharedWith: z.lazy(() => UserListRelationFilterSchema).optional(), + sharedWithLists: z + .lazy(() => UserListListRelationFilterSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + questionMessages: z + .lazy(() => QuestionSlackMessageListRelationFilterSchema) + .optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageListRelationFilterSchema) + .optional(), + comments: z.lazy(() => CommentListRelationFilterSchema).optional(), + tags: z.lazy(() => TagListRelationFilterSchema).optional(), + tournaments: z + .lazy(() => TournamentListRelationFilterSchema) + .optional(), + notifications: z + .lazy(() => NotificationListRelationFilterSchema) + .optional(), + }) + .strict(), + ) + +export const QuestionOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + title: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + resolveBy: z.lazy(() => SortOrderSchema).optional(), + resolved: z.lazy(() => SortOrderSchema).optional(), + pingedForResolution: z.lazy(() => SortOrderSchema).optional(), + resolution: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + notes: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + hideForecastsUntil: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + hideForecastsUntilPrediction: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + exclusiveAnswers: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z.lazy(() => QuestionCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => QuestionAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => QuestionMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => QuestionMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => QuestionSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const QuestionScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionScalarWhereWithAggregatesInputSchema), + z.lazy(() => QuestionScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScalarWhereWithAggregatesInputSchema), + z.lazy(() => QuestionScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + comment: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + title: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + type: z + .union([ + z.lazy(() => EnumQuestionTypeWithAggregatesFilterSchema), + z.lazy(() => QuestionTypeSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + resolved: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + pingedForResolution: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableWithAggregatesFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.lazy(() => BoolNullableWithAggregatesFilterSchema), + z.boolean(), + ]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + exclusiveAnswers: z + .union([ + z.lazy(() => BoolNullableWithAggregatesFilterSchema), + z.boolean(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TagWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => TagWhereInputSchema), + z.lazy(() => TagWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TagWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TagWhereInputSchema), + z.lazy(() => TagWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + }) + .strict() + +export const TagOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + questions: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + _relevance: z.lazy(() => TagOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const TagWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.string().cuid(), + name_userId: z.lazy(() => TagNameUserIdCompoundUniqueInputSchema), + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + name_userId: z.lazy(() => TagNameUserIdCompoundUniqueInputSchema), + }), + ]) + .and( + z + .object({ + id: z.string().cuid().optional(), + name_userId: z + .lazy(() => TagNameUserIdCompoundUniqueInputSchema) + .optional(), + AND: z + .union([ + z.lazy(() => TagWhereInputSchema), + z.lazy(() => TagWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TagWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TagWhereInputSchema), + z.lazy(() => TagWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + }) + .strict(), + ) + +export const TagOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TagCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TagMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TagMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const TagScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TagScalarWhereWithAggregatesInputSchema), + z.lazy(() => TagScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TagScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TagScalarWhereWithAggregatesInputSchema), + z.lazy(() => TagScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + name: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ResolutionSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + message: z + .lazy(() => SlackMessageOrderByWithRelationInputSchema) + .optional(), + profile: z.lazy(() => ProfileOrderByWithRelationInputSchema).optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + _relevance: z + .lazy(() => ResolutionSlackMessageOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.number().int(), + detailsId: z.number().int(), + }), + z.object({ + id: z.number().int(), + }), + z.object({ + detailsId: z.number().int(), + }), + ]) + .and( + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ResolutionSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number().int()]) + .optional() + .nullable(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const ResolutionSlackMessageOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z + .lazy(() => ResolutionSlackMessageCountOrderByAggregateInputSchema) + .optional(), + _avg: z + .lazy(() => ResolutionSlackMessageAvgOrderByAggregateInputSchema) + .optional(), + _max: z + .lazy(() => ResolutionSlackMessageMaxOrderByAggregateInputSchema) + .optional(), + _min: z + .lazy(() => ResolutionSlackMessageMinOrderByAggregateInputSchema) + .optional(), + _sum: z + .lazy(() => ResolutionSlackMessageSumOrderByAggregateInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy( + () => ResolutionSlackMessageScalarWhereWithAggregatesInputSchema, + ), + z + .lazy( + () => ResolutionSlackMessageScalarWhereWithAggregatesInputSchema, + ) + .array(), + ]) + .optional(), + OR: z + .lazy(() => ResolutionSlackMessageScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy( + () => ResolutionSlackMessageScalarWhereWithAggregatesInputSchema, + ), + z + .lazy( + () => ResolutionSlackMessageScalarWhereWithAggregatesInputSchema, + ) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + profileId: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const PingSlackMessageWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => PingSlackMessageWhereInputSchema), + z.lazy(() => PingSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => PingSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => PingSlackMessageWhereInputSchema), + z.lazy(() => PingSlackMessageWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + message: z + .lazy(() => SlackMessageOrderByWithRelationInputSchema) + .optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + _relevance: z + .lazy(() => PingSlackMessageOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const PingSlackMessageWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.number().int(), + detailsId: z.number().int(), + }), + z.object({ + id: z.number().int(), + }), + z.object({ + detailsId: z.number().int(), + }), + ]) + .and( + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => PingSlackMessageWhereInputSchema), + z.lazy(() => PingSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => PingSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => PingSlackMessageWhereInputSchema), + z.lazy(() => PingSlackMessageWhereInputSchema).array(), + ]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const PingSlackMessageOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + _count: z + .lazy(() => PingSlackMessageCountOrderByAggregateInputSchema) + .optional(), + _avg: z + .lazy(() => PingSlackMessageAvgOrderByAggregateInputSchema) + .optional(), + _max: z + .lazy(() => PingSlackMessageMaxOrderByAggregateInputSchema) + .optional(), + _min: z + .lazy(() => PingSlackMessageMinOrderByAggregateInputSchema) + .optional(), + _sum: z + .lazy(() => PingSlackMessageSumOrderByAggregateInputSchema) + .optional(), + }) + .strict() + +export const PingSlackMessageScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereWithAggregatesInputSchema), + z + .lazy(() => PingSlackMessageScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + OR: z + .lazy(() => PingSlackMessageScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereWithAggregatesInputSchema), + z + .lazy(() => PingSlackMessageScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionSlackMessageWhereInputSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionSlackMessageWhereInputSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + updatedAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + message: z + .lazy(() => SlackMessageOrderByWithRelationInputSchema) + .optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + _relevance: z + .lazy(() => QuestionSlackMessageOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const QuestionSlackMessageWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.number().int(), + detailsId: z.number().int(), + }), + z.object({ + id: z.number().int(), + }), + z.object({ + detailsId: z.number().int(), + }), + ]) + .and( + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => QuestionSlackMessageWhereInputSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionSlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionSlackMessageWhereInputSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema).array(), + ]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + updatedAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + message: z + .union([ + z.lazy(() => SlackMessageRelationFilterSchema), + z.lazy(() => SlackMessageWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const QuestionSlackMessageOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + _count: z + .lazy(() => QuestionSlackMessageCountOrderByAggregateInputSchema) + .optional(), + _avg: z + .lazy(() => QuestionSlackMessageAvgOrderByAggregateInputSchema) + .optional(), + _max: z + .lazy(() => QuestionSlackMessageMaxOrderByAggregateInputSchema) + .optional(), + _min: z + .lazy(() => QuestionSlackMessageMinOrderByAggregateInputSchema) + .optional(), + _sum: z + .lazy(() => QuestionSlackMessageSumOrderByAggregateInputSchema) + .optional(), + }) + .strict() + +export const QuestionSlackMessageScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy( + () => QuestionSlackMessageScalarWhereWithAggregatesInputSchema, + ), + z + .lazy( + () => QuestionSlackMessageScalarWhereWithAggregatesInputSchema, + ) + .array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionSlackMessageScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy( + () => QuestionSlackMessageScalarWhereWithAggregatesInputSchema, + ), + z + .lazy( + () => QuestionSlackMessageScalarWhereWithAggregatesInputSchema, + ) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + updatedAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + }) + .strict() + +export const SlackMessageWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => SlackMessageWhereInputSchema), + z.lazy(() => SlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => SlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => SlackMessageWhereInputSchema), + z.lazy(() => SlackMessageWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + ts: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + channel: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + teamId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + pingSlackMessage: z + .union([ + z.lazy(() => PingSlackMessageNullableRelationFilterSchema), + z.lazy(() => PingSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + questionSlackMessage: z + .union([ + z.lazy(() => QuestionSlackMessageNullableRelationFilterSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + resolutionSlackMessage: z + .union([ + z.lazy(() => ResolutionSlackMessageNullableRelationFilterSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const SlackMessageOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + ts: z.lazy(() => SortOrderSchema).optional(), + channel: z.lazy(() => SortOrderSchema).optional(), + teamId: z.lazy(() => SortOrderSchema).optional(), + pingSlackMessage: z + .lazy(() => PingSlackMessageOrderByWithRelationInputSchema) + .optional(), + questionSlackMessage: z + .lazy(() => QuestionSlackMessageOrderByWithRelationInputSchema) + .optional(), + resolutionSlackMessage: z + .lazy(() => ResolutionSlackMessageOrderByWithRelationInputSchema) + .optional(), + _relevance: z + .lazy(() => SlackMessageOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const SlackMessageWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.number().int(), + }) + .and( + z + .object({ + id: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => SlackMessageWhereInputSchema), + z.lazy(() => SlackMessageWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => SlackMessageWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => SlackMessageWhereInputSchema), + z.lazy(() => SlackMessageWhereInputSchema).array(), + ]) + .optional(), + ts: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + channel: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + teamId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + pingSlackMessage: z + .union([ + z.lazy(() => PingSlackMessageNullableRelationFilterSchema), + z.lazy(() => PingSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + questionSlackMessage: z + .union([ + z.lazy(() => QuestionSlackMessageNullableRelationFilterSchema), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + resolutionSlackMessage: z + .union([ + z.lazy(() => ResolutionSlackMessageNullableRelationFilterSchema), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const SlackMessageOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + ts: z.lazy(() => SortOrderSchema).optional(), + channel: z.lazy(() => SortOrderSchema).optional(), + teamId: z.lazy(() => SortOrderSchema).optional(), + _count: z + .lazy(() => SlackMessageCountOrderByAggregateInputSchema) + .optional(), + _avg: z.lazy(() => SlackMessageAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => SlackMessageMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => SlackMessageMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => SlackMessageSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const SlackMessageScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => SlackMessageScalarWhereWithAggregatesInputSchema), + z + .lazy(() => SlackMessageScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + OR: z + .lazy(() => SlackMessageScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => SlackMessageScalarWhereWithAggregatesInputSchema), + z + .lazy(() => SlackMessageScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + ts: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + channel: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + teamId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const UserWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => UserWhereInputSchema), + z.lazy(() => UserWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserWhereInputSchema), + z.lazy(() => UserWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + name: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + email: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + image: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + staleReminder: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unsubscribedFromEmailsAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + apiKey: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + discordUserId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + emailVerified: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + profiles: z.lazy(() => ProfileListRelationFilterSchema).optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionListRelationFilterSchema) + .optional(), + comments: z.lazy(() => CommentListRelationFilterSchema).optional(), + target: z + .union([ + z.lazy(() => TargetNullableRelationFilterSchema), + z.lazy(() => TargetWhereInputSchema), + ]) + .optional() + .nullable(), + authorOfLists: z.lazy(() => UserListListRelationFilterSchema).optional(), + memberOfLists: z.lazy(() => UserListListRelationFilterSchema).optional(), + tags: z.lazy(() => TagListRelationFilterSchema).optional(), + tournaments: z.lazy(() => TournamentListRelationFilterSchema).optional(), + notifications: z + .lazy(() => NotificationListRelationFilterSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionListRelationFilterSchema) + .optional(), + accounts: z.lazy(() => AccountListRelationFilterSchema).optional(), + }) + .strict() + +export const UserOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + name: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + image: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + staleReminder: z.lazy(() => SortOrderSchema).optional(), + unsubscribedFromEmailsAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + apiKey: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + discordUserId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + emailVerified: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + forecasts: z + .lazy(() => ForecastOrderByRelationAggregateInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileOrderByRelationAggregateInputSchema) + .optional(), + questions: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreOrderByRelationAggregateInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + comments: z + .lazy(() => CommentOrderByRelationAggregateInputSchema) + .optional(), + target: z.lazy(() => TargetOrderByWithRelationInputSchema).optional(), + authorOfLists: z + .lazy(() => UserListOrderByRelationAggregateInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListOrderByRelationAggregateInputSchema) + .optional(), + tags: z.lazy(() => TagOrderByRelationAggregateInputSchema).optional(), + tournaments: z + .lazy(() => TournamentOrderByRelationAggregateInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationOrderByRelationAggregateInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionOrderByRelationAggregateInputSchema) + .optional(), + accounts: z + .lazy(() => AccountOrderByRelationAggregateInputSchema) + .optional(), + _relevance: z.lazy(() => UserOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const UserWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.string().cuid(), + email: z.string(), + discordUserId: z.string(), + }), + z.object({ + id: z.string().cuid(), + email: z.string(), + }), + z.object({ + id: z.string().cuid(), + discordUserId: z.string(), + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + email: z.string(), + discordUserId: z.string(), + }), + z.object({ + email: z.string(), + }), + z.object({ + discordUserId: z.string(), + }), + ]) + .and( + z + .object({ + id: z.string().cuid().optional(), + email: z.string().optional(), + discordUserId: z.string().optional(), + AND: z + .union([ + z.lazy(() => UserWhereInputSchema), + z.lazy(() => UserWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserWhereInputSchema), + z.lazy(() => UserWhereInputSchema).array(), + ]) + .optional(), + name: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + image: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + staleReminder: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + apiKey: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + profiles: z.lazy(() => ProfileListRelationFilterSchema).optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + questionScores: z + .lazy(() => QuestionScoreListRelationFilterSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionListRelationFilterSchema) + .optional(), + comments: z.lazy(() => CommentListRelationFilterSchema).optional(), + target: z + .union([ + z.lazy(() => TargetNullableRelationFilterSchema), + z.lazy(() => TargetWhereInputSchema), + ]) + .optional() + .nullable(), + authorOfLists: z + .lazy(() => UserListListRelationFilterSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListListRelationFilterSchema) + .optional(), + tags: z.lazy(() => TagListRelationFilterSchema).optional(), + tournaments: z + .lazy(() => TournamentListRelationFilterSchema) + .optional(), + notifications: z + .lazy(() => NotificationListRelationFilterSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionListRelationFilterSchema) + .optional(), + accounts: z.lazy(() => AccountListRelationFilterSchema).optional(), + }) + .strict(), + ) + +export const UserOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + name: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + image: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + staleReminder: z.lazy(() => SortOrderSchema).optional(), + unsubscribedFromEmailsAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + apiKey: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + discordUserId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + emailVerified: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z.lazy(() => UserCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => UserMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => UserMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const UserScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => UserScalarWhereWithAggregatesInputSchema), + z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserScalarWhereWithAggregatesInputSchema), + z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + name: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + email: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + image: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + staleReminder: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ProfileWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => ProfileWhereInputSchema), + z.lazy(() => ProfileWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ProfileWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ProfileWhereInputSchema), + z.lazy(() => ProfileWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + slackId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + slackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageListRelationFilterSchema) + .optional(), + target: z + .union([ + z.lazy(() => TargetNullableRelationFilterSchema), + z.lazy(() => TargetWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ProfileOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + slackId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + slackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + forecasts: z + .lazy(() => ForecastOrderByRelationAggregateInputSchema) + .optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + questions: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageOrderByRelationAggregateInputSchema) + .optional(), + target: z.lazy(() => TargetOrderByWithRelationInputSchema).optional(), + _relevance: z.lazy(() => ProfileOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const ProfileWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.number().int(), + }) + .and( + z + .object({ + id: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => ProfileWhereInputSchema), + z.lazy(() => ProfileWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ProfileWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ProfileWhereInputSchema), + z.lazy(() => ProfileWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + slackId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + slackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + forecasts: z.lazy(() => ForecastListRelationFilterSchema).optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + resolutionMessages: z + .lazy(() => ResolutionSlackMessageListRelationFilterSchema) + .optional(), + target: z + .union([ + z.lazy(() => TargetNullableRelationFilterSchema), + z.lazy(() => TargetWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const ProfileOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + slackId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + slackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ProfileCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => ProfileAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ProfileMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ProfileMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => ProfileSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const ProfileScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ProfileScalarWhereWithAggregatesInputSchema), + z.lazy(() => ProfileScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ProfileScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ProfileScalarWhereWithAggregatesInputSchema), + z.lazy(() => ProfileScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + slackId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const GroupWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => GroupWhereInputSchema), + z.lazy(() => GroupWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => GroupWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => GroupWhereInputSchema), + z.lazy(() => GroupWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + type: z + .union([ + z.lazy(() => EnumGroupTypeFilterSchema), + z.lazy(() => GroupTypeSchema), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + slackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const GroupOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _relevance: z.lazy(() => GroupOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const GroupWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.number().int(), + }) + .and( + z + .object({ + id: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => GroupWhereInputSchema), + z.lazy(() => GroupWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => GroupWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => GroupWhereInputSchema), + z.lazy(() => GroupWhereInputSchema).array(), + ]) + .optional(), + type: z + .union([ + z.lazy(() => EnumGroupTypeFilterSchema), + z.lazy(() => GroupTypeSchema), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + slackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const GroupOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z.lazy(() => GroupCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => GroupAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => GroupMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => GroupMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => GroupSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const GroupScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => GroupScalarWhereWithAggregatesInputSchema), + z.lazy(() => GroupScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => GroupScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => GroupScalarWhereWithAggregatesInputSchema), + z.lazy(() => GroupScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + type: z + .union([ + z.lazy(() => EnumGroupTypeWithAggregatesFilterSchema), + z.lazy(() => GroupTypeSchema), + ]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + name: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + slackTeamId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TargetWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => TargetWhereInputSchema), + z.lazy(() => TargetWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TargetWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TargetWhereInputSchema), + z.lazy(() => TargetWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + type: z + .union([ + z.lazy(() => EnumTargetTypeFilterSchema), + z.lazy(() => TargetTypeSchema), + ]) + .optional(), + goal: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + lastFailedAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => EnumDayOfTheWeekFilterSchema), + z.lazy(() => DayOfTheWeekSchema), + ]) + .optional(), + lastNotified: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TargetOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + type: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + lastFailedAt: z.lazy(() => SortOrderSchema).optional(), + notifyOn: z.lazy(() => SortOrderSchema).optional(), + lastNotified: z.lazy(() => SortOrderSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + profile: z.lazy(() => ProfileOrderByWithRelationInputSchema).optional(), + _relevance: z.lazy(() => TargetOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const TargetWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.number().int(), + userId: z.string(), + profileId: z.number().int(), + }), + z.object({ + id: z.number().int(), + userId: z.string(), + }), + z.object({ + id: z.number().int(), + profileId: z.number().int(), + }), + z.object({ + id: z.number().int(), + }), + z.object({ + userId: z.string(), + profileId: z.number().int(), + }), + z.object({ + userId: z.string(), + }), + z.object({ + profileId: z.number().int(), + }), + ]) + .and( + z + .object({ + id: z.number().int().optional(), + userId: z.string().optional(), + profileId: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => TargetWhereInputSchema), + z.lazy(() => TargetWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TargetWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TargetWhereInputSchema), + z.lazy(() => TargetWhereInputSchema).array(), + ]) + .optional(), + type: z + .union([ + z.lazy(() => EnumTargetTypeFilterSchema), + z.lazy(() => TargetTypeSchema), + ]) + .optional(), + goal: z + .union([z.lazy(() => IntFilterSchema), z.number().int()]) + .optional(), + lastFailedAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => EnumDayOfTheWeekFilterSchema), + z.lazy(() => DayOfTheWeekSchema), + ]) + .optional(), + lastNotified: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + profile: z + .union([ + z.lazy(() => ProfileNullableRelationFilterSchema), + z.lazy(() => ProfileWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const TargetOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + profileId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + type: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + lastFailedAt: z.lazy(() => SortOrderSchema).optional(), + notifyOn: z.lazy(() => SortOrderSchema).optional(), + lastNotified: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TargetCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => TargetAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TargetMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TargetMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => TargetSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const TargetScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TargetScalarWhereWithAggregatesInputSchema), + z.lazy(() => TargetScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TargetScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TargetScalarWhereWithAggregatesInputSchema), + z.lazy(() => TargetScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + profileId: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + type: z + .union([ + z.lazy(() => EnumTargetTypeWithAggregatesFilterSchema), + z.lazy(() => TargetTypeSchema), + ]) + .optional(), + goal: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + lastFailedAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => EnumDayOfTheWeekWithAggregatesFilterSchema), + z.lazy(() => DayOfTheWeekSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + }) + .strict() + +export const AccountWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => AccountWhereInputSchema), + z.lazy(() => AccountWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => AccountWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => AccountWhereInputSchema), + z.lazy(() => AccountWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + type: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + provider: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + providerAccountId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + refresh_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + access_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + expires_at: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + token_type: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + scope: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + id_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + session_state: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const AccountOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + provider: z.lazy(() => SortOrderSchema).optional(), + providerAccountId: z.lazy(() => SortOrderSchema).optional(), + refresh_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + access_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + expires_at: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + token_type: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + scope: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + id_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + session_state: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + _relevance: z.lazy(() => AccountOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const AccountWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.string().cuid(), + provider_providerAccountId: z.lazy( + () => AccountProviderProviderAccountIdCompoundUniqueInputSchema, + ), + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + provider_providerAccountId: z.lazy( + () => AccountProviderProviderAccountIdCompoundUniqueInputSchema, + ), + }), + ]) + .and( + z + .object({ + id: z.string().cuid().optional(), + provider_providerAccountId: z + .lazy( + () => AccountProviderProviderAccountIdCompoundUniqueInputSchema, + ) + .optional(), + AND: z + .union([ + z.lazy(() => AccountWhereInputSchema), + z.lazy(() => AccountWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => AccountWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => AccountWhereInputSchema), + z.lazy(() => AccountWhereInputSchema).array(), + ]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + type: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + provider: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + providerAccountId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + refresh_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + access_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + expires_at: z + .union([z.lazy(() => IntNullableFilterSchema), z.number().int()]) + .optional() + .nullable(), + token_type: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + scope: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + id_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + session_state: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const AccountOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + provider: z.lazy(() => SortOrderSchema).optional(), + providerAccountId: z.lazy(() => SortOrderSchema).optional(), + refresh_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + access_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + expires_at: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + token_type: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + scope: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + id_token: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + session_state: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z.lazy(() => AccountCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => AccountAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => AccountMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => AccountMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => AccountSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const AccountScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => AccountScalarWhereWithAggregatesInputSchema), + z.lazy(() => AccountScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => AccountScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => AccountScalarWhereWithAggregatesInputSchema), + z.lazy(() => AccountScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + type: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + provider: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + providerAccountId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + refresh_token: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const CommentWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => CommentWhereInputSchema), + z.lazy(() => CommentWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => CommentWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => CommentWhereInputSchema), + z.lazy(() => CommentWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userId: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict() + +export const CommentOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + _relevance: z.lazy(() => CommentOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const CommentWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.number().int(), + }) + .and( + z + .object({ + id: z.number().int().optional(), + AND: z + .union([ + z.lazy(() => CommentWhereInputSchema), + z.lazy(() => CommentWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => CommentWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => CommentWhereInputSchema), + z.lazy(() => CommentWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + }) + .strict(), + ) + +export const CommentOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => CommentCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => CommentAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => CommentMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => CommentMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => CommentSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const CommentScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => CommentScalarWhereWithAggregatesInputSchema), + z.lazy(() => CommentScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => CommentScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => CommentScalarWhereWithAggregatesInputSchema), + z.lazy(() => CommentScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => IntWithAggregatesFilterSchema), z.number()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + comment: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const UserListWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => UserListWhereInputSchema), + z.lazy(() => UserListWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserListWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserListWhereInputSchema), + z.lazy(() => UserListWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + inviteId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + emailDomains: z.lazy(() => StringNullableListFilterSchema).optional(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + author: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + users: z.lazy(() => UserListRelationFilterSchema).optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + tournaments: z.lazy(() => TournamentListRelationFilterSchema).optional(), + }) + .strict() + +export const UserListOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + inviteId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + name: z.lazy(() => SortOrderSchema).optional(), + emailDomains: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackChannelId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + author: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + users: z.lazy(() => UserOrderByRelationAggregateInputSchema).optional(), + questions: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentOrderByRelationAggregateInputSchema) + .optional(), + _relevance: z.lazy(() => UserListOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const UserListWhereUniqueInputSchema: z.ZodType = + z + .union([ + z.object({ + id: z.string().cuid(), + inviteId: z.string().cuid(), + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + inviteId: z.string().cuid(), + }), + ]) + .and( + z + .object({ + id: z.string().cuid().optional(), + inviteId: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => UserListWhereInputSchema), + z.lazy(() => UserListWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserListWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserListWhereInputSchema), + z.lazy(() => UserListWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + emailDomains: z.lazy(() => StringNullableListFilterSchema).optional(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + author: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + users: z.lazy(() => UserListRelationFilterSchema).optional(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + tournaments: z + .lazy(() => TournamentListRelationFilterSchema) + .optional(), + }) + .strict(), + ) + +export const UserListOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + inviteId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + name: z.lazy(() => SortOrderSchema).optional(), + emailDomains: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackChannelId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => UserListCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => UserListMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => UserListMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const UserListScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => UserListScalarWhereWithAggregatesInputSchema), + z.lazy(() => UserListScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserListScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserListScalarWhereWithAggregatesInputSchema), + z.lazy(() => UserListScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + inviteId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + name: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + emailDomains: z.lazy(() => StringNullableListFilterSchema).optional(), + syncToSlackTeamId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const TournamentWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TournamentWhereInputSchema), + z.lazy(() => TournamentWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TournamentWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TournamentWhereInputSchema), + z.lazy(() => TournamentWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + description: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + userListId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + showLeaderboard: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + predictYourYear: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + author: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + userList: z + .union([ + z.lazy(() => UserListNullableRelationFilterSchema), + z.lazy(() => UserListWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TournamentOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + userListId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z.lazy(() => SortOrderSchema).optional(), + showLeaderboard: z.lazy(() => SortOrderSchema).optional(), + predictYourYear: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackChannelId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + questions: z + .lazy(() => QuestionOrderByRelationAggregateInputSchema) + .optional(), + author: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + userList: z.lazy(() => UserListOrderByWithRelationInputSchema).optional(), + _relevance: z + .lazy(() => TournamentOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const TournamentWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid(), + }) + .and( + z + .object({ + id: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => TournamentWhereInputSchema), + z.lazy(() => TournamentWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TournamentWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TournamentWhereInputSchema), + z.lazy(() => TournamentWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + description: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + userListId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + showLeaderboard: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + predictYourYear: z + .union([z.lazy(() => IntNullableFilterSchema), z.number().int()]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + questions: z.lazy(() => QuestionListRelationFilterSchema).optional(), + author: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + userList: z + .union([ + z.lazy(() => UserListNullableRelationFilterSchema), + z.lazy(() => UserListWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const TournamentOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + userListId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z.lazy(() => SortOrderSchema).optional(), + showLeaderboard: z.lazy(() => SortOrderSchema).optional(), + predictYourYear: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + syncToSlackChannelId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z + .lazy(() => TournamentCountOrderByAggregateInputSchema) + .optional(), + _avg: z.lazy(() => TournamentAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TournamentMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TournamentMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => TournamentSumOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const TournamentScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TournamentScalarWhereWithAggregatesInputSchema), + z.lazy(() => TournamentScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TournamentScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TournamentScalarWhereWithAggregatesInputSchema), + z.lazy(() => TournamentScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + name: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + description: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + userListId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + showLeaderboard: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + predictYourYear: z + .union([ + z.lazy(() => IntNullableWithAggregatesFilterSchema), + z.number(), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => NotificationWhereInputSchema), + z.lazy(() => NotificationWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => NotificationWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => NotificationWhereInputSchema), + z.lazy(() => NotificationWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + emailSentAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + title: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + content: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + url: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + tags: z.lazy(() => StringNullableListFilterSchema).optional(), + read: z.union([z.lazy(() => BoolFilterSchema), z.boolean()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionNullableRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + emailSentAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + title: z.lazy(() => SortOrderSchema).optional(), + content: z.lazy(() => SortOrderSchema).optional(), + url: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + tags: z.lazy(() => SortOrderSchema).optional(), + read: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + question: z.lazy(() => QuestionOrderByWithRelationInputSchema).optional(), + _relevance: z + .lazy(() => NotificationOrderByRelevanceInputSchema) + .optional(), + }) + .strict() + +export const NotificationWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid(), + }) + .and( + z + .object({ + id: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => NotificationWhereInputSchema), + z.lazy(() => NotificationWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => NotificationWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => NotificationWhereInputSchema), + z.lazy(() => NotificationWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + emailSentAt: z + .union([ + z.lazy(() => DateTimeNullableFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + title: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + content: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + url: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + tags: z.lazy(() => StringNullableListFilterSchema).optional(), + read: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + user: z + .union([ + z.lazy(() => UserRelationFilterSchema), + z.lazy(() => UserWhereInputSchema), + ]) + .optional(), + question: z + .union([ + z.lazy(() => QuestionNullableRelationFilterSchema), + z.lazy(() => QuestionWhereInputSchema), + ]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const NotificationOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + emailSentAt: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + title: z.lazy(() => SortOrderSchema).optional(), + content: z.lazy(() => SortOrderSchema).optional(), + url: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + tags: z.lazy(() => SortOrderSchema).optional(), + read: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z + .lazy(() => NotificationCountOrderByAggregateInputSchema) + .optional(), + _max: z.lazy(() => NotificationMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => NotificationMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const NotificationScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => NotificationScalarWhereWithAggregatesInputSchema), + z + .lazy(() => NotificationScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + OR: z + .lazy(() => NotificationScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => NotificationScalarWhereWithAggregatesInputSchema), + z + .lazy(() => NotificationScalarWhereWithAggregatesInputSchema) + .array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + emailSentAt: z + .union([ + z.lazy(() => DateTimeNullableWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional() + .nullable(), + title: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + content: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + url: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + tags: z.lazy(() => StringNullableListFilterSchema).optional(), + read: z + .union([z.lazy(() => BoolWithAggregatesFilterSchema), z.boolean()]) + .optional(), + userId: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + questionId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackWhereInputSchema: z.ZodType = z + .object({ + AND: z + .union([ + z.lazy(() => FeedbackWhereInputSchema), + z.lazy(() => FeedbackWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => FeedbackWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => FeedbackWhereInputSchema), + z.lazy(() => FeedbackWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + type: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + message: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + email: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackOrderByWithRelationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + message: z.lazy(() => SortOrderSchema).optional(), + email: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _relevance: z.lazy(() => FeedbackOrderByRelevanceInputSchema).optional(), + }) + .strict() + +export const FeedbackWhereUniqueInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid(), + }) + .and( + z + .object({ + id: z.string().cuid().optional(), + AND: z + .union([ + z.lazy(() => FeedbackWhereInputSchema), + z.lazy(() => FeedbackWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => FeedbackWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => FeedbackWhereInputSchema), + z.lazy(() => FeedbackWhereInputSchema).array(), + ]) + .optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + type: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + message: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + email: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict(), + ) + +export const FeedbackOrderByWithAggregationInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + message: z.lazy(() => SortOrderSchema).optional(), + email: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + userId: z + .union([ + z.lazy(() => SortOrderSchema), + z.lazy(() => SortOrderInputSchema), + ]) + .optional(), + _count: z.lazy(() => FeedbackCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => FeedbackMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => FeedbackMinOrderByAggregateInputSchema).optional(), + }) + .strict() + +export const FeedbackScalarWhereWithAggregatesInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => FeedbackScalarWhereWithAggregatesInputSchema), + z.lazy(() => FeedbackScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => FeedbackScalarWhereWithAggregatesInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => FeedbackScalarWhereWithAggregatesInputSchema), + z.lazy(() => FeedbackScalarWhereWithAggregatesInputSchema).array(), + ]) + .optional(), + id: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + createdAt: z + .union([ + z.lazy(() => DateTimeWithAggregatesFilterSchema), + z.coerce.date(), + ]) + .optional(), + type: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + message: z + .union([z.lazy(() => StringWithAggregatesFilterSchema), z.string()]) + .optional(), + email: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.lazy(() => StringNullableWithAggregatesFilterSchema), + z.string(), + ]) + .optional() + .nullable(), + }) + .strict() + +export const WorkspaceCreateInputSchema: z.ZodType = + z + .object({ + teamId: z.string(), + teamName: z.string(), + token: z.string(), + createdAt: z.coerce.date().optional(), + }) + .strict() + +export const WorkspaceUncheckedCreateInputSchema: z.ZodType = + z + .object({ + teamId: z.string(), + teamName: z.string(), + token: z.string(), + createdAt: z.coerce.date().optional(), + }) + .strict() + +export const WorkspaceUpdateInputSchema: z.ZodType = + z + .object({ + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamName: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + token: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const WorkspaceUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamName: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + token: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const WorkspaceCreateManyInputSchema: z.ZodType = + z + .object({ + teamId: z.string(), + teamName: z.string(), + token: z.string(), + createdAt: z.coerce.date().optional(), + }) + .strict() + +export const WorkspaceUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamName: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + token: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const WorkspaceUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamName: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + token: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastCreateInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + option: z + .lazy(() => QuestionOptionCreateNestedOneWithoutForecastsInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutForecastsInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutForecastsInputSchema, + ), + user: z.lazy(() => UserCreateNestedOneWithoutForecastsInputSchema), + }) + .strict() + +export const ForecastUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const ForecastUpdateInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + option: z + .lazy(() => QuestionOptionUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const ForecastUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreCreateInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutQuestionScoresInputSchema, + ), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionScoresInputSchema), + QuestionOption: z + .lazy( + () => QuestionOptionCreateNestedOneWithoutQuestionScoresInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionScoreUpdateInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy( + () => QuestionUpdateOneRequiredWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionScoresNestedInputSchema) + .optional(), + QuestionOption: z + .lazy( + () => QuestionOptionUpdateOneWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionScoreUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + question: z.lazy(() => QuestionCreateNestedOneWithoutOptionsInputSchema), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutOptionInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionOptionsInputSchema), + questionScores: z + .lazy( + () => QuestionScoreCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutOptionInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutOptionsNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutOptionNestedInputSchema) + .optional(), + user: z + .lazy( + () => UserUpdateOneRequiredWithoutQuestionOptionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutOptionNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + }) + .strict() + +export const QuestionOptionUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + }) + .strict() + +export const QuestionUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TagCreateInputSchema: z.ZodType = z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + user: z.lazy(() => UserCreateNestedOneWithoutTagsInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutTagsInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + userId: z.string(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutTagsInputSchema) + .optional(), + }) + .strict() + +export const TagUpdateInputSchema: z.ZodType = z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutTagsNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutTagsNestedInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutTagsNestedInputSchema) + .optional(), + }) + .strict() + +export const TagCreateManyInputSchema: z.ZodType = z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + userId: z.string(), + }) + .strict() + +export const TagUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateInputSchema: z.ZodType = + z + .object({ + message: z.lazy( + () => + SlackMessageCreateNestedOneWithoutResolutionSlackMessageInputSchema, + ), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutResolutionMessagesInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutResolutionMessagesInputSchema, + ), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + profileId: z.number().int().optional().nullable(), + }) + .strict() + +export const ResolutionSlackMessageUpdateInputSchema: z.ZodType = + z + .object({ + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutResolutionSlackMessageNestedInputSchema, + ) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutResolutionMessagesNestedInputSchema) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutResolutionMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ResolutionSlackMessageCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + profileId: z.number().int().optional().nullable(), + }) + .strict() + +export const ResolutionSlackMessageUpdateManyMutationInputSchema: z.ZodType = + z.object({}).strict() + +export const ResolutionSlackMessageUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const PingSlackMessageCreateInputSchema: z.ZodType = + z + .object({ + message: z.lazy( + () => SlackMessageCreateNestedOneWithoutPingSlackMessageInputSchema, + ), + question: z.lazy( + () => QuestionCreateNestedOneWithoutPingResolveMessagesInputSchema, + ), + }) + .strict() + +export const PingSlackMessageUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + }) + .strict() + +export const PingSlackMessageUpdateInputSchema: z.ZodType = + z + .object({ + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutPingSlackMessageNestedInputSchema, + ) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutPingResolveMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + }) + .strict() + +export const PingSlackMessageUpdateManyMutationInputSchema: z.ZodType = + z.object({}).strict() + +export const PingSlackMessageUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageCreateInputSchema: z.ZodType = + z + .object({ + updatedAt: z.coerce.date().optional(), + message: z.lazy( + () => SlackMessageCreateNestedOneWithoutQuestionSlackMessageInputSchema, + ), + question: z.lazy( + () => QuestionCreateNestedOneWithoutQuestionMessagesInputSchema, + ), + }) + .strict() + +export const QuestionSlackMessageUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + updatedAt: z.coerce.date().optional(), + }) + .strict() + +export const QuestionSlackMessageUpdateInputSchema: z.ZodType = + z + .object({ + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutQuestionSlackMessageNestedInputSchema, + ) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutQuestionMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + updatedAt: z.coerce.date().optional(), + }) + .strict() + +export const QuestionSlackMessageUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const SlackMessageCreateInputSchema: z.ZodType = + z + .object({ + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy(() => PingSlackMessageCreateNestedOneWithoutMessageInputSchema) + .optional(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUpdateInputSchema: z.ZodType = + z + .object({ + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy(() => PingSlackMessageUpdateOneWithoutMessageNestedInputSchema) + .optional(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), + }) + .strict() + +export const SlackMessageUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserCreateInputSchema: z.ZodType = z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUpdateInputSchema: z.ZodType = z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputSchema)]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + }) + .strict() + +export const UserUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const UserUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ProfileCreateInputSchema: z.ZodType = z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutProfileInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutProfilesInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUpdateInputSchema: z.ZodType = z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutProfileNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutProfilesNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const ProfileUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ProfileUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const GroupCreateInputSchema: z.ZodType = z + .object({ + type: z.lazy(() => GroupTypeSchema), + createdAt: z.coerce.date().optional(), + name: z.string(), + slackTeamId: z.string().optional().nullable(), + }) + .strict() + +export const GroupUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + type: z.lazy(() => GroupTypeSchema), + createdAt: z.coerce.date().optional(), + name: z.string(), + slackTeamId: z.string().optional().nullable(), + }) + .strict() + +export const GroupUpdateInputSchema: z.ZodType = z + .object({ + type: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => EnumGroupTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const GroupUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => EnumGroupTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const GroupCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + type: z.lazy(() => GroupTypeSchema), + createdAt: z.coerce.date().optional(), + name: z.string(), + slackTeamId: z.string().optional().nullable(), + }) + .strict() + +export const GroupUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + type: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => EnumGroupTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const GroupUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => EnumGroupTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TargetCreateInputSchema: z.ZodType = z + .object({ + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + user: z.lazy(() => UserCreateNestedOneWithoutTargetInputSchema), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutTargetInputSchema) + .optional(), + }) + .strict() + +export const TargetUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + userId: z.string(), + profileId: z.number().int().optional().nullable(), + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + }) + .strict() + +export const TargetUpdateInputSchema: z.ZodType = z + .object({ + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutTargetNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutTargetNestedInputSchema) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TargetCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + userId: z.string(), + profileId: z.number().int().optional().nullable(), + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + }) + .strict() + +export const TargetUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const AccountCreateInputSchema: z.ZodType = z + .object({ + id: z.string().cuid().optional(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + user: z.lazy(() => UserCreateNestedOneWithoutAccountsInputSchema), + }) + .strict() + +export const AccountUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + userId: z.string(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + }) + .strict() + +export const AccountUpdateInputSchema: z.ZodType = z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + provider: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + providerAccountId: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutAccountsNestedInputSchema) + .optional(), + }) + .strict() + +export const AccountUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const AccountCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + userId: z.string(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + }) + .strict() + +export const AccountUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const AccountUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const CommentCreateInputSchema: z.ZodType = z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string(), + question: z.lazy(() => QuestionCreateNestedOneWithoutCommentsInputSchema), + user: z.lazy(() => UserCreateNestedOneWithoutCommentsInputSchema), + }) + .strict() + +export const CommentUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + questionId: z.string(), + userId: z.string(), + }) + .strict() + +export const CommentUpdateInputSchema: z.ZodType = z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputSchema)]) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutCommentsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutCommentsNestedInputSchema) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const CommentCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + questionId: z.string(), + userId: z.string(), + }) + .strict() + +export const CommentUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + author: z.lazy(() => UserCreateNestedOneWithoutAuthorOfListsInputSchema), + users: z + .lazy(() => UserCreateNestedManyWithoutMemberOfListsInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithListsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutUserListInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + authorId: z.string(), + users: z + .lazy( + () => UserUncheckedCreateNestedManyWithoutMemberOfListsInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedCreateNestedManyWithoutSharedWithListsInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutUserListInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutAuthorOfListsNestedInputSchema) + .optional(), + users: z + .lazy(() => UserUpdateManyWithoutMemberOfListsNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutSharedWithListsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutUserListNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + users: z + .lazy( + () => UserUncheckedUpdateManyWithoutMemberOfListsNestedInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedUpdateManyWithoutSharedWithListsNestedInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutUserListNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + authorId: z.string(), + }) + .strict() + +export const UserListUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const UserListUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TournamentCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutTournamentsInputSchema) + .optional(), + author: z.lazy(() => UserCreateNestedOneWithoutTournamentsInputSchema), + userList: z + .lazy(() => UserListCreateNestedOneWithoutTournamentsInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.string().optional().nullable(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutTournamentsInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy(() => QuestionUpdateManyWithoutTournamentsNestedInputSchema) + .optional(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutTournamentsNestedInputSchema) + .optional(), + userList: z + .lazy(() => UserListUpdateOneWithoutTournamentsNestedInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutTournamentsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.string().optional().nullable(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + }) + .strict() + +export const TournamentUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TournamentUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + user: z.lazy(() => UserCreateNestedOneWithoutNotificationsInputSchema), + question: z + .lazy(() => QuestionCreateNestedOneWithoutNotificationsInputSchema) + .optional(), + }) + .strict() + +export const NotificationUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + userId: z.string(), + questionId: z.string().optional().nullable(), + }) + .strict() + +export const NotificationUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutNotificationsNestedInputSchema) + .optional(), + question: z + .lazy(() => QuestionUpdateOneWithoutNotificationsNestedInputSchema) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + userId: z.string(), + questionId: z.string().optional().nullable(), + }) + .strict() + +export const NotificationUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + type: z.string(), + message: z.string(), + email: z.string().optional().nullable(), + userId: z.string().optional().nullable(), + }) + .strict() + +export const FeedbackUncheckedCreateInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + type: z.string(), + message: z.string(), + email: z.string().optional().nullable(), + userId: z.string().optional().nullable(), + }) + .strict() + +export const FeedbackUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackUncheckedUpdateInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackCreateManyInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + type: z.string(), + message: z.string(), + email: z.string().optional().nullable(), + userId: z.string().optional().nullable(), + }) + .strict() + +export const FeedbackUpdateManyMutationInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const FeedbackUncheckedUpdateManyInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const StringFilterSchema: z.ZodType = z + .object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z + .union([z.string(), z.lazy(() => NestedStringFilterSchema)]) + .optional(), + }) + .strict() + +export const DateTimeFilterSchema: z.ZodType = z + .object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([z.coerce.date(), z.lazy(() => NestedDateTimeFilterSchema)]) + .optional(), + }) + .strict() + +export const WorkspaceOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => WorkspaceOrderByRelevanceFieldEnumSchema), + z.lazy(() => WorkspaceOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const WorkspaceCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + teamId: z.lazy(() => SortOrderSchema).optional(), + teamName: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const WorkspaceMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + teamId: z.lazy(() => SortOrderSchema).optional(), + teamName: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const WorkspaceMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + teamId: z.lazy(() => SortOrderSchema).optional(), + teamName: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const StringWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z + .union([ + z.string(), + z.lazy(() => NestedStringWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional(), + }) + .strict() + +export const DateTimeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional(), + }) + .strict() + +export const IntFilterSchema: z.ZodType = z + .object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([z.number(), z.lazy(() => NestedIntFilterSchema)]).optional(), + }) + .strict() + +export const StringNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z + .union([z.string(), z.lazy(() => NestedStringNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const DecimalFilterSchema: z.ZodType = z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalFilterSchema), + ]) + .optional(), + }) + .strict() + +export const IntNullableFilterSchema: z.ZodType = z + .object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedIntNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => QuestionOptionWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => QuestionOptionWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const ProfileNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => ProfileWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => ProfileWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const QuestionRelationFilterSchema: z.ZodType = + z + .object({ + is: z.lazy(() => QuestionWhereInputSchema).optional(), + isNot: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const UserRelationFilterSchema: z.ZodType = z + .object({ + is: z.lazy(() => UserWhereInputSchema).optional(), + isNot: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const SortOrderInputSchema: z.ZodType = z + .object({ + sort: z.lazy(() => SortOrderSchema), + nulls: z.lazy(() => NullsOrderSchema).optional(), + }) + .strict() + +export const ForecastOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => ForecastOrderByRelevanceFieldEnumSchema), + z.lazy(() => ForecastOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const ForecastCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + optionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ForecastAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ForecastMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + optionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ForecastMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + optionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ForecastSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + forecast: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const IntWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedIntWithAggregatesFilterSchema)]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedFloatFilterSchema).optional(), + _sum: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedIntFilterSchema).optional(), + _max: z.lazy(() => NestedIntFilterSchema).optional(), + }) + .strict() + +export const StringNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z + .union([ + z.string(), + z.lazy(() => NestedStringNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional(), + }) + .strict() + +export const DecimalWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalFilterSchema).optional(), + }) + .strict() + +export const IntNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([ + z.number(), + z.lazy(() => NestedIntNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _avg: z.lazy(() => NestedFloatNullableFilterSchema).optional(), + _sum: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _max: z.lazy(() => NestedIntNullableFilterSchema).optional(), + }) + .strict() + +export const DecimalNullableFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => QuestionScoreOrderByRelevanceFieldEnumSchema), + z.lazy(() => QuestionScoreOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const QuestionScoreCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userQuestionComboId: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionOptionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionScoreAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionScoreMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userQuestionComboId: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionOptionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionScoreMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userQuestionComboId: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionOptionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionScoreSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + relativeScore: z.lazy(() => SortOrderSchema).optional(), + absoluteScore: z.lazy(() => SortOrderSchema).optional(), + rank: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const DecimalNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + }) + .strict() + +export const EnumResolutionNullableFilterSchema: z.ZodType = + z + .object({ + equals: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + in: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + notIn: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + not: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NestedEnumResolutionNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const DateTimeNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => ForecastWhereInputSchema).optional(), + some: z.lazy(() => ForecastWhereInputSchema).optional(), + none: z.lazy(() => ForecastWhereInputSchema).optional(), + }) + .strict() + +export const QuestionScoreListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => QuestionScoreWhereInputSchema).optional(), + some: z.lazy(() => QuestionScoreWhereInputSchema).optional(), + none: z.lazy(() => QuestionScoreWhereInputSchema).optional(), + }) + .strict() + +export const ForecastOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionScoreOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionOptionOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => QuestionOptionOrderByRelevanceFieldEnumSchema), + z.lazy(() => QuestionOptionOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const QuestionOptionCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + text: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionOptionMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + text: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionOptionMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + text: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const EnumResolutionNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + in: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + notIn: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + not: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NestedEnumResolutionNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedEnumResolutionNullableFilterSchema).optional(), + _max: z.lazy(() => NestedEnumResolutionNullableFilterSchema).optional(), + }) + .strict() + +export const DateTimeNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + }) + .strict() + +export const EnumQuestionTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => QuestionTypeSchema).optional(), + in: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => NestedEnumQuestionTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const BoolFilterSchema: z.ZodType = z + .object({ + equals: z.boolean().optional(), + not: z + .union([z.boolean(), z.lazy(() => NestedBoolFilterSchema)]) + .optional(), + }) + .strict() + +export const BoolNullableFilterSchema: z.ZodType = z + .object({ + equals: z.boolean().optional().nullable(), + not: z + .union([z.boolean(), z.lazy(() => NestedBoolNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + some: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + none: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + }) + .strict() + +export const PingSlackMessageListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => PingSlackMessageWhereInputSchema).optional(), + some: z.lazy(() => PingSlackMessageWhereInputSchema).optional(), + none: z.lazy(() => PingSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const UserListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => UserWhereInputSchema).optional(), + some: z.lazy(() => UserWhereInputSchema).optional(), + none: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserListListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => UserListWhereInputSchema).optional(), + some: z.lazy(() => UserListWhereInputSchema).optional(), + none: z.lazy(() => UserListWhereInputSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => QuestionSlackMessageWhereInputSchema).optional(), + some: z.lazy(() => QuestionSlackMessageWhereInputSchema).optional(), + none: z.lazy(() => QuestionSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => ResolutionSlackMessageWhereInputSchema).optional(), + some: z.lazy(() => ResolutionSlackMessageWhereInputSchema).optional(), + none: z.lazy(() => ResolutionSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const CommentListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => CommentWhereInputSchema).optional(), + some: z.lazy(() => CommentWhereInputSchema).optional(), + none: z.lazy(() => CommentWhereInputSchema).optional(), + }) + .strict() + +export const TagListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => TagWhereInputSchema).optional(), + some: z.lazy(() => TagWhereInputSchema).optional(), + none: z.lazy(() => TagWhereInputSchema).optional(), + }) + .strict() + +export const TournamentListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => TournamentWhereInputSchema).optional(), + some: z.lazy(() => TournamentWhereInputSchema).optional(), + none: z.lazy(() => TournamentWhereInputSchema).optional(), + }) + .strict() + +export const NotificationListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => NotificationWhereInputSchema).optional(), + some: z.lazy(() => NotificationWhereInputSchema).optional(), + none: z.lazy(() => NotificationWhereInputSchema).optional(), + }) + .strict() + +export const QuestionOptionOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserListOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TagOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TournamentOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const NotificationOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => QuestionOrderByRelevanceFieldEnumSchema), + z.lazy(() => QuestionOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const QuestionCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + resolveBy: z.lazy(() => SortOrderSchema).optional(), + resolved: z.lazy(() => SortOrderSchema).optional(), + pingedForResolution: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntil: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntilPrediction: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + exclusiveAnswers: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + resolveBy: z.lazy(() => SortOrderSchema).optional(), + resolved: z.lazy(() => SortOrderSchema).optional(), + pingedForResolution: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntil: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntilPrediction: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + exclusiveAnswers: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + resolveBy: z.lazy(() => SortOrderSchema).optional(), + resolved: z.lazy(() => SortOrderSchema).optional(), + pingedForResolution: z.lazy(() => SortOrderSchema).optional(), + resolution: z.lazy(() => SortOrderSchema).optional(), + resolvedAt: z.lazy(() => SortOrderSchema).optional(), + notes: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntil: z.lazy(() => SortOrderSchema).optional(), + hideForecastsUntilPrediction: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + exclusiveAnswers: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const EnumQuestionTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => QuestionTypeSchema).optional(), + in: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => NestedEnumQuestionTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumQuestionTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumQuestionTypeFilterSchema).optional(), + }) + .strict() + +export const BoolWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.boolean().optional(), + not: z + .union([ + z.boolean(), + z.lazy(() => NestedBoolWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedBoolFilterSchema).optional(), + _max: z.lazy(() => NestedBoolFilterSchema).optional(), + }) + .strict() + +export const BoolNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.boolean().optional().nullable(), + not: z + .union([ + z.boolean(), + z.lazy(() => NestedBoolNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedBoolNullableFilterSchema).optional(), + _max: z.lazy(() => NestedBoolNullableFilterSchema).optional(), + }) + .strict() + +export const QuestionListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => QuestionWhereInputSchema).optional(), + some: z.lazy(() => QuestionWhereInputSchema).optional(), + none: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TagOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => TagOrderByRelevanceFieldEnumSchema), + z.lazy(() => TagOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const TagNameUserIdCompoundUniqueInputSchema: z.ZodType = + z + .object({ + name: z.string(), + userId: z.string(), + }) + .strict() + +export const TagCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TagMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TagMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const SlackMessageRelationFilterSchema: z.ZodType = + z + .object({ + is: z.lazy(() => SlackMessageWhereInputSchema).optional(), + isNot: z.lazy(() => SlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => ResolutionSlackMessageOrderByRelevanceFieldEnumSchema), + z + .lazy(() => ResolutionSlackMessageOrderByRelevanceFieldEnumSchema) + .array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const ResolutionSlackMessageCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => PingSlackMessageOrderByRelevanceFieldEnumSchema), + z.lazy(() => PingSlackMessageOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const PingSlackMessageCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => QuestionSlackMessageOrderByRelevanceFieldEnumSchema), + z + .lazy(() => QuestionSlackMessageOrderByRelevanceFieldEnumSchema) + .array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const QuestionSlackMessageCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + detailsId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const PingSlackMessageNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => PingSlackMessageWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => PingSlackMessageWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const QuestionSlackMessageNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => QuestionSlackMessageWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => QuestionSlackMessageWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const ResolutionSlackMessageNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => ResolutionSlackMessageWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => ResolutionSlackMessageWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const SlackMessageOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => SlackMessageOrderByRelevanceFieldEnumSchema), + z.lazy(() => SlackMessageOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const SlackMessageCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + ts: z.lazy(() => SortOrderSchema).optional(), + channel: z.lazy(() => SortOrderSchema).optional(), + teamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const SlackMessageAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const SlackMessageMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + ts: z.lazy(() => SortOrderSchema).optional(), + channel: z.lazy(() => SortOrderSchema).optional(), + teamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const SlackMessageMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + ts: z.lazy(() => SortOrderSchema).optional(), + channel: z.lazy(() => SortOrderSchema).optional(), + teamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const SlackMessageSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => ProfileWhereInputSchema).optional(), + some: z.lazy(() => ProfileWhereInputSchema).optional(), + none: z.lazy(() => ProfileWhereInputSchema).optional(), + }) + .strict() + +export const TargetNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => TargetWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => TargetWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const AccountListRelationFilterSchema: z.ZodType = + z + .object({ + every: z.lazy(() => AccountWhereInputSchema).optional(), + some: z.lazy(() => AccountWhereInputSchema).optional(), + none: z.lazy(() => AccountWhereInputSchema).optional(), + }) + .strict() + +export const ProfileOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const AccountOrderByRelationAggregateInputSchema: z.ZodType = + z + .object({ + _count: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => UserOrderByRelevanceFieldEnumSchema), + z.lazy(() => UserOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const UserCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + image: z.lazy(() => SortOrderSchema).optional(), + staleReminder: z.lazy(() => SortOrderSchema).optional(), + unsubscribedFromEmailsAt: z.lazy(() => SortOrderSchema).optional(), + apiKey: z.lazy(() => SortOrderSchema).optional(), + discordUserId: z.lazy(() => SortOrderSchema).optional(), + emailVerified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + image: z.lazy(() => SortOrderSchema).optional(), + staleReminder: z.lazy(() => SortOrderSchema).optional(), + unsubscribedFromEmailsAt: z.lazy(() => SortOrderSchema).optional(), + apiKey: z.lazy(() => SortOrderSchema).optional(), + discordUserId: z.lazy(() => SortOrderSchema).optional(), + emailVerified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + image: z.lazy(() => SortOrderSchema).optional(), + staleReminder: z.lazy(() => SortOrderSchema).optional(), + unsubscribedFromEmailsAt: z.lazy(() => SortOrderSchema).optional(), + apiKey: z.lazy(() => SortOrderSchema).optional(), + discordUserId: z.lazy(() => SortOrderSchema).optional(), + emailVerified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => ProfileOrderByRelevanceFieldEnumSchema), + z.lazy(() => ProfileOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const ProfileCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + slackId: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + slackId: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + slackId: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const ProfileSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const EnumGroupTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => GroupTypeSchema).optional(), + in: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => NestedEnumGroupTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const GroupOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => GroupOrderByRelevanceFieldEnumSchema), + z.lazy(() => GroupOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const GroupCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const GroupAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const GroupMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const GroupMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + slackTeamId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const GroupSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const EnumGroupTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => GroupTypeSchema).optional(), + in: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => NestedEnumGroupTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumGroupTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumGroupTypeFilterSchema).optional(), + }) + .strict() + +export const EnumTargetTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => TargetTypeSchema).optional(), + in: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => NestedEnumTargetTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const EnumDayOfTheWeekFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => DayOfTheWeekSchema).optional(), + in: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + notIn: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => NestedEnumDayOfTheWeekFilterSchema), + ]) + .optional(), + }) + .strict() + +export const TargetOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => TargetOrderByRelevanceFieldEnumSchema), + z.lazy(() => TargetOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const TargetCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + lastFailedAt: z.lazy(() => SortOrderSchema).optional(), + notifyOn: z.lazy(() => SortOrderSchema).optional(), + lastNotified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TargetAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TargetMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + lastFailedAt: z.lazy(() => SortOrderSchema).optional(), + notifyOn: z.lazy(() => SortOrderSchema).optional(), + lastNotified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TargetMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + lastFailedAt: z.lazy(() => SortOrderSchema).optional(), + notifyOn: z.lazy(() => SortOrderSchema).optional(), + lastNotified: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TargetSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + profileId: z.lazy(() => SortOrderSchema).optional(), + goal: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const EnumTargetTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => TargetTypeSchema).optional(), + in: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => NestedEnumTargetTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTargetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTargetTypeFilterSchema).optional(), + }) + .strict() + +export const EnumDayOfTheWeekWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => DayOfTheWeekSchema).optional(), + in: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + notIn: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => NestedEnumDayOfTheWeekWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumDayOfTheWeekFilterSchema).optional(), + _max: z.lazy(() => NestedEnumDayOfTheWeekFilterSchema).optional(), + }) + .strict() + +export const AccountOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => AccountOrderByRelevanceFieldEnumSchema), + z.lazy(() => AccountOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const AccountProviderProviderAccountIdCompoundUniqueInputSchema: z.ZodType = + z + .object({ + provider: z.string(), + providerAccountId: z.string(), + }) + .strict() + +export const AccountCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + provider: z.lazy(() => SortOrderSchema).optional(), + providerAccountId: z.lazy(() => SortOrderSchema).optional(), + refresh_token: z.lazy(() => SortOrderSchema).optional(), + access_token: z.lazy(() => SortOrderSchema).optional(), + expires_at: z.lazy(() => SortOrderSchema).optional(), + token_type: z.lazy(() => SortOrderSchema).optional(), + scope: z.lazy(() => SortOrderSchema).optional(), + id_token: z.lazy(() => SortOrderSchema).optional(), + session_state: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const AccountAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + expires_at: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const AccountMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + provider: z.lazy(() => SortOrderSchema).optional(), + providerAccountId: z.lazy(() => SortOrderSchema).optional(), + refresh_token: z.lazy(() => SortOrderSchema).optional(), + access_token: z.lazy(() => SortOrderSchema).optional(), + expires_at: z.lazy(() => SortOrderSchema).optional(), + token_type: z.lazy(() => SortOrderSchema).optional(), + scope: z.lazy(() => SortOrderSchema).optional(), + id_token: z.lazy(() => SortOrderSchema).optional(), + session_state: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const AccountMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + provider: z.lazy(() => SortOrderSchema).optional(), + providerAccountId: z.lazy(() => SortOrderSchema).optional(), + refresh_token: z.lazy(() => SortOrderSchema).optional(), + access_token: z.lazy(() => SortOrderSchema).optional(), + expires_at: z.lazy(() => SortOrderSchema).optional(), + token_type: z.lazy(() => SortOrderSchema).optional(), + scope: z.lazy(() => SortOrderSchema).optional(), + id_token: z.lazy(() => SortOrderSchema).optional(), + session_state: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const AccountSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + expires_at: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => CommentOrderByRelevanceFieldEnumSchema), + z.lazy(() => CommentOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const CommentCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + comment: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const CommentSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const StringNullableListFilterSchema: z.ZodType = + z + .object({ + equals: z.string().array().optional().nullable(), + has: z.string().optional().nullable(), + hasEvery: z.string().array().optional(), + hasSome: z.string().array().optional(), + isEmpty: z.boolean().optional(), + }) + .strict() + +export const UserListOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => UserListOrderByRelevanceFieldEnumSchema), + z.lazy(() => UserListOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const UserListCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + inviteId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + emailDomains: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserListMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + inviteId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserListMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + inviteId: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const UserListNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => UserListWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => UserListWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const TournamentOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => TournamentOrderByRelevanceFieldEnumSchema), + z.lazy(() => TournamentOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const TournamentCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + userListId: z.lazy(() => SortOrderSchema).optional(), + anyoneInListCanEdit: z.lazy(() => SortOrderSchema).optional(), + showLeaderboard: z.lazy(() => SortOrderSchema).optional(), + predictYourYear: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TournamentAvgOrderByAggregateInputSchema: z.ZodType = + z + .object({ + predictYourYear: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TournamentMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + userListId: z.lazy(() => SortOrderSchema).optional(), + anyoneInListCanEdit: z.lazy(() => SortOrderSchema).optional(), + showLeaderboard: z.lazy(() => SortOrderSchema).optional(), + predictYourYear: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TournamentMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + authorId: z.lazy(() => SortOrderSchema).optional(), + sharedPublicly: z.lazy(() => SortOrderSchema).optional(), + unlisted: z.lazy(() => SortOrderSchema).optional(), + userListId: z.lazy(() => SortOrderSchema).optional(), + anyoneInListCanEdit: z.lazy(() => SortOrderSchema).optional(), + showLeaderboard: z.lazy(() => SortOrderSchema).optional(), + predictYourYear: z.lazy(() => SortOrderSchema).optional(), + syncToSlackTeamId: z.lazy(() => SortOrderSchema).optional(), + syncToSlackChannelId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const TournamentSumOrderByAggregateInputSchema: z.ZodType = + z + .object({ + predictYourYear: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const QuestionNullableRelationFilterSchema: z.ZodType = + z + .object({ + is: z + .lazy(() => QuestionWhereInputSchema) + .optional() + .nullable(), + isNot: z + .lazy(() => QuestionWhereInputSchema) + .optional() + .nullable(), + }) + .strict() + +export const NotificationOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => NotificationOrderByRelevanceFieldEnumSchema), + z.lazy(() => NotificationOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const NotificationCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + emailSentAt: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + content: z.lazy(() => SortOrderSchema).optional(), + url: z.lazy(() => SortOrderSchema).optional(), + tags: z.lazy(() => SortOrderSchema).optional(), + read: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const NotificationMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + emailSentAt: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + content: z.lazy(() => SortOrderSchema).optional(), + url: z.lazy(() => SortOrderSchema).optional(), + read: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const NotificationMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + emailSentAt: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + content: z.lazy(() => SortOrderSchema).optional(), + url: z.lazy(() => SortOrderSchema).optional(), + read: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + questionId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const FeedbackOrderByRelevanceInputSchema: z.ZodType = + z + .object({ + fields: z.union([ + z.lazy(() => FeedbackOrderByRelevanceFieldEnumSchema), + z.lazy(() => FeedbackOrderByRelevanceFieldEnumSchema).array(), + ]), + sort: z.lazy(() => SortOrderSchema), + search: z.string(), + }) + .strict() + +export const FeedbackCountOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + message: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const FeedbackMaxOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + message: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const FeedbackMinOrderByAggregateInputSchema: z.ZodType = + z + .object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + message: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + }) + .strict() + +export const StringFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.string().optional(), + }) + .strict() + +export const DateTimeFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.coerce.date().optional(), + }) + .strict() + +export const QuestionOptionCreateNestedOneWithoutForecastsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutForecastsInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutForecastsInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionOptionCreateOrConnectWithoutForecastsInputSchema) + .optional(), + connect: z.lazy(() => QuestionOptionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ProfileCreateNestedOneWithoutForecastsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutForecastsInputSchema) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutForecastsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutForecastsInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutForecastsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutForecastsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.string().optional().nullable(), + }) + .strict() + +export const DecimalFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + increment: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + decrement: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + multiply: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + divide: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + }) + .strict() + +export const QuestionOptionUpdateOneWithoutForecastsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutForecastsInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutForecastsInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionOptionCreateOrConnectWithoutForecastsInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionOptionUpsertWithoutForecastsInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => QuestionOptionWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => QuestionOptionWhereInputSchema)]) + .optional(), + connect: z.lazy(() => QuestionOptionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => QuestionOptionUpdateToOneWithWhereWithoutForecastsInputSchema, + ), + z.lazy(() => QuestionOptionUpdateWithoutForecastsInputSchema), + z.lazy( + () => QuestionOptionUncheckedUpdateWithoutForecastsInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const ProfileUpdateOneWithoutForecastsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutForecastsInputSchema) + .optional(), + upsert: z.lazy(() => ProfileUpsertWithoutForecastsInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => ProfileUpdateToOneWithWhereWithoutForecastsInputSchema), + z.lazy(() => ProfileUpdateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutForecastsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutForecastsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutForecastsInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutForecastsInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateToOneWithWhereWithoutForecastsInputSchema), + z.lazy(() => QuestionUpdateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutForecastsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutForecastsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutForecastsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutForecastsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutForecastsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutForecastsInputSchema), + z.lazy(() => UserUpdateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutForecastsInputSchema), + ]) + .optional(), + }) + .strict() + +export const IntFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.number().optional(), + increment: z.number().optional(), + decrement: z.number().optional(), + multiply: z.number().optional(), + divide: z.number().optional(), + }) + .strict() + +export const NullableIntFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.number().optional().nullable(), + increment: z.number().optional(), + decrement: z.number().optional(), + multiply: z.number().optional(), + divide: z.number().optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionScoresInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutQuestionScoresInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionScoresInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionScoresInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionOptionCreateNestedOneWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutQuestionScoresInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionOptionCreateOrConnectWithoutQuestionScoresInputSchema, + ) + .optional(), + connect: z.lazy(() => QuestionOptionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const NullableDecimalFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + increment: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + decrement: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + multiply: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + divide: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutQuestionScoresNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionScoresInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutQuestionScoresInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutQuestionScoresInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateToOneWithWhereWithoutQuestionScoresInputSchema, + ), + z.lazy(() => QuestionUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutQuestionScoresInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutQuestionScoresNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionScoresInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionScoresInputSchema) + .optional(), + upsert: z + .lazy(() => UserUpsertWithoutQuestionScoresInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => UserUpdateToOneWithWhereWithoutQuestionScoresInputSchema, + ), + z.lazy(() => UserUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionScoresInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUpdateOneWithoutQuestionScoresNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutQuestionScoresInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionOptionCreateOrConnectWithoutQuestionScoresInputSchema, + ) + .optional(), + upsert: z + .lazy(() => QuestionOptionUpsertWithoutQuestionScoresInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => QuestionOptionWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => QuestionOptionWhereInputSchema)]) + .optional(), + connect: z.lazy(() => QuestionOptionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + QuestionOptionUpdateToOneWithWhereWithoutQuestionScoresInputSchema, + ), + z.lazy(() => QuestionOptionUpdateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedUpdateWithoutQuestionScoresInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutOptionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutOptionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutOptionsInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ForecastCreateNestedManyWithoutOptionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastCreateWithoutOptionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyOptionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionOptionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionOptionsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionScoreCreateNestedManyWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z + .lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema) + .array(), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionOptionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedCreateNestedManyWithoutOptionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastCreateWithoutOptionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyOptionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateNestedManyWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z + .lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema) + .array(), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionOptionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NullableEnumResolutionFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + }) + .strict() + +export const NullableDateTimeFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.coerce.date().optional().nullable(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutOptionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutOptionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutOptionsInputSchema) + .optional(), + upsert: z.lazy(() => QuestionUpsertWithoutOptionsInputSchema).optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateToOneWithWhereWithoutOptionsInputSchema), + z.lazy(() => QuestionUpdateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutOptionsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUpdateManyWithoutOptionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastCreateWithoutOptionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutOptionInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutOptionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyOptionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutOptionInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutOptionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutOptionInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutOptionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutQuestionOptionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionOptionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionOptionsInputSchema) + .optional(), + upsert: z + .lazy(() => UserUpsertWithoutQuestionOptionsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => UserUpdateToOneWithWhereWithoutQuestionOptionsInputSchema, + ), + z.lazy(() => UserUpdateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionOptionsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUpdateManyWithoutQuestionOptionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z + .lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema) + .array(), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionOptionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + QuestionScoreUpdateManyWithWhereWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateManyWithWhereWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutOptionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastCreateWithoutOptionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutOptionInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutOptionInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutOptionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyOptionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutOptionInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutOptionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutOptionInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutOptionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutQuestionOptionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z + .lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema) + .array(), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionOptionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + QuestionScoreUpdateManyWithWhereWithoutQuestionOptionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateManyWithWhereWithoutQuestionOptionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastCreateWithoutQuestionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => PingSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileCreateNestedOneWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutQuestionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutQuestionsInputSchema) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedManyWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema).array(), + z.lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentCreateWithoutQuestionInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema), + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationCreateWithoutQuestionInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastCreateWithoutQuestionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => PingSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema).array(), + z.lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentCreateWithoutQuestionInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema), + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationCreateWithoutQuestionInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyQuestionInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const EnumQuestionTypeFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.lazy(() => QuestionTypeSchema).optional(), + }) + .strict() + +export const BoolFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.boolean().optional(), + }) + .strict() + +export const NullableBoolFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.boolean().optional().nullable(), + }) + .strict() + +export const QuestionOptionUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionOptionUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionOptionUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionOptionUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => QuestionOptionUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastCreateWithoutQuestionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + PingSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => PingSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + PingSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => PingSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereInputSchema), + z.lazy(() => PingSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileUpdateOneWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutQuestionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutQuestionsInputSchema) + .optional(), + upsert: z.lazy(() => ProfileUpsertWithoutQuestionsInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => ProfileUpdateToOneWithWhereWithoutQuestionsInputSchema), + z.lazy(() => ProfileUpdateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutQuestionsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutQuestionsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutQuestionsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutQuestionsInputSchema), + z.lazy(() => UserUpdateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema).array(), + z.lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + UserUpsertWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpsertWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + UserUpdateWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpdateWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => UserUpdateManyWithWhereWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpdateManyWithWhereWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => UserListUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => UserListUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => UserListUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => UserListUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutQuestionsInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionScoreUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => QuestionScoreUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema), + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentCreateWithoutQuestionInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => CommentUpsertWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => CommentUpsertWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => CommentUpdateWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => CommentUpdateWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => CommentUpdateManyWithWhereWithoutQuestionInputSchema), + z + .lazy(() => CommentUpdateManyWithWhereWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema), + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TagUpsertWithWhereUniqueWithoutQuestionsInputSchema), + z + .lazy(() => TagUpsertWithWhereUniqueWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TagUpdateWithWhereUniqueWithoutQuestionsInputSchema), + z + .lazy(() => TagUpdateWithWhereUniqueWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TagUpdateManyWithWhereWithoutQuestionsInputSchema), + z + .lazy(() => TagUpdateManyWithWhereWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => TournamentUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => TournamentUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => TournamentUpdateManyWithWhereWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpdateManyWithWhereWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationCreateWithoutQuestionInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => NotificationUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => NotificationUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => NotificationUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionOptionUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionOptionUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionOptionUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => QuestionOptionUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastCreateWithoutQuestionInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutQuestionInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => PingSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + PingSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => PingSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + z.lazy(() => PingSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + PingSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => PingSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + PingSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereInputSchema), + z.lazy(() => PingSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema).array(), + z.lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => UserCreateOrConnectWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + UserUpsertWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpsertWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + UserUpdateWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpdateWithWhereUniqueWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => UserUpdateManyWithWhereWithoutQuestionsSharedWithInputSchema, + ), + z + .lazy( + () => + UserUpdateManyWithWhereWithoutQuestionsSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => UserListCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => UserListUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => UserListUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => UserListUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => UserListUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutQuestionsInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionScoreUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionScoreUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => QuestionScoreUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + QuestionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema), + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentCreateWithoutQuestionInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => CommentCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => CommentUpsertWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => CommentUpsertWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => CommentUpdateWithWhereUniqueWithoutQuestionInputSchema), + z + .lazy(() => CommentUpdateWithWhereUniqueWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => CommentUpdateManyWithWhereWithoutQuestionInputSchema), + z + .lazy(() => CommentUpdateManyWithWhereWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema), + z.lazy(() => TagCreateOrConnectWithoutQuestionsInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TagUpsertWithWhereUniqueWithoutQuestionsInputSchema), + z + .lazy(() => TagUpsertWithWhereUniqueWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TagUpdateWithWhereUniqueWithoutQuestionsInputSchema), + z + .lazy(() => TagUpdateWithWhereUniqueWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TagUpdateManyWithWhereWithoutQuestionsInputSchema), + z + .lazy(() => TagUpdateManyWithWhereWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutQuestionsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => TournamentUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpsertWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => TournamentUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpdateWithWhereUniqueWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => TournamentUpdateManyWithWhereWithoutQuestionsInputSchema, + ), + z + .lazy( + () => TournamentUpdateManyWithWhereWithoutQuestionsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationCreateWithoutQuestionInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutQuestionInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => NotificationUpsertWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpsertWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyQuestionInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => NotificationUpdateWithWhereUniqueWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpdateWithWhereUniqueWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => NotificationUpdateManyWithWhereWithoutQuestionInputSchema, + ), + z + .lazy( + () => NotificationUpdateManyWithWhereWithoutQuestionInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutTagsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTagsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTagsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutTagsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionCreateWithoutTagsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutTagsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionCreateWithoutTagsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutTagsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTagsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTagsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutTagsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutTagsInputSchema), + z.lazy(() => UserUpdateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTagsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutTagsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionCreateWithoutTagsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutTagsInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutTagsInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutTagsInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutTagsInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutTagsInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutTagsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutTagsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionCreateWithoutTagsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutTagsInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutTagsInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutTagsInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutTagsInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutTagsInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutTagsInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutTagsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const SlackMessageCreateNestedOneWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy( + () => SlackMessageCreateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutResolutionSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => + SlackMessageCreateOrConnectWithoutResolutionSlackMessageInputSchema, + ) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ProfileCreateNestedOneWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutResolutionMessagesInputSchema) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutResolutionMessagesInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateOneRequiredWithoutResolutionSlackMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy( + () => SlackMessageCreateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutResolutionSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => + SlackMessageCreateOrConnectWithoutResolutionSlackMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => SlackMessageUpsertWithoutResolutionSlackMessageInputSchema) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + SlackMessageUpdateToOneWithWhereWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => SlackMessageUpdateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutResolutionSlackMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const ProfileUpdateOneWithoutResolutionMessagesNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutResolutionMessagesInputSchema) + .optional(), + upsert: z + .lazy(() => ProfileUpsertWithoutResolutionMessagesInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + ProfileUpdateToOneWithWhereWithoutResolutionMessagesInputSchema, + ), + z.lazy(() => ProfileUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutResolutionMessagesNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutResolutionMessagesInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutResolutionMessagesInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + QuestionUpdateToOneWithWhereWithoutResolutionMessagesInputSchema, + ), + z.lazy(() => QuestionUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const SlackMessageCreateNestedOneWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => SlackMessageCreateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedCreateWithoutPingSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => SlackMessageCreateOrConnectWithoutPingSlackMessageInputSchema, + ) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutPingResolveMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionCreateOrConnectWithoutPingResolveMessagesInputSchema, + ) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateOneRequiredWithoutPingSlackMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => SlackMessageCreateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedCreateWithoutPingSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => SlackMessageCreateOrConnectWithoutPingSlackMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => SlackMessageUpsertWithoutPingSlackMessageInputSchema) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + SlackMessageUpdateToOneWithWhereWithoutPingSlackMessageInputSchema, + ), + z.lazy(() => SlackMessageUpdateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedUpdateWithoutPingSlackMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutPingResolveMessagesNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutPingResolveMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionCreateOrConnectWithoutPingResolveMessagesInputSchema, + ) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutPingResolveMessagesInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + QuestionUpdateToOneWithWhereWithoutPingResolveMessagesInputSchema, + ), + z.lazy(() => QuestionUpdateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutPingResolveMessagesInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const SlackMessageCreateNestedOneWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy( + () => SlackMessageCreateWithoutQuestionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutQuestionSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => + SlackMessageCreateOrConnectWithoutQuestionSlackMessageInputSchema, + ) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutQuestionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutQuestionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutQuestionMessagesInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateOneRequiredWithoutQuestionSlackMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy( + () => SlackMessageCreateWithoutQuestionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutQuestionSlackMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => + SlackMessageCreateOrConnectWithoutQuestionSlackMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => SlackMessageUpsertWithoutQuestionSlackMessageInputSchema) + .optional(), + connect: z.lazy(() => SlackMessageWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + SlackMessageUpdateToOneWithWhereWithoutQuestionSlackMessageInputSchema, + ), + z.lazy( + () => SlackMessageUpdateWithoutQuestionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutQuestionSlackMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutQuestionMessagesNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutQuestionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutQuestionMessagesInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutQuestionMessagesInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutQuestionMessagesInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => + QuestionUpdateToOneWithWhereWithoutQuestionMessagesInputSchema, + ), + z.lazy(() => QuestionUpdateWithoutQuestionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutQuestionMessagesInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => PingSlackMessageCreateOrConnectWithoutMessageInputSchema) + .optional(), + connect: z.lazy(() => PingSlackMessageWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + connect: z + .lazy(() => QuestionSlackMessageWhereUniqueInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => ResolutionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + connect: z + .lazy(() => ResolutionSlackMessageWhereUniqueInputSchema) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => PingSlackMessageCreateOrConnectWithoutMessageInputSchema) + .optional(), + connect: z.lazy(() => PingSlackMessageWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + connect: z + .lazy(() => QuestionSlackMessageWhereUniqueInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => ResolutionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + connect: z + .lazy(() => ResolutionSlackMessageWhereUniqueInputSchema) + .optional(), + }) + .strict() + +export const PingSlackMessageUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => PingSlackMessageCreateOrConnectWithoutMessageInputSchema) + .optional(), + upsert: z + .lazy(() => PingSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => PingSlackMessageWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => PingSlackMessageWhereInputSchema)]) + .optional(), + connect: z.lazy(() => PingSlackMessageWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => PingSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => PingSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => QuestionSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional(), + delete: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional(), + connect: z + .lazy(() => QuestionSlackMessageWhereUniqueInputSchema) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => QuestionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => ResolutionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => ResolutionSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional(), + delete: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional(), + connect: z + .lazy(() => ResolutionSlackMessageWhereUniqueInputSchema) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => ResolutionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy(() => PingSlackMessageCreateOrConnectWithoutMessageInputSchema) + .optional(), + upsert: z + .lazy(() => PingSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => PingSlackMessageWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => PingSlackMessageWhereInputSchema)]) + .optional(), + connect: z.lazy(() => PingSlackMessageWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => PingSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => PingSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => PingSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => QuestionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => QuestionSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional(), + delete: z + .union([ + z.boolean(), + z.lazy(() => QuestionSlackMessageWhereInputSchema), + ]) + .optional(), + connect: z + .lazy(() => QuestionSlackMessageWhereUniqueInputSchema) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => QuestionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]) + .optional(), + connectOrCreate: z + .lazy( + () => ResolutionSlackMessageCreateOrConnectWithoutMessageInputSchema, + ) + .optional(), + upsert: z + .lazy(() => ResolutionSlackMessageUpsertWithoutMessageInputSchema) + .optional(), + disconnect: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional(), + delete: z + .union([ + z.boolean(), + z.lazy(() => ResolutionSlackMessageWhereInputSchema), + ]) + .optional(), + connect: z + .lazy(() => ResolutionSlackMessageWhereUniqueInputSchema) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema, + ), + z.lazy(() => ResolutionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]) + .optional(), + }) + .strict() + +export const ForecastCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastCreateWithoutUserInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileCreateWithoutUserInputSchema).array(), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ProfileCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentCreateWithoutUserInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema), + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetCreateNestedOneWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutUserInputSchema) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserListCreateNestedManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListCreateWithoutAuthorInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => UserListCreateManyAuthorInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListCreateNestedManyWithoutUsersInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListCreateWithoutUsersInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagCreateWithoutUserInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema), + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z.lazy(() => TagCreateManyUserInputEnvelopeSchema).optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentCreateNestedManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentCreateWithoutAuthorInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyAuthorInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationCreateWithoutUserInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const AccountCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountCreateWithoutUserInputSchema).array(), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema), + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => AccountCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastCreateWithoutUserInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileCreateWithoutUserInputSchema).array(), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => ProfileCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentCreateWithoutUserInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema), + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUncheckedCreateNestedOneWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutUserInputSchema) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserListUncheckedCreateNestedManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListCreateWithoutAuthorInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => UserListCreateManyAuthorInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateNestedManyWithoutUsersInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListCreateWithoutUsersInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagCreateWithoutUserInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema), + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z.lazy(() => TagCreateManyUserInputEnvelopeSchema).optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentCreateWithoutAuthorInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyAuthorInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationCreateWithoutUserInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const AccountUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountCreateWithoutUserInputSchema).array(), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema), + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z + .lazy(() => AccountCreateManyUserInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastCreateWithoutUserInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileCreateWithoutUserInputSchema).array(), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ProfileUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ProfileUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ProfileCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ProfileUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ProfileUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ProfileUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => ProfileUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ProfileScalarWhereInputSchema), + z.lazy(() => ProfileScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionScoreUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutSharedWithNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionUpsertWithWhereUniqueWithoutSharedWithInputSchema, + ), + z + .lazy( + () => QuestionUpsertWithWhereUniqueWithoutSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateWithWhereUniqueWithoutSharedWithInputSchema, + ), + z + .lazy( + () => QuestionUpdateWithWhereUniqueWithoutSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentCreateWithoutUserInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema), + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => CommentUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => CommentUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => CommentUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => CommentUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => CommentUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => CommentUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUpdateOneWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutUserInputSchema) + .optional(), + upsert: z.lazy(() => TargetUpsertWithoutUserInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => TargetUpdateToOneWithWhereWithoutUserInputSchema), + z.lazy(() => TargetUpdateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutUserInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateManyWithoutAuthorNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListCreateWithoutAuthorInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => UserListUpsertWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => UserListUpsertWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => UserListCreateManyAuthorInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => UserListUpdateWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => UserListUpdateWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutAuthorInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateManyWithoutUsersNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListCreateWithoutUsersInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => UserListUpsertWithWhereUniqueWithoutUsersInputSchema), + z + .lazy(() => UserListUpsertWithWhereUniqueWithoutUsersInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => UserListUpdateWithWhereUniqueWithoutUsersInputSchema), + z + .lazy(() => UserListUpdateWithWhereUniqueWithoutUsersInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutUsersInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutUsersInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagCreateWithoutUserInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema), + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TagUpsertWithWhereUniqueWithoutUserInputSchema), + z.lazy(() => TagUpsertWithWhereUniqueWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z.lazy(() => TagCreateManyUserInputEnvelopeSchema).optional(), + set: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TagUpdateWithWhereUniqueWithoutUserInputSchema), + z.lazy(() => TagUpdateWithWhereUniqueWithoutUserInputSchema).array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TagUpdateManyWithWhereWithoutUserInputSchema), + z.lazy(() => TagUpdateManyWithWhereWithoutUserInputSchema).array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUpdateManyWithoutAuthorNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentCreateWithoutAuthorInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TournamentUpsertWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpsertWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyAuthorInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TournamentUpdateWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpdateWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TournamentUpdateManyWithWhereWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpdateManyWithWhereWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationCreateWithoutUserInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => NotificationUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => NotificationUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => NotificationUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => NotificationUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => NotificationUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => NotificationUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionOptionUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const AccountUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountCreateWithoutUserInputSchema).array(), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema), + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => AccountUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => AccountUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => AccountCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => AccountUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => AccountUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => AccountUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => AccountUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => AccountScalarWhereInputSchema), + z.lazy(() => AccountScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastCreateWithoutUserInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ForecastCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileCreateWithoutUserInputSchema).array(), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema), + z.lazy(() => ProfileCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ProfileUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ProfileUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ProfileCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ProfileWhereUniqueInputSchema), + z.lazy(() => ProfileWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ProfileUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => ProfileUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ProfileUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => ProfileUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ProfileScalarWhereInputSchema), + z.lazy(() => ProfileScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema), + z.lazy(() => QuestionCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionScoreCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionScoreUpsertWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionScoreCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionScoreWhereUniqueInputSchema), + z.lazy(() => QuestionScoreWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionScoreUpdateWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionScoreUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionScoreUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionUpsertWithWhereUniqueWithoutSharedWithInputSchema, + ), + z + .lazy( + () => QuestionUpsertWithWhereUniqueWithoutSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateWithWhereUniqueWithoutSharedWithInputSchema, + ), + z + .lazy( + () => QuestionUpdateWithWhereUniqueWithoutSharedWithInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutSharedWithInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutSharedWithInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentCreateWithoutUserInputSchema).array(), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema), + z.lazy(() => CommentCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => CommentUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => CommentUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => CommentCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => CommentWhereUniqueInputSchema), + z.lazy(() => CommentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => CommentUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => CommentUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => CommentUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => CommentUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateOneWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutUserInputSchema) + .optional(), + upsert: z.lazy(() => TargetUpsertWithoutUserInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => TargetUpdateToOneWithWhereWithoutUserInputSchema), + z.lazy(() => TargetUpdateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutUserInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListCreateWithoutAuthorInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutAuthorInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => UserListUpsertWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => UserListUpsertWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => UserListCreateManyAuthorInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => UserListUpdateWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => UserListUpdateWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutAuthorInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutUsersNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListCreateWithoutUsersInputSchema).array(), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema), + z.lazy(() => UserListCreateOrConnectWithoutUsersInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => UserListUpsertWithWhereUniqueWithoutUsersInputSchema), + z + .lazy(() => UserListUpsertWithWhereUniqueWithoutUsersInputSchema) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserListWhereUniqueInputSchema), + z.lazy(() => UserListWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => UserListUpdateWithWhereUniqueWithoutUsersInputSchema), + z + .lazy(() => UserListUpdateWithWhereUniqueWithoutUsersInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserListUpdateManyWithWhereWithoutUsersInputSchema), + z + .lazy(() => UserListUpdateManyWithWhereWithoutUsersInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagCreateWithoutUserInputSchema).array(), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema), + z.lazy(() => TagCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TagUpsertWithWhereUniqueWithoutUserInputSchema), + z.lazy(() => TagUpsertWithWhereUniqueWithoutUserInputSchema).array(), + ]) + .optional(), + createMany: z.lazy(() => TagCreateManyUserInputEnvelopeSchema).optional(), + set: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TagWhereUniqueInputSchema), + z.lazy(() => TagWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TagUpdateWithWhereUniqueWithoutUserInputSchema), + z.lazy(() => TagUpdateWithWhereUniqueWithoutUserInputSchema).array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TagUpdateManyWithWhereWithoutUserInputSchema), + z.lazy(() => TagUpdateManyWithWhereWithoutUserInputSchema).array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentCreateWithoutAuthorInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => TournamentUpsertWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpsertWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyAuthorInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => TournamentUpdateWithWhereUniqueWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpdateWithWhereUniqueWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TournamentUpdateManyWithWhereWithoutAuthorInputSchema), + z + .lazy(() => TournamentUpdateManyWithWhereWithoutAuthorInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationCreateWithoutUserInputSchema).array(), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => NotificationUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => NotificationCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => NotificationCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => NotificationUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => NotificationUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => NotificationCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => NotificationWhereUniqueInputSchema), + z.lazy(() => NotificationWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => NotificationUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => NotificationUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => NotificationUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => NotificationUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema).array(), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema), + z + .lazy(() => QuestionOptionCreateOrConnectWithoutUserInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionOptionUpsertWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionOptionCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionOptionWhereUniqueInputSchema), + z.lazy(() => QuestionOptionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutUserInputSchema, + ), + z + .lazy( + () => QuestionOptionUpdateWithWhereUniqueWithoutUserInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionOptionUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => QuestionOptionUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const AccountUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountCreateWithoutUserInputSchema).array(), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema).array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema), + z.lazy(() => AccountCreateOrConnectWithoutUserInputSchema).array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => AccountUpsertWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => AccountUpsertWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => AccountCreateManyUserInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => AccountWhereUniqueInputSchema), + z.lazy(() => AccountWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => AccountUpdateWithWhereUniqueWithoutUserInputSchema), + z + .lazy(() => AccountUpdateWithWhereUniqueWithoutUserInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => AccountUpdateManyWithWhereWithoutUserInputSchema), + z + .lazy(() => AccountUpdateManyWithWhereWithoutUserInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => AccountScalarWhereInputSchema), + z.lazy(() => AccountScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ForecastCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastCreateWithoutProfileInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutProfilesInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedCreateWithoutProfilesInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutProfilesInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionCreateWithoutProfileInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetCreateNestedOneWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutProfileInputSchema) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ForecastUncheckedCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastCreateWithoutProfileInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionCreateWithoutProfileInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyProfileInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUncheckedCreateNestedOneWithoutProfileInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutProfileInputSchema) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ForecastUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastCreateWithoutProfileInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutProfileInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutProfileInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutProfilesNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedCreateWithoutProfilesInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutProfilesInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutProfilesInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutProfilesInputSchema), + z.lazy(() => UserUpdateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutProfilesInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionCreateWithoutProfileInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutProfileInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutProfileInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUpdateOneWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutProfileInputSchema) + .optional(), + upsert: z.lazy(() => TargetUpsertWithoutProfileInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => TargetUpdateToOneWithWhereWithoutProfileInputSchema), + z.lazy(() => TargetUpdateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutProfileInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastCreateWithoutProfileInputSchema).array(), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => ForecastCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => ForecastUpsertWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => ForecastUpsertWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ForecastCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ForecastWhereUniqueInputSchema), + z.lazy(() => ForecastWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => ForecastUpdateWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => ForecastUpdateWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => ForecastUpdateManyWithWhereWithoutProfileInputSchema), + z + .lazy(() => ForecastUpdateManyWithWhereWithoutProfileInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionCreateWithoutProfileInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutProfileInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy(() => QuestionUpsertWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => QuestionUpsertWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => QuestionCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateWithWhereUniqueWithoutProfileInputSchema), + z + .lazy(() => QuestionUpdateWithWhereUniqueWithoutProfileInputSchema) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => QuestionUpdateManyWithWhereWithoutProfileInputSchema), + z + .lazy(() => QuestionUpdateManyWithWhereWithoutProfileInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema) + .array(), + z.lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpsertWithWhereUniqueWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => ResolutionSlackMessageCreateManyProfileInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateWithWhereUniqueWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutProfileInputSchema, + ), + z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithWhereWithoutProfileInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateOneWithoutProfileNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => TargetCreateOrConnectWithoutProfileInputSchema) + .optional(), + upsert: z.lazy(() => TargetUpsertWithoutProfileInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => TargetWhereInputSchema)]) + .optional(), + connect: z.lazy(() => TargetWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => TargetUpdateToOneWithWhereWithoutProfileInputSchema), + z.lazy(() => TargetUpdateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutProfileInputSchema), + ]) + .optional(), + }) + .strict() + +export const EnumGroupTypeFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.lazy(() => GroupTypeSchema).optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutTargetInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTargetInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTargetInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const ProfileCreateNestedOneWithoutTargetInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutTargetInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutTargetInputSchema) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + }) + .strict() + +export const EnumTargetTypeFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.lazy(() => TargetTypeSchema).optional(), + }) + .strict() + +export const EnumDayOfTheWeekFieldUpdateOperationsInputSchema: z.ZodType = + z + .object({ + set: z.lazy(() => DayOfTheWeekSchema).optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutTargetNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTargetInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTargetInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutTargetInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutTargetInputSchema), + z.lazy(() => UserUpdateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTargetInputSchema), + ]) + .optional(), + }) + .strict() + +export const ProfileUpdateOneWithoutTargetNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => ProfileCreateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutTargetInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => ProfileCreateOrConnectWithoutTargetInputSchema) + .optional(), + upsert: z.lazy(() => ProfileUpsertWithoutTargetInputSchema).optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => ProfileWhereInputSchema)]) + .optional(), + connect: z.lazy(() => ProfileWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => ProfileUpdateToOneWithWhereWithoutTargetInputSchema), + z.lazy(() => ProfileUpdateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutTargetInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutAccountsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAccountsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutAccountsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutAccountsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAccountsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutAccountsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutAccountsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutAccountsInputSchema), + z.lazy(() => UserUpdateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAccountsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutCommentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutCommentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutCommentsInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutCommentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutCommentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutCommentsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateOneRequiredWithoutCommentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutCommentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutCommentsInputSchema) + .optional(), + upsert: z.lazy(() => QuestionUpsertWithoutCommentsInputSchema).optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => QuestionUpdateToOneWithWhereWithoutCommentsInputSchema), + z.lazy(() => QuestionUpdateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutCommentsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutCommentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutCommentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutCommentsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutCommentsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutCommentsInputSchema), + z.lazy(() => UserUpdateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutCommentsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListCreateemailDomainsInputSchema: z.ZodType = + z + .object({ + set: z.string().array(), + }) + .strict() + +export const UserCreateNestedOneWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAuthorOfListsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutAuthorOfListsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserCreateNestedManyWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema).array(), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema), + z + .lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema).array(), + z.lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentCreateNestedManyWithoutUserListInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentCreateWithoutUserListInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyUserListInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUncheckedCreateNestedManyWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema).array(), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema), + z + .lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema).array(), + z.lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateNestedManyWithoutUserListInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentCreateWithoutUserListInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyUserListInputEnvelopeSchema) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateemailDomainsInputSchema: z.ZodType = + z + .object({ + set: z.string().array().optional(), + push: z.union([z.string(), z.string().array()]).optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutAuthorOfListsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAuthorOfListsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutAuthorOfListsInputSchema) + .optional(), + upsert: z + .lazy(() => UserUpsertWithoutAuthorOfListsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUpdateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAuthorOfListsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateManyWithoutMemberOfListsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema).array(), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema), + z + .lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => UserUpsertWithWhereUniqueWithoutMemberOfListsInputSchema, + ), + z + .lazy( + () => UserUpsertWithWhereUniqueWithoutMemberOfListsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => UserUpdateWithWhereUniqueWithoutMemberOfListsInputSchema, + ), + z + .lazy( + () => UserUpdateWithWhereUniqueWithoutMemberOfListsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserUpdateManyWithWhereWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUpdateManyWithWhereWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutSharedWithListsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema).array(), + z.lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionUpsertWithWhereUniqueWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpsertWithWhereUniqueWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionUpdateWithWhereUniqueWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpdateWithWhereUniqueWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionUpdateManyWithWhereWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpdateManyWithWhereWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUpdateManyWithoutUserListNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentCreateWithoutUserListInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => TournamentUpsertWithWhereUniqueWithoutUserListInputSchema, + ), + z + .lazy( + () => TournamentUpsertWithWhereUniqueWithoutUserListInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyUserListInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => TournamentUpdateWithWhereUniqueWithoutUserListInputSchema, + ), + z + .lazy( + () => TournamentUpdateWithWhereUniqueWithoutUserListInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TournamentUpdateManyWithWhereWithoutUserListInputSchema), + z + .lazy(() => TournamentUpdateManyWithWhereWithoutUserListInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateManyWithoutMemberOfListsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema).array(), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema), + z + .lazy(() => UserCreateOrConnectWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => UserUpsertWithWhereUniqueWithoutMemberOfListsInputSchema, + ), + z + .lazy( + () => UserUpsertWithWhereUniqueWithoutMemberOfListsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => UserWhereUniqueInputSchema), + z.lazy(() => UserWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => UserUpdateWithWhereUniqueWithoutMemberOfListsInputSchema, + ), + z + .lazy( + () => UserUpdateWithWhereUniqueWithoutMemberOfListsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => UserUpdateManyWithWhereWithoutMemberOfListsInputSchema), + z + .lazy(() => UserUpdateManyWithWhereWithoutMemberOfListsInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutSharedWithListsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema).array(), + z.lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionUncheckedCreateWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => QuestionCreateOrConnectWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => + QuestionUpsertWithWhereUniqueWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpsertWithWhereUniqueWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => + QuestionUpdateWithWhereUniqueWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpdateWithWhereUniqueWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionUpdateManyWithWhereWithoutSharedWithListsInputSchema, + ), + z + .lazy( + () => + QuestionUpdateManyWithWhereWithoutSharedWithListsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutUserListNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentCreateWithoutUserListInputSchema).array(), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + z + .lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema), + z + .lazy(() => TournamentCreateOrConnectWithoutUserListInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => TournamentUpsertWithWhereUniqueWithoutUserListInputSchema, + ), + z + .lazy( + () => TournamentUpsertWithWhereUniqueWithoutUserListInputSchema, + ) + .array(), + ]) + .optional(), + createMany: z + .lazy(() => TournamentCreateManyUserListInputEnvelopeSchema) + .optional(), + set: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => TournamentWhereUniqueInputSchema), + z.lazy(() => TournamentWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => TournamentUpdateWithWhereUniqueWithoutUserListInputSchema, + ), + z + .lazy( + () => TournamentUpdateWithWhereUniqueWithoutUserListInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy(() => TournamentUpdateManyWithWhereWithoutUserListInputSchema), + z + .lazy(() => TournamentUpdateManyWithWhereWithoutUserListInputSchema) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionCreateNestedManyWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserCreateNestedOneWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTournamentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTournamentsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const UserListCreateNestedOneWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutTournamentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserListCreateOrConnectWithoutTournamentsInputSchema) + .optional(), + connect: z.lazy(() => UserListWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionUncheckedCreateNestedManyWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateManyWithoutTournamentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionUpsertWithWhereUniqueWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpsertWithWhereUniqueWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateWithWhereUniqueWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpdateWithWhereUniqueWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionUpdateManyWithWhereWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpdateManyWithWhereWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutTournamentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTournamentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutTournamentsInputSchema) + .optional(), + upsert: z.lazy(() => UserUpsertWithoutTournamentsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutTournamentsInputSchema), + z.lazy(() => UserUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTournamentsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateOneWithoutTournamentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserListCreateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutTournamentsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserListCreateOrConnectWithoutTournamentsInputSchema) + .optional(), + upsert: z + .lazy(() => UserListUpsertWithoutTournamentsInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => UserListWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => UserListWhereInputSchema)]) + .optional(), + connect: z.lazy(() => UserListWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => UserListUpdateToOneWithWhereWithoutTournamentsInputSchema, + ), + z.lazy(() => UserListUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutTournamentsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutTournamentsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema).array(), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + z + .lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + connectOrCreate: z + .union([ + z.lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema), + z + .lazy(() => QuestionCreateOrConnectWithoutTournamentsInputSchema) + .array(), + ]) + .optional(), + upsert: z + .union([ + z.lazy( + () => QuestionUpsertWithWhereUniqueWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpsertWithWhereUniqueWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + set: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + disconnect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + delete: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + connect: z + .union([ + z.lazy(() => QuestionWhereUniqueInputSchema), + z.lazy(() => QuestionWhereUniqueInputSchema).array(), + ]) + .optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateWithWhereUniqueWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpdateWithWhereUniqueWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + updateMany: z + .union([ + z.lazy( + () => QuestionUpdateManyWithWhereWithoutTournamentsInputSchema, + ), + z + .lazy( + () => QuestionUpdateManyWithWhereWithoutTournamentsInputSchema, + ) + .array(), + ]) + .optional(), + deleteMany: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + }) + .strict() + +export const NotificationCreatetagsInputSchema: z.ZodType = + z + .object({ + set: z.string().array(), + }) + .strict() + +export const UserCreateNestedOneWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutNotificationsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutNotificationsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + }) + .strict() + +export const QuestionCreateNestedOneWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutNotificationsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutNotificationsInputSchema) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + }) + .strict() + +export const NotificationUpdatetagsInputSchema: z.ZodType = + z + .object({ + set: z.string().array().optional(), + push: z.union([z.string(), z.string().array()]).optional(), + }) + .strict() + +export const UserUpdateOneRequiredWithoutNotificationsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => UserCreateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutNotificationsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => UserCreateOrConnectWithoutNotificationsInputSchema) + .optional(), + upsert: z + .lazy(() => UserUpsertWithoutNotificationsInputSchema) + .optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy(() => UserUpdateToOneWithWhereWithoutNotificationsInputSchema), + z.lazy(() => UserUpdateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutNotificationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateOneWithoutNotificationsNestedInputSchema: z.ZodType = + z + .object({ + create: z + .union([ + z.lazy(() => QuestionCreateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutNotificationsInputSchema), + ]) + .optional(), + connectOrCreate: z + .lazy(() => QuestionCreateOrConnectWithoutNotificationsInputSchema) + .optional(), + upsert: z + .lazy(() => QuestionUpsertWithoutNotificationsInputSchema) + .optional(), + disconnect: z + .union([z.boolean(), z.lazy(() => QuestionWhereInputSchema)]) + .optional(), + delete: z + .union([z.boolean(), z.lazy(() => QuestionWhereInputSchema)]) + .optional(), + connect: z.lazy(() => QuestionWhereUniqueInputSchema).optional(), + update: z + .union([ + z.lazy( + () => QuestionUpdateToOneWithWhereWithoutNotificationsInputSchema, + ), + z.lazy(() => QuestionUpdateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutNotificationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const NestedStringFilterSchema: z.ZodType = z + .object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + not: z + .union([z.string(), z.lazy(() => NestedStringFilterSchema)]) + .optional(), + }) + .strict() + +export const NestedDateTimeFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([z.coerce.date(), z.lazy(() => NestedDateTimeFilterSchema)]) + .optional(), + }) + .strict() + +export const NestedStringWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + not: z + .union([ + z.string(), + z.lazy(() => NestedStringWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional(), + }) + .strict() + +export const NestedIntFilterSchema: z.ZodType = z + .object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([z.number(), z.lazy(() => NestedIntFilterSchema)]).optional(), + }) + .strict() + +export const NestedDateTimeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional(), + }) + .strict() + +export const NestedStringNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + not: z + .union([z.string(), z.lazy(() => NestedStringNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const NestedDecimalFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalFilterSchema), + ]) + .optional(), + }) + .strict() + +export const NestedIntNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedIntNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const NestedIntWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedIntWithAggregatesFilterSchema)]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedFloatFilterSchema).optional(), + _sum: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedIntFilterSchema).optional(), + _max: z.lazy(() => NestedIntFilterSchema).optional(), + }) + .strict() + +export const NestedFloatFilterSchema: z.ZodType = z + .object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedFloatFilterSchema)]) + .optional(), + }) + .strict() + +export const NestedStringNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + search: z.string().optional(), + not: z + .union([ + z.string(), + z.lazy(() => NestedStringNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional(), + }) + .strict() + +export const NestedDecimalWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalFilterSchema).optional(), + }) + .strict() + +export const NestedIntNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([ + z.number(), + z.lazy(() => NestedIntNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _avg: z.lazy(() => NestedFloatNullableFilterSchema).optional(), + _sum: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _max: z.lazy(() => NestedIntNullableFilterSchema).optional(), + }) + .strict() + +export const NestedFloatNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z + .union([z.number(), z.lazy(() => NestedFloatNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const NestedDecimalNullableFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NestedDecimalNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + in: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + notIn: z + .union([ + z.number().array(), + z.string().array(), + z.instanceof(Decimal).array(), + z.instanceof(Prisma.Decimal).array(), + DecimalJsLikeSchema.array(), + ]) + .refine( + (v) => + Array.isArray(v) && + (v as any[]).every((v) => isValidDecimalInput(v)), + { message: "Must be a Decimal" }, + ) + .optional() + .nullable(), + lt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + lte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gt: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + gte: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional(), + not: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NestedDecimalNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalNullableFilterSchema).optional(), + }) + .strict() + +export const NestedEnumResolutionNullableFilterSchema: z.ZodType = + z + .object({ + equals: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + in: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + notIn: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + not: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NestedEnumResolutionNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NestedDateTimeNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeNullableFilterSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NestedEnumResolutionNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + in: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + notIn: z + .lazy(() => ResolutionSchema) + .array() + .optional() + .nullable(), + not: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NestedEnumResolutionNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedEnumResolutionNullableFilterSchema).optional(), + _max: z.lazy(() => NestedEnumResolutionNullableFilterSchema).optional(), + }) + .strict() + +export const NestedDateTimeNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z + .union([ + z.coerce.date(), + z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + }) + .strict() + +export const NestedEnumQuestionTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => QuestionTypeSchema).optional(), + in: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => NestedEnumQuestionTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const NestedBoolFilterSchema: z.ZodType = z + .object({ + equals: z.boolean().optional(), + not: z + .union([z.boolean(), z.lazy(() => NestedBoolFilterSchema)]) + .optional(), + }) + .strict() + +export const NestedBoolNullableFilterSchema: z.ZodType = + z + .object({ + equals: z.boolean().optional().nullable(), + not: z + .union([z.boolean(), z.lazy(() => NestedBoolNullableFilterSchema)]) + .optional() + .nullable(), + }) + .strict() + +export const NestedEnumQuestionTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => QuestionTypeSchema).optional(), + in: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => QuestionTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => NestedEnumQuestionTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumQuestionTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumQuestionTypeFilterSchema).optional(), + }) + .strict() + +export const NestedBoolWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.boolean().optional(), + not: z + .union([ + z.boolean(), + z.lazy(() => NestedBoolWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedBoolFilterSchema).optional(), + _max: z.lazy(() => NestedBoolFilterSchema).optional(), + }) + .strict() + +export const NestedBoolNullableWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.boolean().optional().nullable(), + not: z + .union([ + z.boolean(), + z.lazy(() => NestedBoolNullableWithAggregatesFilterSchema), + ]) + .optional() + .nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedBoolNullableFilterSchema).optional(), + _max: z.lazy(() => NestedBoolNullableFilterSchema).optional(), + }) + .strict() + +export const NestedEnumGroupTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => GroupTypeSchema).optional(), + in: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => NestedEnumGroupTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const NestedEnumGroupTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => GroupTypeSchema).optional(), + in: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => GroupTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => GroupTypeSchema), + z.lazy(() => NestedEnumGroupTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumGroupTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumGroupTypeFilterSchema).optional(), + }) + .strict() + +export const NestedEnumTargetTypeFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => TargetTypeSchema).optional(), + in: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => NestedEnumTargetTypeFilterSchema), + ]) + .optional(), + }) + .strict() + +export const NestedEnumDayOfTheWeekFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => DayOfTheWeekSchema).optional(), + in: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + notIn: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => NestedEnumDayOfTheWeekFilterSchema), + ]) + .optional(), + }) + .strict() + +export const NestedEnumTargetTypeWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => TargetTypeSchema).optional(), + in: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + notIn: z + .lazy(() => TargetTypeSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => NestedEnumTargetTypeWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumTargetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumTargetTypeFilterSchema).optional(), + }) + .strict() + +export const NestedEnumDayOfTheWeekWithAggregatesFilterSchema: z.ZodType = + z + .object({ + equals: z.lazy(() => DayOfTheWeekSchema).optional(), + in: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + notIn: z + .lazy(() => DayOfTheWeekSchema) + .array() + .optional(), + not: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => NestedEnumDayOfTheWeekWithAggregatesFilterSchema), + ]) + .optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumDayOfTheWeekFilterSchema).optional(), + _max: z.lazy(() => NestedEnumDayOfTheWeekFilterSchema).optional(), + }) + .strict() + +export const QuestionOptionCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + question: z.lazy(() => QuestionCreateNestedOneWithoutOptionsInputSchema), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionOptionsInputSchema), + questionScores: z + .lazy( + () => QuestionScoreCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionCreateOrConnectWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const ProfileCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + user: z.lazy(() => UserCreateNestedOneWithoutProfilesInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileCreateOrConnectWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ProfileCreateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpsertWithoutForecastsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutForecastsInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutForecastsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutForecastsInputSchema), + ]), + where: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionOptionUpdateToOneWithWhereWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutForecastsInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutOptionsNestedInputSchema) + .optional(), + user: z + .lazy( + () => UserUpdateOneRequiredWithoutQuestionOptionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ProfileUpsertWithoutForecastsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => ProfileUpdateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutForecastsInputSchema), + ]), + create: z.union([ + z.lazy(() => ProfileCreateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutForecastsInputSchema), + ]), + where: z.lazy(() => ProfileWhereInputSchema).optional(), + }) + .strict() + +export const ProfileUpdateToOneWithWhereWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => ProfileUpdateWithoutForecastsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const ProfileUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutProfilesNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUpsertWithoutForecastsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutForecastsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutForecastsInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutForecastsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserUpsertWithoutForecastsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutForecastsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutForecastsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutForecastsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutForecastsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutForecastsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutForecastsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionScoresInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionScoresInputSchema), + ]), + }) + .strict() + +export const QuestionOptionCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + question: z.lazy(() => QuestionCreateNestedOneWithoutOptionsInputSchema), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutOptionInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionOptionsInputSchema), + }) + .strict() + +export const QuestionOptionUncheckedCreateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutOptionInputSchema) + .optional(), + }) + .strict() + +export const QuestionOptionCreateOrConnectWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutQuestionScoresInputSchema, + ), + ]), + }) + .strict() + +export const QuestionUpsertWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutQuestionScoresInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionScoresInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutQuestionScoresInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserUpsertWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionScoresInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionScoresInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutQuestionScoresInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionScoresInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionOptionUpsertWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedUpdateWithoutQuestionScoresInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedCreateWithoutQuestionScoresInputSchema, + ), + ]), + where: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionOptionUpdateToOneWithWhereWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutQuestionScoresInputSchema), + z.lazy( + () => QuestionOptionUncheckedUpdateWithoutQuestionScoresInputSchema, + ), + ]), + }) + .strict() + +export const QuestionOptionUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutOptionsNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutOptionNestedInputSchema) + .optional(), + user: z + .lazy( + () => UserUpdateOneRequiredWithoutQuestionOptionsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateWithoutQuestionScoresInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutOptionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionCreateWithoutOptionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutOptionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutOptionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutOptionsInputSchema), + ]), + }) + .strict() + +export const ForecastCreateWithoutOptionInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutForecastsInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutForecastsInputSchema, + ), + user: z.lazy(() => UserCreateNestedOneWithoutForecastsInputSchema), + }) + .strict() + +export const ForecastUncheckedCreateWithoutOptionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + userId: z.string(), + }) + .strict() + +export const ForecastCreateOrConnectWithoutOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + ]), + }) + .strict() + +export const ForecastCreateManyOptionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ForecastCreateManyOptionInputSchema), + z.lazy(() => ForecastCreateManyOptionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserCreateWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionOptionsInputSchema), + ]), + }) + .strict() + +export const QuestionScoreCreateWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutQuestionScoresInputSchema, + ), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionScoresInputSchema), + }) + .strict() + +export const QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + }) + .strict() + +export const QuestionScoreCreateOrConnectWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionScoreCreateManyQuestionOptionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionScoreCreateManyQuestionOptionInputSchema), + z.lazy(() => QuestionScoreCreateManyQuestionOptionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionUpsertWithoutOptionsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutOptionsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutOptionsInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutOptionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutOptionsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutOptionsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutOptionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutOptionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ForecastUpsertWithWhereUniqueWithoutOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ForecastUpdateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutOptionInputSchema), + ]), + create: z.union([ + z.lazy(() => ForecastCreateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutOptionInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateWithWhereUniqueWithoutOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateWithoutOptionInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutOptionInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateManyWithWhereWithoutOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateManyMutationInputSchema), + z.lazy(() => ForecastUncheckedUpdateManyWithoutOptionInputSchema), + ]), + }) + .strict() + +export const ForecastScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ForecastScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ForecastScalarWhereInputSchema), + z.lazy(() => ForecastScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + forecast: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + optionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const UserUpsertWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionOptionsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionOptionsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutQuestionOptionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionOptionsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutQuestionOptionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionScoreUpsertWithWhereUniqueWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutQuestionOptionInputSchema), + z.lazy( + () => QuestionScoreUncheckedUpdateWithoutQuestionOptionInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionOptionInputSchema), + z.lazy( + () => QuestionScoreUncheckedCreateWithoutQuestionOptionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionScoreUpdateWithWhereUniqueWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutQuestionOptionInputSchema), + z.lazy( + () => QuestionScoreUncheckedUpdateWithoutQuestionOptionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionScoreUpdateManyWithWhereWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateManyMutationInputSchema), + z.lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionOptionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionScoreScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScoreScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScoreScalarWhereInputSchema), + z.lazy(() => QuestionScoreScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + relativeScore: z + .union([ + z.lazy(() => DecimalNullableFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional() + .nullable(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userQuestionComboId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + absoluteScore: z + .union([ + z.lazy(() => DecimalFilterSchema), + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + ]) + .optional(), + rank: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionOptionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutOptionInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionOptionsInputSchema), + questionScores: z + .lazy( + () => QuestionScoreCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutOptionInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionOptionCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionOptionCreateManyQuestionInputSchema), + z.lazy(() => QuestionOptionCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ForecastCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + option: z + .lazy(() => QuestionOptionCreateNestedOneWithoutForecastsInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutForecastsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutForecastsInputSchema), + }) + .strict() + +export const ForecastUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const ForecastCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const ForecastCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ForecastCreateManyQuestionInputSchema), + z.lazy(() => ForecastCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const PingSlackMessageCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + message: z.lazy( + () => SlackMessageCreateNestedOneWithoutPingSlackMessageInputSchema, + ), + }) + .strict() + +export const PingSlackMessageUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + }) + .strict() + +export const PingSlackMessageCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z.lazy(() => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const PingSlackMessageCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => PingSlackMessageCreateManyQuestionInputSchema), + z.lazy(() => PingSlackMessageCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ProfileCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutProfileInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutProfilesInputSchema), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileCreateOrConnectWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ProfileCreateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema), + ]), + }) + .strict() + +export const UserListCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + author: z.lazy(() => UserCreateNestedOneWithoutAuthorOfListsInputSchema), + users: z + .lazy(() => UserCreateNestedManyWithoutMemberOfListsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutUserListInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + authorId: z.string(), + users: z + .lazy( + () => UserUncheckedCreateNestedManyWithoutMemberOfListsInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutUserListInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListCreateOrConnectWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const QuestionScoreCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionScoresInputSchema), + QuestionOption: z + .lazy( + () => QuestionOptionCreateNestedOneWithoutQuestionScoresInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionScoreCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionScoreCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionScoreCreateManyQuestionInputSchema), + z.lazy(() => QuestionScoreCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionSlackMessageCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + updatedAt: z.coerce.date().optional(), + message: z.lazy( + () => SlackMessageCreateNestedOneWithoutQuestionSlackMessageInputSchema, + ), + }) + .strict() + +export const QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + updatedAt: z.coerce.date().optional(), + }) + .strict() + +export const QuestionSlackMessageCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionSlackMessageCreateManyQuestionInputSchema), + z.lazy(() => QuestionSlackMessageCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + message: z.lazy( + () => + SlackMessageCreateNestedOneWithoutResolutionSlackMessageInputSchema, + ), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutResolutionMessagesInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + profileId: z.number().int().optional().nullable(), + }) + .strict() + +export const ResolutionSlackMessageCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ResolutionSlackMessageCreateManyQuestionInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateManyQuestionInputSchema) + .array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const CommentCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string(), + user: z.lazy(() => UserCreateNestedOneWithoutCommentsInputSchema), + }) + .strict() + +export const CommentUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + userId: z.string(), + }) + .strict() + +export const CommentCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const CommentCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => CommentCreateManyQuestionInputSchema), + z.lazy(() => CommentCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TagCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + user: z.lazy(() => UserCreateNestedOneWithoutTagsInputSchema), + }) + .strict() + +export const TagUncheckedCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + userId: z.string(), + }) + .strict() + +export const TagCreateOrConnectWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TournamentCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + author: z.lazy(() => UserCreateNestedOneWithoutTournamentsInputSchema), + userList: z + .lazy(() => UserListCreateNestedOneWithoutTournamentsInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.string().optional().nullable(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + }) + .strict() + +export const TournamentCreateOrConnectWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const NotificationCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + user: z.lazy(() => UserCreateNestedOneWithoutNotificationsInputSchema), + }) + .strict() + +export const NotificationUncheckedCreateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + userId: z.string(), + }) + .strict() + +export const NotificationCreateOrConnectWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const NotificationCreateManyQuestionInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => NotificationCreateManyQuestionInputSchema), + z.lazy(() => NotificationCreateManyQuestionInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionOptionUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutQuestionInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionOptionUpdateManyMutationInputSchema), + z.lazy( + () => QuestionOptionUncheckedUpdateManyWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionOptionScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionOptionScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionOptionScalarWhereInputSchema), + z.lazy(() => QuestionOptionScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + text: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + resolvedAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ForecastUpdateWithoutQuestionInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => ForecastCreateWithoutQuestionInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateWithoutQuestionInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateManyMutationInputSchema), + z.lazy(() => ForecastUncheckedUpdateManyWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const PingSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => PingSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy(() => PingSlackMessageUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => PingSlackMessageCreateWithoutQuestionInputSchema), + z.lazy(() => PingSlackMessageUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const PingSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => PingSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy(() => PingSlackMessageUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const PingSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageScalarWhereInputSchema), + data: z.union([ + z.lazy(() => PingSlackMessageUpdateManyMutationInputSchema), + z.lazy( + () => PingSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const PingSlackMessageScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereInputSchema), + z.lazy(() => PingSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => PingSlackMessageScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => PingSlackMessageScalarWhereInputSchema), + z.lazy(() => PingSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + }) + .strict() + +export const ProfileUpsertWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => ProfileUpdateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutQuestionsInputSchema), + ]), + create: z.union([ + z.lazy(() => ProfileCreateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutQuestionsInputSchema), + ]), + where: z.lazy(() => ProfileWhereInputSchema).optional(), + }) + .strict() + +export const ProfileUpdateToOneWithWhereWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => ProfileUpdateWithoutQuestionsInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const ProfileUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutProfileNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutProfilesNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUpsertWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutQuestionsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUpsertWithWhereUniqueWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => UserUpdateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionsSharedWithInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserUncheckedCreateWithoutQuestionsSharedWithInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithWhereUniqueWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => UserUpdateWithoutQuestionsSharedWithInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutQuestionsSharedWithInputSchema), + ]), + }) + .strict() + +export const UserUpdateManyWithWhereWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserScalarWhereInputSchema), + data: z.union([ + z.lazy(() => UserUpdateManyMutationInputSchema), + z.lazy( + () => UserUncheckedUpdateManyWithoutQuestionsSharedWithInputSchema, + ), + ]), + }) + .strict() + +export const UserScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserScalarWhereInputSchema), + z.lazy(() => UserScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + name: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + email: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + image: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + staleReminder: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unsubscribedFromEmailsAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + apiKey: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + discordUserId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + emailVerified: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + }) + .strict() + +export const UserListUpsertWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => UserListUpdateWithoutQuestionsInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutQuestionsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserListCreateWithoutQuestionsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserListUpdateWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateWithoutQuestionsInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserListUpdateManyWithWhereWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListScalarWhereInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateManyMutationInputSchema), + z.lazy(() => UserListUncheckedUpdateManyWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const UserListScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => UserListScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => UserListScalarWhereInputSchema), + z.lazy(() => UserListScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + inviteId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + emailDomains: z.lazy(() => StringNullableListFilterSchema).optional(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const QuestionScoreUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionScoreUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutQuestionInputSchema), + z.lazy(() => QuestionScoreUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const QuestionScoreUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateManyMutationInputSchema), + z.lazy( + () => QuestionScoreUncheckedUpdateManyWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutQuestionInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionSlackMessageCreateWithoutQuestionInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionSlackMessageUpdateManyMutationInputSchema), + z.lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema), + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionSlackMessageScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema), + z.lazy(() => QuestionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + updatedAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutQuestionInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutQuestionInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutQuestionInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateManyMutationInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ResolutionSlackMessageScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + detailsId: z + .union([z.lazy(() => IntFilterSchema), z.number()]) + .optional(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + }) + .strict() + +export const CommentUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => CommentUpdateWithoutQuestionInputSchema), + z.lazy(() => CommentUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => CommentCreateWithoutQuestionInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const CommentUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => CommentUpdateWithoutQuestionInputSchema), + z.lazy(() => CommentUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const CommentUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentScalarWhereInputSchema), + data: z.union([ + z.lazy(() => CommentUpdateManyMutationInputSchema), + z.lazy(() => CommentUncheckedUpdateManyWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const CommentScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => CommentScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => CommentScalarWhereInputSchema), + z.lazy(() => CommentScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const TagUpsertWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => TagUpdateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedUpdateWithoutQuestionsInputSchema), + ]), + create: z.union([ + z.lazy(() => TagCreateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TagUpdateWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => TagUpdateWithoutQuestionsInputSchema), + z.lazy(() => TagUncheckedUpdateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TagUpdateManyWithWhereWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagScalarWhereInputSchema), + data: z.union([ + z.lazy(() => TagUpdateManyMutationInputSchema), + z.lazy(() => TagUncheckedUpdateManyWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TagScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TagScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TagScalarWhereInputSchema), + z.lazy(() => TagScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const TournamentUpsertWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => TournamentUpdateWithoutQuestionsInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutQuestionsInputSchema), + ]), + create: z.union([ + z.lazy(() => TournamentCreateWithoutQuestionsInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateWithWhereUniqueWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateWithoutQuestionsInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateManyWithWhereWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentScalarWhereInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateManyMutationInputSchema), + z.lazy(() => TournamentUncheckedUpdateManyWithoutQuestionsInputSchema), + ]), + }) + .strict() + +export const TournamentScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => TournamentScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => TournamentScalarWhereInputSchema), + z.lazy(() => TournamentScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + name: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + description: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + authorId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + userListId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + showLeaderboard: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + predictYourYear: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationUpsertWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => NotificationUpdateWithoutQuestionInputSchema), + z.lazy(() => NotificationUncheckedUpdateWithoutQuestionInputSchema), + ]), + create: z.union([ + z.lazy(() => NotificationCreateWithoutQuestionInputSchema), + z.lazy(() => NotificationUncheckedCreateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const NotificationUpdateWithWhereUniqueWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => NotificationUpdateWithoutQuestionInputSchema), + z.lazy(() => NotificationUncheckedUpdateWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const NotificationUpdateManyWithWhereWithoutQuestionInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationScalarWhereInputSchema), + data: z.union([ + z.lazy(() => NotificationUpdateManyMutationInputSchema), + z.lazy(() => NotificationUncheckedUpdateManyWithoutQuestionInputSchema), + ]), + }) + .strict() + +export const NotificationScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => NotificationScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => NotificationScalarWhereInputSchema), + z.lazy(() => NotificationScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + emailSentAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + title: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + content: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + url: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + tags: z.lazy(() => StringNullableListFilterSchema).optional(), + read: z.union([z.lazy(() => BoolFilterSchema), z.boolean()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + questionId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const UserCreateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTagsInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutTagsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTagsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTagsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutTagsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTagsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutTagsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTagsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutTagsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutTagsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutTagsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy(() => QuestionUncheckedUpdateManyWithoutTagsInputSchema), + ]), + }) + .strict() + +export const QuestionScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => QuestionScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => QuestionScalarWhereInputSchema), + z.lazy(() => QuestionScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + comment: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + profileId: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + title: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + type: z + .union([ + z.lazy(() => EnumQuestionTypeFilterSchema), + z.lazy(() => QuestionTypeSchema), + ]) + .optional(), + resolveBy: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + resolved: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + pingedForResolution: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + resolution: z + .union([ + z.lazy(() => EnumResolutionNullableFilterSchema), + z.lazy(() => ResolutionSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + notes: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([z.lazy(() => DateTimeNullableFilterSchema), z.coerce.date()]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + sharedPublicly: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + unlisted: z + .union([z.lazy(() => BoolFilterSchema), z.boolean()]) + .optional(), + exclusiveAnswers: z + .union([z.lazy(() => BoolNullableFilterSchema), z.boolean()]) + .optional() + .nullable(), + }) + .strict() + +export const SlackMessageCreateWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy(() => PingSlackMessageCreateNestedOneWithoutMessageInputSchema) + .optional(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedCreateWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateOrConnectWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy( + () => SlackMessageCreateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutResolutionSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const ProfileCreateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutProfileInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutProfilesInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutProfileInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileCreateOrConnectWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ProfileCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]), + }) + .strict() + +export const QuestionCreateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]), + }) + .strict() + +export const SlackMessageUpsertWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy( + () => SlackMessageUpdateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutResolutionSlackMessageInputSchema, + ), + ]), + create: z.union([ + z.lazy( + () => SlackMessageCreateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutResolutionSlackMessageInputSchema, + ), + ]), + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateToOneWithWhereWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy( + () => SlackMessageUpdateWithoutResolutionSlackMessageInputSchema, + ), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutResolutionSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const SlackMessageUpdateWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy(() => PingSlackMessageUpdateOneWithoutMessageNestedInputSchema) + .optional(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedUpdateWithoutResolutionSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ProfileUpsertWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => ProfileUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => ProfileCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]), + where: z.lazy(() => ProfileWhereInputSchema).optional(), + }) + .strict() + +export const ProfileUpdateToOneWithWhereWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => ProfileUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => ProfileUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]), + }) + .strict() + +export const ProfileUpdateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutProfileNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutProfilesNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutProfileNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUpsertWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutResolutionMessagesInputSchema, + ), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutResolutionMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutResolutionMessagesInputSchema, + ), + ]), + }) + .strict() + +export const QuestionUpdateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutResolutionMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z.string(), + channel: z.string(), + teamId: z.string(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedCreateWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateOrConnectWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => SlackMessageCreateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedCreateWithoutPingSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const QuestionCreateWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutPingResolveMessagesInputSchema, + ), + ]), + }) + .strict() + +export const SlackMessageUpsertWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => SlackMessageUpdateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedUpdateWithoutPingSlackMessageInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => SlackMessageCreateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedCreateWithoutPingSlackMessageInputSchema, + ), + ]), + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateToOneWithWhereWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => SlackMessageUpdateWithoutPingSlackMessageInputSchema), + z.lazy( + () => SlackMessageUncheckedUpdateWithoutPingSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const SlackMessageUpdateWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionSlackMessage: z + .lazy( + () => QuestionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedUpdateWithoutPingSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionSlackMessage: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUpsertWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutPingResolveMessagesInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedCreateWithoutPingResolveMessagesInputSchema, + ), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutPingResolveMessagesInputSchema), + z.lazy( + () => QuestionUncheckedUpdateWithoutPingResolveMessagesInputSchema, + ), + ]), + }) + .strict() + +export const QuestionUpdateWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutPingResolveMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy(() => PingSlackMessageCreateNestedOneWithoutMessageInputSchema) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedCreateWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + ts: z.string(), + channel: z.string(), + teamId: z.string(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedOneWithoutMessageInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageCreateOrConnectWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => SlackMessageCreateWithoutQuestionSlackMessageInputSchema), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutQuestionSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const QuestionCreateWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutQuestionMessagesInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionMessagesInputSchema), + ]), + }) + .strict() + +export const SlackMessageUpsertWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => SlackMessageUpdateWithoutQuestionSlackMessageInputSchema), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutQuestionSlackMessageInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => SlackMessageCreateWithoutQuestionSlackMessageInputSchema), + z.lazy( + () => + SlackMessageUncheckedCreateWithoutQuestionSlackMessageInputSchema, + ), + ]), + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const SlackMessageUpdateToOneWithWhereWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => SlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => SlackMessageUpdateWithoutQuestionSlackMessageInputSchema), + z.lazy( + () => + SlackMessageUncheckedUpdateWithoutQuestionSlackMessageInputSchema, + ), + ]), + }) + .strict() + +export const SlackMessageUpdateWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy(() => PingSlackMessageUpdateOneWithoutMessageNestedInputSchema) + .optional(), + resolutionSlackMessage: z + .lazy( + () => ResolutionSlackMessageUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const SlackMessageUncheckedUpdateWithoutQuestionSlackMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + ts: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + channel: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + teamId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingSlackMessage: z + .lazy( + () => + PingSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + resolutionSlackMessage: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateOneWithoutMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUpsertWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutQuestionMessagesInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutQuestionMessagesInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutQuestionMessagesInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutQuestionMessagesInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutQuestionMessagesInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutQuestionMessagesInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutQuestionMessagesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const PingSlackMessageCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + question: z.lazy( + () => QuestionCreateNestedOneWithoutPingResolveMessagesInputSchema, + ), + }) + .strict() + +export const PingSlackMessageUncheckedCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + }) + .strict() + +export const PingSlackMessageCreateOrConnectWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy(() => PingSlackMessageUncheckedCreateWithoutMessageInputSchema), + ]), + }) + .strict() + +export const QuestionSlackMessageCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + updatedAt: z.coerce.date().optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutQuestionMessagesInputSchema, + ), + }) + .strict() + +export const QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + updatedAt: z.coerce.date().optional(), + }) + .strict() + +export const QuestionSlackMessageCreateOrConnectWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + profile: z + .lazy(() => ProfileCreateNestedOneWithoutResolutionMessagesInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutResolutionMessagesInputSchema, + ), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + profileId: z.number().int().optional().nullable(), + }) + .strict() + +export const ResolutionSlackMessageCreateOrConnectWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]), + }) + .strict() + +export const PingSlackMessageUpsertWithoutMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => PingSlackMessageUpdateWithoutMessageInputSchema), + z.lazy(() => PingSlackMessageUncheckedUpdateWithoutMessageInputSchema), + ]), + create: z.union([ + z.lazy(() => PingSlackMessageCreateWithoutMessageInputSchema), + z.lazy(() => PingSlackMessageUncheckedCreateWithoutMessageInputSchema), + ]), + where: z.lazy(() => PingSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const PingSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => PingSlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => PingSlackMessageUpdateWithoutMessageInputSchema), + z.lazy(() => PingSlackMessageUncheckedUpdateWithoutMessageInputSchema), + ]), + }) + .strict() + +export const PingSlackMessageUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutPingResolveMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUpsertWithoutMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => QuestionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]), + where: z.lazy(() => QuestionSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const QuestionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionSlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => QuestionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]), + }) + .strict() + +export const QuestionSlackMessageUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutQuestionMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpsertWithoutMessageInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutMessageInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutMessageInputSchema, + ), + ]), + where: z.lazy(() => ResolutionSlackMessageWhereInputSchema).optional(), + }) + .strict() + +export const ResolutionSlackMessageUpdateToOneWithWhereWithoutMessageInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutMessageInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutMessageInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + profile: z + .lazy(() => ProfileUpdateOneWithoutResolutionMessagesNestedInputSchema) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutResolutionMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateWithoutMessageInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + option: z + .lazy(() => QuestionOptionCreateNestedOneWithoutForecastsInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutForecastsInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutForecastsInputSchema, + ), + }) + .strict() + +export const ForecastUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + optionId: z.string().optional().nullable(), + }) + .strict() + +export const ForecastCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ForecastCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ForecastCreateManyUserInputSchema), + z.lazy(() => ForecastCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ProfileCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutProfileInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutProfileInputSchema) + .optional(), + }) + .strict() + +export const ProfileCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ProfileCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ProfileCreateManyUserInputSchema), + z.lazy(() => ProfileCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionCreateManyUserInputSchema), + z.lazy(() => QuestionCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionScoreCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutQuestionScoresInputSchema, + ), + QuestionOption: z + .lazy( + () => QuestionOptionCreateNestedOneWithoutQuestionScoresInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionScoreCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionScoreCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionScoreCreateManyUserInputSchema), + z.lazy(() => QuestionScoreCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionCreateWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + ]), + }) + .strict() + +export const CommentCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string(), + question: z.lazy(() => QuestionCreateNestedOneWithoutCommentsInputSchema), + }) + .strict() + +export const CommentUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + questionId: z.string(), + }) + .strict() + +export const CommentCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const CommentCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => CommentCreateManyUserInputSchema), + z.lazy(() => CommentCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TargetCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutTargetInputSchema) + .optional(), + }) + .strict() + +export const TargetUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + profileId: z.number().int().optional().nullable(), + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + }) + .strict() + +export const TargetCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TargetWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const UserListCreateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + users: z + .lazy(() => UserCreateNestedManyWithoutMemberOfListsInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithListsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutUserListInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + users: z + .lazy( + () => UserUncheckedCreateNestedManyWithoutMemberOfListsInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedCreateNestedManyWithoutSharedWithListsInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutUserListInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListCreateOrConnectWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const UserListCreateManyAuthorInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => UserListCreateManyAuthorInputSchema), + z.lazy(() => UserListCreateManyAuthorInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserListCreateWithoutUsersInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + author: z.lazy(() => UserCreateNestedOneWithoutAuthorOfListsInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithListsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutUserListInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateWithoutUsersInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + authorId: z.string(), + questions: z + .lazy( + () => + QuestionUncheckedCreateNestedManyWithoutSharedWithListsInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutUserListInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListCreateOrConnectWithoutUsersInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + ]), + }) + .strict() + +export const TagCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutTagsInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutTagsInputSchema) + .optional(), + }) + .strict() + +export const TagCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const TagCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => TagCreateManyUserInputSchema), + z.lazy(() => TagCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TournamentCreateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutTournamentsInputSchema) + .optional(), + userList: z + .lazy(() => UserListCreateNestedOneWithoutTournamentsInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedCreateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.string().optional().nullable(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutTournamentsInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentCreateOrConnectWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const TournamentCreateManyAuthorInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => TournamentCreateManyAuthorInputSchema), + z.lazy(() => TournamentCreateManyAuthorInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const NotificationCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + question: z + .lazy(() => QuestionCreateNestedOneWithoutNotificationsInputSchema) + .optional(), + }) + .strict() + +export const NotificationUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + questionId: z.string().optional().nullable(), + }) + .strict() + +export const NotificationCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const NotificationCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => NotificationCreateManyUserInputSchema), + z.lazy(() => NotificationCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionOptionCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + question: z.lazy(() => QuestionCreateNestedOneWithoutOptionsInputSchema), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutOptionInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutOptionInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionOptionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionOptionCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionOptionCreateManyUserInputSchema), + z.lazy(() => QuestionOptionCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const AccountCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + }) + .strict() + +export const AccountUncheckedCreateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + }) + .strict() + +export const AccountCreateOrConnectWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => AccountWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const AccountCreateManyUserInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => AccountCreateManyUserInputSchema), + z.lazy(() => AccountCreateManyUserInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ForecastUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ForecastUpdateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => ForecastCreateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateWithoutUserInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateManyMutationInputSchema), + z.lazy(() => ForecastUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const ProfileUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ProfileUpdateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => ProfileCreateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ProfileUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ProfileUpdateWithoutUserInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const ProfileUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ProfileUpdateManyMutationInputSchema), + z.lazy(() => ProfileUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const ProfileScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => ProfileScalarWhereInputSchema), + z.lazy(() => ProfileScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => ProfileScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => ProfileScalarWhereInputSchema), + z.lazy(() => ProfileScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => IntFilterSchema), z.number()]).optional(), + createdAt: z + .union([z.lazy(() => DateTimeFilterSchema), z.coerce.date()]) + .optional(), + slackId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + slackTeamId: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutUserInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy(() => QuestionUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionScoreUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutUserInputSchema), + z.lazy(() => QuestionScoreUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionScoreCreateWithoutUserInputSchema), + z.lazy(() => QuestionScoreUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionScoreUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateWithoutUserInputSchema), + z.lazy(() => QuestionScoreUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionScoreUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScoreScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionScoreUpdateManyMutationInputSchema), + z.lazy(() => QuestionScoreUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutSharedWithInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutSharedWithInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutSharedWithInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutSharedWithInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutSharedWithInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy(() => QuestionUncheckedUpdateManyWithoutSharedWithInputSchema), + ]), + }) + .strict() + +export const CommentUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => CommentUpdateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => CommentCreateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const CommentUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => CommentUpdateWithoutUserInputSchema), + z.lazy(() => CommentUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const CommentUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => CommentScalarWhereInputSchema), + data: z.union([ + z.lazy(() => CommentUpdateManyMutationInputSchema), + z.lazy(() => CommentUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const TargetUpsertWithoutUserInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => TargetUpdateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => TargetCreateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutUserInputSchema), + ]), + where: z.lazy(() => TargetWhereInputSchema).optional(), + }) + .strict() + +export const TargetUpdateToOneWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TargetWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => TargetUpdateWithoutUserInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const TargetUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutTargetNestedInputSchema) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListUpsertWithWhereUniqueWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => UserListUpdateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutAuthorInputSchema), + ]), + create: z.union([ + z.lazy(() => UserListCreateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const UserListUpdateWithWhereUniqueWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateWithoutAuthorInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const UserListUpdateManyWithWhereWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListScalarWhereInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateManyMutationInputSchema), + z.lazy(() => UserListUncheckedUpdateManyWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const UserListUpsertWithWhereUniqueWithoutUsersInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => UserListUpdateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutUsersInputSchema), + ]), + create: z.union([ + z.lazy(() => UserListCreateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutUsersInputSchema), + ]), + }) + .strict() + +export const UserListUpdateWithWhereUniqueWithoutUsersInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateWithoutUsersInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutUsersInputSchema), + ]), + }) + .strict() + +export const UserListUpdateManyWithWhereWithoutUsersInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListScalarWhereInputSchema), + data: z.union([ + z.lazy(() => UserListUpdateManyMutationInputSchema), + z.lazy(() => UserListUncheckedUpdateManyWithoutUsersInputSchema), + ]), + }) + .strict() + +export const TagUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => TagUpdateWithoutUserInputSchema), + z.lazy(() => TagUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => TagCreateWithoutUserInputSchema), + z.lazy(() => TagUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const TagUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => TagUpdateWithoutUserInputSchema), + z.lazy(() => TagUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const TagUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TagScalarWhereInputSchema), + data: z.union([ + z.lazy(() => TagUpdateManyMutationInputSchema), + z.lazy(() => TagUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const TournamentUpsertWithWhereUniqueWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => TournamentUpdateWithoutAuthorInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutAuthorInputSchema), + ]), + create: z.union([ + z.lazy(() => TournamentCreateWithoutAuthorInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateWithWhereUniqueWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateWithoutAuthorInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateManyWithWhereWithoutAuthorInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentScalarWhereInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateManyMutationInputSchema), + z.lazy(() => TournamentUncheckedUpdateManyWithoutAuthorInputSchema), + ]), + }) + .strict() + +export const NotificationUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => NotificationUpdateWithoutUserInputSchema), + z.lazy(() => NotificationUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => NotificationCreateWithoutUserInputSchema), + z.lazy(() => NotificationUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const NotificationUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => NotificationUpdateWithoutUserInputSchema), + z.lazy(() => NotificationUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const NotificationUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => NotificationScalarWhereInputSchema), + data: z.union([ + z.lazy(() => NotificationUpdateManyMutationInputSchema), + z.lazy(() => NotificationUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutUserInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionOptionCreateWithoutUserInputSchema), + z.lazy(() => QuestionOptionUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionOptionUpdateWithoutUserInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const QuestionOptionUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionOptionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionOptionUpdateManyMutationInputSchema), + z.lazy(() => QuestionOptionUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const AccountUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => AccountWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => AccountUpdateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedUpdateWithoutUserInputSchema), + ]), + create: z.union([ + z.lazy(() => AccountCreateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedCreateWithoutUserInputSchema), + ]), + }) + .strict() + +export const AccountUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => AccountWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => AccountUpdateWithoutUserInputSchema), + z.lazy(() => AccountUncheckedUpdateWithoutUserInputSchema), + ]), + }) + .strict() + +export const AccountUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => AccountScalarWhereInputSchema), + data: z.union([ + z.lazy(() => AccountUpdateManyMutationInputSchema), + z.lazy(() => AccountUncheckedUpdateManyWithoutUserInputSchema), + ]), + }) + .strict() + +export const AccountScalarWhereInputSchema: z.ZodType = + z + .object({ + AND: z + .union([ + z.lazy(() => AccountScalarWhereInputSchema), + z.lazy(() => AccountScalarWhereInputSchema).array(), + ]) + .optional(), + OR: z + .lazy(() => AccountScalarWhereInputSchema) + .array() + .optional(), + NOT: z + .union([ + z.lazy(() => AccountScalarWhereInputSchema), + z.lazy(() => AccountScalarWhereInputSchema).array(), + ]) + .optional(), + id: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + userId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + type: z.union([z.lazy(() => StringFilterSchema), z.string()]).optional(), + provider: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + providerAccountId: z + .union([z.lazy(() => StringFilterSchema), z.string()]) + .optional(), + refresh_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + access_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + expires_at: z + .union([z.lazy(() => IntNullableFilterSchema), z.number()]) + .optional() + .nullable(), + token_type: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + scope: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + id_token: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + session_state: z + .union([z.lazy(() => StringNullableFilterSchema), z.string()]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + option: z + .lazy(() => QuestionOptionCreateNestedOneWithoutForecastsInputSchema) + .optional(), + question: z.lazy( + () => QuestionCreateNestedOneWithoutForecastsInputSchema, + ), + user: z.lazy(() => UserCreateNestedOneWithoutForecastsInputSchema), + }) + .strict() + +export const ForecastUncheckedCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + questionId: z.string(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const ForecastCreateOrConnectWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const ForecastCreateManyProfileInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ForecastCreateManyProfileInputSchema), + z.lazy(() => ForecastCreateManyProfileInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserCreateWithoutProfilesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutProfilesInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutProfilesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedCreateWithoutProfilesInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const QuestionCreateManyProfileInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => QuestionCreateManyProfileInputSchema), + z.lazy(() => QuestionCreateManyProfileInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + message: z.lazy( + () => + SlackMessageCreateNestedOneWithoutResolutionSlackMessageInputSchema, + ), + question: z.lazy( + () => QuestionCreateNestedOneWithoutResolutionMessagesInputSchema, + ), + }) + .strict() + +export const ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + }) + .strict() + +export const ResolutionSlackMessageCreateOrConnectWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageCreateManyProfileInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => ResolutionSlackMessageCreateManyProfileInputSchema), + z + .lazy(() => ResolutionSlackMessageCreateManyProfileInputSchema) + .array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TargetCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + user: z.lazy(() => UserCreateNestedOneWithoutTargetInputSchema), + }) + .strict() + +export const TargetUncheckedCreateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + userId: z.string(), + type: z.lazy(() => TargetTypeSchema), + goal: z.number().int(), + lastFailedAt: z.coerce.date().optional(), + notifyOn: z.lazy(() => DayOfTheWeekSchema), + lastNotified: z.coerce.date().optional(), + }) + .strict() + +export const TargetCreateOrConnectWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TargetWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const ForecastUpsertWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ForecastUpdateWithoutProfileInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutProfileInputSchema), + ]), + create: z.union([ + z.lazy(() => ForecastCreateWithoutProfileInputSchema), + z.lazy(() => ForecastUncheckedCreateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateWithoutProfileInputSchema), + z.lazy(() => ForecastUncheckedUpdateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const ForecastUpdateManyWithWhereWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ForecastScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ForecastUpdateManyMutationInputSchema), + z.lazy(() => ForecastUncheckedUpdateManyWithoutProfileInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutProfilesInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutProfilesInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedCreateWithoutProfilesInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutProfilesInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutProfilesInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutProfilesInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutProfilesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutProfilesInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutProfileInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutProfileInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutProfileInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutProfileInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy(() => QuestionUncheckedUpdateManyWithoutProfileInputSchema), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpsertWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutProfileInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutProfileInputSchema, + ), + ]), + create: z.union([ + z.lazy(() => ResolutionSlackMessageCreateWithoutProfileInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedCreateWithoutProfileInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpdateWithWhereUniqueWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateWithoutProfileInputSchema), + z.lazy( + () => ResolutionSlackMessageUncheckedUpdateWithoutProfileInputSchema, + ), + ]), + }) + .strict() + +export const ResolutionSlackMessageUpdateManyWithWhereWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ResolutionSlackMessageScalarWhereInputSchema), + data: z.union([ + z.lazy(() => ResolutionSlackMessageUpdateManyMutationInputSchema), + z.lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileInputSchema, + ), + ]), + }) + .strict() + +export const TargetUpsertWithoutProfileInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => TargetUpdateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutProfileInputSchema), + ]), + create: z.union([ + z.lazy(() => TargetCreateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedCreateWithoutProfileInputSchema), + ]), + where: z.lazy(() => TargetWhereInputSchema).optional(), + }) + .strict() + +export const TargetUpdateToOneWithWhereWithoutProfileInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TargetWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => TargetUpdateWithoutProfileInputSchema), + z.lazy(() => TargetUncheckedUpdateWithoutProfileInputSchema), + ]), + }) + .strict() + +export const TargetUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutTargetNestedInputSchema) + .optional(), + }) + .strict() + +export const TargetUncheckedUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => TargetTypeSchema), + z.lazy(() => EnumTargetTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + goal: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastFailedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + notifyOn: z + .union([ + z.lazy(() => DayOfTheWeekSchema), + z.lazy(() => EnumDayOfTheWeekFieldUpdateOperationsInputSchema), + ]) + .optional(), + lastNotified: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserCreateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutTargetInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTargetInputSchema), + ]), + }) + .strict() + +export const ProfileCreateWithoutTargetInputSchema: z.ZodType = + z + .object({ + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutProfileInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutProfilesInputSchema), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + }) + .strict() + +export const ProfileUncheckedCreateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + userId: z.string(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutProfileInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutProfileInputSchema, + ) + .optional(), + }) + .strict() + +export const ProfileCreateOrConnectWithoutTargetInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => ProfileCreateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutTargetInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutTargetInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTargetInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTargetInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutTargetInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutTargetInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTargetInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUpsertWithoutTargetInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => ProfileUpdateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutTargetInputSchema), + ]), + create: z.union([ + z.lazy(() => ProfileCreateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedCreateWithoutTargetInputSchema), + ]), + where: z.lazy(() => ProfileWhereInputSchema).optional(), + }) + .strict() + +export const ProfileUpdateToOneWithWhereWithoutTargetInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => ProfileWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => ProfileUpdateWithoutTargetInputSchema), + z.lazy(() => ProfileUncheckedUpdateWithoutTargetInputSchema), + ]), + }) + .strict() + +export const ProfileUpdateWithoutTargetInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutProfileNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutProfilesNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateWithoutTargetInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserCreateWithoutAccountsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutAccountsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutAccountsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAccountsInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutAccountsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAccountsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAccountsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutAccountsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutAccountsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAccountsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutAccountsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutAccountsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutCommentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutCommentsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutCommentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutCommentsInputSchema), + ]), + }) + .strict() + +export const QuestionUpsertWithoutCommentsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutCommentsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutCommentsInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutCommentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutCommentsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutCommentsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserUpsertWithoutCommentsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutCommentsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutCommentsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutCommentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutCommentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutCommentsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutCommentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserCreateWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAuthorOfListsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithListsInputSchema), + ]), + }) + .strict() + +export const TournamentCreateWithoutUserListInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutTournamentsInputSchema) + .optional(), + author: z.lazy(() => UserCreateNestedOneWithoutTournamentsInputSchema), + }) + .strict() + +export const TournamentUncheckedCreateWithoutUserListInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + questions: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutTournamentsInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentCreateOrConnectWithoutUserListInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + ]), + }) + .strict() + +export const TournamentCreateManyUserListInputEnvelopeSchema: z.ZodType = + z + .object({ + data: z.union([ + z.lazy(() => TournamentCreateManyUserListInputSchema), + z.lazy(() => TournamentCreateManyUserListInputSchema).array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserUpsertWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAuthorOfListsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutAuthorOfListsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutAuthorOfListsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutAuthorOfListsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutAuthorOfListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUpsertWithWhereUniqueWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => UserUpdateWithoutMemberOfListsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutMemberOfListsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutMemberOfListsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutMemberOfListsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithWhereUniqueWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => UserUpdateWithoutMemberOfListsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutMemberOfListsInputSchema), + ]), + }) + .strict() + +export const UserUpdateManyWithWhereWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserScalarWhereInputSchema), + data: z.union([ + z.lazy(() => UserUpdateManyMutationInputSchema), + z.lazy(() => UserUncheckedUpdateManyWithoutMemberOfListsInputSchema), + ]), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutSharedWithListsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutSharedWithListsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutSharedWithListsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutSharedWithListsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithListsInputSchema, + ), + ]), + }) + .strict() + +export const TournamentUpsertWithWhereUniqueWithoutUserListInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => TournamentUpdateWithoutUserListInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutUserListInputSchema), + ]), + create: z.union([ + z.lazy(() => TournamentCreateWithoutUserListInputSchema), + z.lazy(() => TournamentUncheckedCreateWithoutUserListInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateWithWhereUniqueWithoutUserListInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateWithoutUserListInputSchema), + z.lazy(() => TournamentUncheckedUpdateWithoutUserListInputSchema), + ]), + }) + .strict() + +export const TournamentUpdateManyWithWhereWithoutUserListInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => TournamentScalarWhereInputSchema), + data: z.union([ + z.lazy(() => TournamentUpdateManyMutationInputSchema), + z.lazy(() => TournamentUncheckedUpdateManyWithoutUserListInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutQuestionInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const UserCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + notifications: z + .lazy(() => NotificationCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const UserListCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + author: z.lazy(() => UserCreateNestedOneWithoutAuthorOfListsInputSchema), + users: z + .lazy(() => UserCreateNestedManyWithoutMemberOfListsInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithListsInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedCreateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + authorId: z.string(), + users: z + .lazy( + () => UserUncheckedCreateNestedManyWithoutMemberOfListsInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedCreateNestedManyWithoutSharedWithListsInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListCreateOrConnectWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserListCreateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const QuestionUpsertWithWhereUniqueWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + update: z.union([ + z.lazy(() => QuestionUpdateWithoutTournamentsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutTournamentsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutTournamentsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithWhereUniqueWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutTournamentsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateManyWithWhereWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionScalarWhereInputSchema), + data: z.union([ + z.lazy(() => QuestionUpdateManyMutationInputSchema), + z.lazy(() => QuestionUncheckedUpdateManyWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTournamentsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutTournamentsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUpsertWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserListUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutTournamentsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserListCreateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedCreateWithoutTournamentsInputSchema), + ]), + where: z.lazy(() => UserListWhereInputSchema).optional(), + }) + .strict() + +export const UserListUpdateToOneWithWhereWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserListWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserListUpdateWithoutTournamentsInputSchema), + z.lazy(() => UserListUncheckedUpdateWithoutTournamentsInputSchema), + ]), + }) + .strict() + +export const UserListUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutAuthorOfListsNestedInputSchema) + .optional(), + users: z + .lazy(() => UserUpdateManyWithoutMemberOfListsNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutSharedWithListsNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + users: z + .lazy( + () => UserUncheckedUpdateManyWithoutMemberOfListsNestedInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedUpdateManyWithoutSharedWithListsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserCreateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutUserInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionCreateNestedManyWithoutSharedWithInputSchema) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z.lazy(() => TagCreateNestedManyWithoutUserInputSchema).optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutAuthorInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionCreateNestedManyWithoutUserInputSchema) + .optional(), + accounts: z + .lazy(() => AccountCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedCreateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + name: z.string().optional().nullable(), + createdAt: z.coerce.date().optional(), + email: z.string(), + image: z.string().optional().nullable(), + staleReminder: z.boolean().optional(), + unsubscribedFromEmailsAt: z.coerce.date().optional().nullable(), + apiKey: z.string().optional().nullable(), + discordUserId: z.string().optional().nullable(), + emailVerified: z.coerce.date().optional().nullable(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedCreateNestedManyWithoutSharedWithInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedCreateNestedOneWithoutUserInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedCreateNestedManyWithoutUsersInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedCreateNestedManyWithoutAuthorInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedCreateNestedManyWithoutUserInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedCreateNestedManyWithoutUserInputSchema) + .optional(), + }) + .strict() + +export const UserCreateOrConnectWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => UserCreateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutNotificationsInputSchema), + ]), + }) + .strict() + +export const QuestionCreateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy(() => QuestionOptionCreateNestedManyWithoutQuestionInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageCreateNestedManyWithoutQuestionInputSchema) + .optional(), + profile: z + .lazy(() => ProfileCreateNestedOneWithoutQuestionsInputSchema) + .optional(), + user: z.lazy(() => UserCreateNestedOneWithoutQuestionsInputSchema), + sharedWith: z + .lazy(() => UserCreateNestedManyWithoutQuestionsSharedWithInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreCreateNestedManyWithoutQuestionInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedCreateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedCreateNestedManyWithoutQuestionsSharedWithInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedCreateNestedManyWithoutQuestionInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedCreateNestedManyWithoutQuestionInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedCreateNestedManyWithoutQuestionsInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedCreateNestedManyWithoutQuestionsInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionCreateOrConnectWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereUniqueInputSchema), + create: z.union([ + z.lazy(() => QuestionCreateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutNotificationsInputSchema), + ]), + }) + .strict() + +export const UserUpsertWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => UserUpdateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutNotificationsInputSchema), + ]), + create: z.union([ + z.lazy(() => UserCreateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedCreateWithoutNotificationsInputSchema), + ]), + where: z.lazy(() => UserWhereInputSchema).optional(), + }) + .strict() + +export const UserUpdateToOneWithWhereWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => UserUpdateWithoutNotificationsInputSchema), + z.lazy(() => UserUncheckedUpdateWithoutNotificationsInputSchema), + ]), + }) + .strict() + +export const UserUpdateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUpsertWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + update: z.union([ + z.lazy(() => QuestionUpdateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutNotificationsInputSchema), + ]), + create: z.union([ + z.lazy(() => QuestionCreateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedCreateWithoutNotificationsInputSchema), + ]), + where: z.lazy(() => QuestionWhereInputSchema).optional(), + }) + .strict() + +export const QuestionUpdateToOneWithWhereWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + where: z.lazy(() => QuestionWhereInputSchema).optional(), + data: z.union([ + z.lazy(() => QuestionUpdateWithoutNotificationsInputSchema), + z.lazy(() => QuestionUncheckedUpdateWithoutNotificationsInputSchema), + ]), + }) + .strict() + +export const QuestionUpdateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutNotificationsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ForecastCreateManyOptionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + userId: z.string(), + }) + .strict() + +export const QuestionScoreCreateManyQuestionOptionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + }) + .strict() + +export const ForecastUpdateWithoutOptionInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateWithoutOptionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutOptionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUpdateWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy( + () => QuestionUpdateOneRequiredWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionScoresNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutQuestionOptionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + userId: z.string(), + resolvedAt: z.coerce.date().optional().nullable(), + }) + .strict() + +export const ForecastCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const PingSlackMessageCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + }) + .strict() + +export const QuestionScoreCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + userId: z.string(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionSlackMessageCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + updatedAt: z.coerce.date().optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + detailsId: z.number().int(), + profileId: z.number().int().optional().nullable(), + }) + .strict() + +export const CommentCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + userId: z.string(), + }) + .strict() + +export const NotificationCreateManyQuestionInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + userId: z.string(), + }) + .strict() + +export const QuestionOptionUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutOptionNestedInputSchema) + .optional(), + user: z + .lazy( + () => UserUpdateOneRequiredWithoutQuestionOptionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutOptionNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + option: z + .lazy(() => QuestionOptionUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutPingSlackMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserUpdateWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + memberOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutUsersNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateManyWithoutQuestionsSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const UserListUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutAuthorOfListsNestedInputSchema) + .optional(), + users: z + .lazy(() => UserUpdateManyWithoutMemberOfListsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutUserListNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + users: z + .lazy( + () => UserUncheckedUpdateManyWithoutMemberOfListsNestedInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutUserListNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionScoresNestedInputSchema) + .optional(), + QuestionOption: z + .lazy( + () => QuestionOptionUpdateOneWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionSlackMessageUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutQuestionSlackMessageNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + updatedAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutResolutionSlackMessageNestedInputSchema, + ) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutResolutionMessagesNestedInputSchema) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const CommentUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutCommentsNestedInputSchema) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TagUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutTagsNestedInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TournamentUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutTournamentsNestedInputSchema) + .optional(), + userList: z + .lazy(() => UserListUpdateOneWithoutTournamentsNestedInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutQuestionsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutNotificationsNestedInputSchema) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateManyWithoutQuestionInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutTagsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + profileId: z.number().int().optional().nullable(), + questionId: z.string(), + optionId: z.string().optional().nullable(), + }) + .strict() + +export const ProfileCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + slackId: z.string().optional().nullable(), + slackTeamId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + profileId: z.number().int().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + }) + .strict() + +export const QuestionScoreCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + relativeScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { message: "Must be a Decimal" }) + .optional() + .nullable(), + questionId: z.string(), + userQuestionComboId: z.string(), + absoluteScore: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + rank: z.number().int(), + questionOptionId: z.string().optional().nullable(), + }) + .strict() + +export const CommentCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string(), + questionId: z.string(), + }) + .strict() + +export const UserListCreateManyAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + inviteId: z.string().cuid().optional().nullable(), + name: z.string(), + emailDomains: z + .union([ + z.lazy(() => UserListCreateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + }) + .strict() + +export const TagCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + }) + .strict() + +export const TournamentCreateManyAuthorInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + userListId: z.string().optional().nullable(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + }) + .strict() + +export const NotificationCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + emailSentAt: z.coerce.date().optional().nullable(), + title: z.string(), + content: z.string(), + url: z.string().optional().nullable(), + tags: z + .union([ + z.lazy(() => NotificationCreatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z.boolean().optional(), + questionId: z.string().optional().nullable(), + }) + .strict() + +export const QuestionOptionCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + questionId: z.string(), + text: z.string(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + createdAt: z.coerce.date().optional(), + resolvedAt: z.coerce.date().optional().nullable(), + }) + .strict() + +export const AccountCreateManyUserInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + type: z.string(), + provider: z.string(), + providerAccountId: z.string(), + refresh_token: z.string().optional().nullable(), + access_token: z.string().optional().nullable(), + expires_at: z.number().int().optional().nullable(), + token_type: z.string().optional().nullable(), + scope: z.string().optional().nullable(), + id_token: z.string().optional().nullable(), + session_state: z.string().optional().nullable(), + }) + .strict() + +export const ForecastUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + option: z + .lazy(() => QuestionOptionUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ProfileUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutProfileNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => ResolutionSlackMessageUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutProfileNestedInputSchema) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutProfileNestedInputSchema, + ) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutProfileNestedInputSchema) + .optional(), + }) + .strict() + +export const ProfileUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + slackId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + slackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy( + () => QuestionUpdateOneRequiredWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + QuestionOption: z + .lazy( + () => QuestionOptionUpdateOneWithoutQuestionScoresNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionScoreUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + relativeScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => NullableDecimalFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + userQuestionComboId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + absoluteScore: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + rank: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionOptionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionUpdateWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutSharedWithInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const CommentUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutCommentsNestedInputSchema) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const CommentUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const UserListUpdateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + users: z + .lazy(() => UserUpdateManyWithoutMemberOfListsNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutSharedWithListsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutUserListNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + users: z + .lazy( + () => UserUncheckedUpdateManyWithoutMemberOfListsNestedInputSchema, + ) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedUpdateManyWithoutSharedWithListsNestedInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutUserListNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const UserListUpdateWithoutUsersInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutAuthorOfListsNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutSharedWithListsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutUserListNestedInputSchema) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateWithoutUsersInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questions: z + .lazy( + () => + QuestionUncheckedUpdateManyWithoutSharedWithListsNestedInputSchema, + ) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutUserListNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const UserListUncheckedUpdateManyWithoutUsersInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + inviteId: z + .union([ + z.string().cuid(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailDomains: z + .union([ + z.lazy(() => UserListUpdateemailDomainsInputSchema), + z.string().array(), + ]) + .optional(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TagUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutTagsNestedInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutTagsNestedInputSchema) + .optional(), + }) + .strict() + +export const TagUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TournamentUpdateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy(() => QuestionUpdateManyWithoutTournamentsNestedInputSchema) + .optional(), + userList: z + .lazy(() => UserListUpdateOneWithoutTournamentsNestedInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutTournamentsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutAuthorInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + userListId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + question: z + .lazy(() => QuestionUpdateOneWithoutNotificationsNestedInputSchema) + .optional(), + }) + .strict() + +export const NotificationUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const NotificationUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + emailSentAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + content: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + url: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + tags: z + .union([ + z.lazy(() => NotificationUpdatetagsInputSchema), + z.string().array(), + ]) + .optional(), + read: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionOptionUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutOptionsNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutOptionNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutOptionNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionOptionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionOptionUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + text: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const AccountUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const AccountUncheckedUpdateWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const AccountUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + provider: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + providerAccountId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + refresh_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + access_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + expires_at: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + token_type: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + scope: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + id_token: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + session_state: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ForecastCreateManyProfileInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + forecast: z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + questionId: z.string(), + optionId: z.string().optional().nullable(), + userId: z.string(), + }) + .strict() + +export const QuestionCreateManyProfileInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + comment: z.string().optional().nullable(), + title: z.string(), + type: z.lazy(() => QuestionTypeSchema).optional(), + resolveBy: z.coerce.date(), + resolved: z.boolean().optional(), + pingedForResolution: z.boolean().optional(), + resolution: z + .lazy(() => ResolutionSchema) + .optional() + .nullable(), + resolvedAt: z.coerce.date().optional().nullable(), + notes: z.string().optional().nullable(), + hideForecastsUntil: z.coerce.date().optional().nullable(), + hideForecastsUntilPrediction: z.boolean().optional().nullable(), + userId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + exclusiveAnswers: z.boolean().optional().nullable(), + }) + .strict() + +export const ResolutionSlackMessageCreateManyProfileInputSchema: z.ZodType = + z + .object({ + id: z.number().int().optional(), + questionId: z.string(), + detailsId: z.number().int(), + }) + .strict() + +export const ForecastUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + option: z + .lazy(() => QuestionOptionUpdateOneWithoutForecastsNestedInputSchema) + .optional(), + question: z + .lazy(() => QuestionUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutForecastsNestedInputSchema) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ForecastUncheckedUpdateManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecast: z + .union([ + z + .union([ + z.number(), + z.string(), + z.instanceof(Decimal), + z.instanceof(Prisma.Decimal), + DecimalJsLikeSchema, + ]) + .refine((v) => isValidDecimalInput(v), { + message: "Must be a Decimal", + }), + z.lazy(() => DecimalFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + optionId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const QuestionUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const ResolutionSlackMessageUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + message: z + .lazy( + () => + SlackMessageUpdateOneRequiredWithoutResolutionSlackMessageNestedInputSchema, + ) + .optional(), + question: z + .lazy( + () => + QuestionUpdateOneRequiredWithoutResolutionMessagesNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageUncheckedUpdateManyWithoutProfileInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + questionId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + detailsId: z + .union([ + z.number().int(), + z.lazy(() => IntFieldUpdateOperationsInputSchema), + ]) + .optional(), + }) + .strict() + +export const TournamentCreateManyUserListInputSchema: z.ZodType = + z + .object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + authorId: z.string(), + sharedPublicly: z.boolean().optional(), + unlisted: z.boolean().optional(), + anyoneInListCanEdit: z.boolean().optional(), + showLeaderboard: z.boolean().optional(), + predictYourYear: z.number().int().optional().nullable(), + syncToSlackTeamId: z.string().optional().nullable(), + syncToSlackChannelId: z.string().optional().nullable(), + }) + .strict() + +export const UserUpdateWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionsSharedWith: z + .lazy(() => QuestionUpdateManyWithoutSharedWithNestedInputSchema) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + tags: z.lazy(() => TagUpdateManyWithoutUserNestedInputSchema).optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy(() => QuestionOptionUpdateManyWithoutUserNestedInputSchema) + .optional(), + accounts: z + .lazy(() => AccountUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + profiles: z + .lazy(() => ProfileUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questions: z + .lazy(() => QuestionUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionScores: z + .lazy( + () => QuestionScoreUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + questionsSharedWith: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutSharedWithNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + target: z + .lazy(() => TargetUncheckedUpdateOneWithoutUserNestedInputSchema) + .optional(), + authorOfLists: z + .lazy(() => UserListUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUncheckedUpdateManyWithoutAuthorNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + questionOptions: z + .lazy( + () => QuestionOptionUncheckedUpdateManyWithoutUserNestedInputSchema, + ) + .optional(), + accounts: z + .lazy(() => AccountUncheckedUpdateManyWithoutUserNestedInputSchema) + .optional(), + }) + .strict() + +export const UserUncheckedUpdateManyWithoutMemberOfListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + email: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + image: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + staleReminder: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unsubscribedFromEmailsAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + apiKey: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + discordUserId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + emailVerified: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionUpdateWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy(() => TournamentUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + tournaments: z + .lazy( + () => TournamentUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutSharedWithListsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const TournamentUpdateWithoutUserListInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy(() => QuestionUpdateManyWithoutTournamentsNestedInputSchema) + .optional(), + author: z + .lazy(() => UserUpdateOneRequiredWithoutTournamentsNestedInputSchema) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateWithoutUserListInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + questions: z + .lazy( + () => QuestionUncheckedUpdateManyWithoutTournamentsNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const TournamentUncheckedUpdateManyWithoutUserListInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + name: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + description: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + authorId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + anyoneInListCanEdit: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + showLeaderboard: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + predictYourYear: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackTeamId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + syncToSlackChannelId: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +export const QuestionUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy(() => QuestionOptionUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + forecasts: z + .lazy(() => ForecastUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy(() => PingSlackMessageUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + profile: z + .lazy(() => ProfileUpdateOneWithoutQuestionsNestedInputSchema) + .optional(), + user: z + .lazy(() => UserUpdateOneRequiredWithoutQuestionsNestedInputSchema) + .optional(), + sharedWith: z + .lazy(() => UserUpdateManyWithoutQuestionsSharedWithNestedInputSchema) + .optional(), + sharedWithLists: z + .lazy(() => UserListUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + questionScores: z + .lazy(() => QuestionScoreUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + questionMessages: z + .lazy( + () => QuestionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy(() => NotificationUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + options: z + .lazy( + () => + QuestionOptionUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + forecasts: z + .lazy(() => ForecastUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + pingResolveMessages: z + .lazy( + () => + PingSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + sharedWith: z + .lazy( + () => + UserUncheckedUpdateManyWithoutQuestionsSharedWithNestedInputSchema, + ) + .optional(), + sharedWithLists: z + .lazy( + () => UserListUncheckedUpdateManyWithoutQuestionsNestedInputSchema, + ) + .optional(), + questionScores: z + .lazy( + () => + QuestionScoreUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + questionMessages: z + .lazy( + () => + QuestionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + resolutionMessages: z + .lazy( + () => + ResolutionSlackMessageUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + comments: z + .lazy(() => CommentUncheckedUpdateManyWithoutQuestionNestedInputSchema) + .optional(), + tags: z + .lazy(() => TagUncheckedUpdateManyWithoutQuestionsNestedInputSchema) + .optional(), + notifications: z + .lazy( + () => NotificationUncheckedUpdateManyWithoutQuestionNestedInputSchema, + ) + .optional(), + }) + .strict() + +export const QuestionUncheckedUpdateManyWithoutTournamentsInputSchema: z.ZodType = + z + .object({ + id: z + .union([ + z.string().cuid(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + createdAt: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + comment: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + profileId: z + .union([ + z.number().int(), + z.lazy(() => NullableIntFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + title: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + type: z + .union([ + z.lazy(() => QuestionTypeSchema), + z.lazy(() => EnumQuestionTypeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolveBy: z + .union([ + z.coerce.date(), + z.lazy(() => DateTimeFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolved: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + pingedForResolution: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + resolution: z + .union([ + z.lazy(() => ResolutionSchema), + z.lazy(() => NullableEnumResolutionFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + resolvedAt: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + notes: z + .union([ + z.string(), + z.lazy(() => NullableStringFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntil: z + .union([ + z.coerce.date(), + z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + hideForecastsUntilPrediction: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + userId: z + .union([ + z.string(), + z.lazy(() => StringFieldUpdateOperationsInputSchema), + ]) + .optional(), + sharedPublicly: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + unlisted: z + .union([ + z.boolean(), + z.lazy(() => BoolFieldUpdateOperationsInputSchema), + ]) + .optional(), + exclusiveAnswers: z + .union([ + z.boolean(), + z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema), + ]) + .optional() + .nullable(), + }) + .strict() + +///////////////////////////////////////// +// ARGS +///////////////////////////////////////// + +export const WorkspaceFindFirstArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereInputSchema.optional(), + orderBy: z + .union([ + WorkspaceOrderByWithRelationInputSchema.array(), + WorkspaceOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: WorkspaceWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + WorkspaceScalarFieldEnumSchema, + WorkspaceScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const WorkspaceFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereInputSchema.optional(), + orderBy: z + .union([ + WorkspaceOrderByWithRelationInputSchema.array(), + WorkspaceOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: WorkspaceWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + WorkspaceScalarFieldEnumSchema, + WorkspaceScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const WorkspaceFindManyArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereInputSchema.optional(), + orderBy: z + .union([ + WorkspaceOrderByWithRelationInputSchema.array(), + WorkspaceOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: WorkspaceWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + WorkspaceScalarFieldEnumSchema, + WorkspaceScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const WorkspaceAggregateArgsSchema: z.ZodType = + z + .object({ + where: WorkspaceWhereInputSchema.optional(), + orderBy: z + .union([ + WorkspaceOrderByWithRelationInputSchema.array(), + WorkspaceOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: WorkspaceWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const WorkspaceGroupByArgsSchema: z.ZodType = + z + .object({ + where: WorkspaceWhereInputSchema.optional(), + orderBy: z + .union([ + WorkspaceOrderByWithAggregationInputSchema.array(), + WorkspaceOrderByWithAggregationInputSchema, + ]) + .optional(), + by: WorkspaceScalarFieldEnumSchema.array(), + having: WorkspaceScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const WorkspaceFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereUniqueInputSchema, + }) + .strict() + +export const WorkspaceFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereUniqueInputSchema, + }) + .strict() + +export const ForecastFindFirstArgsSchema: z.ZodType = + z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereInputSchema.optional(), + orderBy: z + .union([ + ForecastOrderByWithRelationInputSchema.array(), + ForecastOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ForecastWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ForecastScalarFieldEnumSchema, + ForecastScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ForecastFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereInputSchema.optional(), + orderBy: z + .union([ + ForecastOrderByWithRelationInputSchema.array(), + ForecastOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ForecastWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ForecastScalarFieldEnumSchema, + ForecastScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ForecastFindManyArgsSchema: z.ZodType = + z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereInputSchema.optional(), + orderBy: z + .union([ + ForecastOrderByWithRelationInputSchema.array(), + ForecastOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ForecastWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ForecastScalarFieldEnumSchema, + ForecastScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ForecastAggregateArgsSchema: z.ZodType = + z + .object({ + where: ForecastWhereInputSchema.optional(), + orderBy: z + .union([ + ForecastOrderByWithRelationInputSchema.array(), + ForecastOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ForecastWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ForecastGroupByArgsSchema: z.ZodType = + z + .object({ + where: ForecastWhereInputSchema.optional(), + orderBy: z + .union([ + ForecastOrderByWithAggregationInputSchema.array(), + ForecastOrderByWithAggregationInputSchema, + ]) + .optional(), + by: ForecastScalarFieldEnumSchema.array(), + having: ForecastScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ForecastFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereUniqueInputSchema, + }) + .strict() + +export const ForecastFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereUniqueInputSchema, + }) + .strict() + +export const QuestionScoreFindFirstArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionScoreOrderByWithRelationInputSchema.array(), + QuestionScoreOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionScoreWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScoreScalarFieldEnumSchema, + QuestionScoreScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionScoreOrderByWithRelationInputSchema.array(), + QuestionScoreOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionScoreWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScoreScalarFieldEnumSchema, + QuestionScoreScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreFindManyArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionScoreOrderByWithRelationInputSchema.array(), + QuestionScoreOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionScoreWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScoreScalarFieldEnumSchema, + QuestionScoreScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionScoreAggregateArgsSchema: z.ZodType = + z + .object({ + where: QuestionScoreWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionScoreOrderByWithRelationInputSchema.array(), + QuestionScoreOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionScoreWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionScoreGroupByArgsSchema: z.ZodType = + z + .object({ + where: QuestionScoreWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionScoreOrderByWithAggregationInputSchema.array(), + QuestionScoreOrderByWithAggregationInputSchema, + ]) + .optional(), + by: QuestionScoreScalarFieldEnumSchema.array(), + having: QuestionScoreScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionScoreFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereUniqueInputSchema, + }) + .strict() + +export const QuestionScoreFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereUniqueInputSchema, + }) + .strict() + +export const QuestionOptionFindFirstArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOptionOrderByWithRelationInputSchema.array(), + QuestionOptionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionOptionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionOptionScalarFieldEnumSchema, + QuestionOptionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOptionOrderByWithRelationInputSchema.array(), + QuestionOptionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionOptionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionOptionScalarFieldEnumSchema, + QuestionOptionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionFindManyArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOptionOrderByWithRelationInputSchema.array(), + QuestionOptionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionOptionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionOptionScalarFieldEnumSchema, + QuestionOptionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionOptionAggregateArgsSchema: z.ZodType = + z + .object({ + where: QuestionOptionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOptionOrderByWithRelationInputSchema.array(), + QuestionOptionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionOptionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionOptionGroupByArgsSchema: z.ZodType = + z + .object({ + where: QuestionOptionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOptionOrderByWithAggregationInputSchema.array(), + QuestionOptionOrderByWithAggregationInputSchema, + ]) + .optional(), + by: QuestionOptionScalarFieldEnumSchema.array(), + having: QuestionOptionScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionOptionFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionOptionFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionFindFirstArgsSchema: z.ZodType = + z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOrderByWithRelationInputSchema.array(), + QuestionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScalarFieldEnumSchema, + QuestionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOrderByWithRelationInputSchema.array(), + QuestionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScalarFieldEnumSchema, + QuestionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionFindManyArgsSchema: z.ZodType = + z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOrderByWithRelationInputSchema.array(), + QuestionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionScalarFieldEnumSchema, + QuestionScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionAggregateArgsSchema: z.ZodType = + z + .object({ + where: QuestionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOrderByWithRelationInputSchema.array(), + QuestionOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionGroupByArgsSchema: z.ZodType = + z + .object({ + where: QuestionWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionOrderByWithAggregationInputSchema.array(), + QuestionOrderByWithAggregationInputSchema, + ]) + .optional(), + by: QuestionScalarFieldEnumSchema.array(), + having: QuestionScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereUniqueInputSchema, + }) + .strict() + +export const TagFindFirstArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereInputSchema.optional(), + orderBy: z + .union([ + TagOrderByWithRelationInputSchema.array(), + TagOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TagWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([TagScalarFieldEnumSchema, TagScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const TagFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereInputSchema.optional(), + orderBy: z + .union([ + TagOrderByWithRelationInputSchema.array(), + TagOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TagWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([TagScalarFieldEnumSchema, TagScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const TagFindManyArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereInputSchema.optional(), + orderBy: z + .union([ + TagOrderByWithRelationInputSchema.array(), + TagOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TagWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([TagScalarFieldEnumSchema, TagScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const TagAggregateArgsSchema: z.ZodType = z + .object({ + where: TagWhereInputSchema.optional(), + orderBy: z + .union([ + TagOrderByWithRelationInputSchema.array(), + TagOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TagWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TagGroupByArgsSchema: z.ZodType = z + .object({ + where: TagWhereInputSchema.optional(), + orderBy: z + .union([ + TagOrderByWithAggregationInputSchema.array(), + TagOrderByWithAggregationInputSchema, + ]) + .optional(), + by: TagScalarFieldEnumSchema.array(), + having: TagScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TagFindUniqueArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereUniqueInputSchema, + }) + .strict() + +export const TagFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereUniqueInputSchema, + }) + .strict() + +export const ResolutionSlackMessageFindFirstArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + ResolutionSlackMessageOrderByWithRelationInputSchema.array(), + ResolutionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ResolutionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ResolutionSlackMessageScalarFieldEnumSchema, + ResolutionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + ResolutionSlackMessageOrderByWithRelationInputSchema.array(), + ResolutionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ResolutionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ResolutionSlackMessageScalarFieldEnumSchema, + ResolutionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageFindManyArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + ResolutionSlackMessageOrderByWithRelationInputSchema.array(), + ResolutionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ResolutionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ResolutionSlackMessageScalarFieldEnumSchema, + ResolutionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ResolutionSlackMessageAggregateArgsSchema: z.ZodType = + z + .object({ + where: ResolutionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + ResolutionSlackMessageOrderByWithRelationInputSchema.array(), + ResolutionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ResolutionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ResolutionSlackMessageGroupByArgsSchema: z.ZodType = + z + .object({ + where: ResolutionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + ResolutionSlackMessageOrderByWithAggregationInputSchema.array(), + ResolutionSlackMessageOrderByWithAggregationInputSchema, + ]) + .optional(), + by: ResolutionSlackMessageScalarFieldEnumSchema.array(), + having: + ResolutionSlackMessageScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ResolutionSlackMessageFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const ResolutionSlackMessageFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const PingSlackMessageFindFirstArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + PingSlackMessageOrderByWithRelationInputSchema.array(), + PingSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: PingSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + PingSlackMessageScalarFieldEnumSchema, + PingSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + PingSlackMessageOrderByWithRelationInputSchema.array(), + PingSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: PingSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + PingSlackMessageScalarFieldEnumSchema, + PingSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageFindManyArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + PingSlackMessageOrderByWithRelationInputSchema.array(), + PingSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: PingSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + PingSlackMessageScalarFieldEnumSchema, + PingSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const PingSlackMessageAggregateArgsSchema: z.ZodType = + z + .object({ + where: PingSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + PingSlackMessageOrderByWithRelationInputSchema.array(), + PingSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: PingSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const PingSlackMessageGroupByArgsSchema: z.ZodType = + z + .object({ + where: PingSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + PingSlackMessageOrderByWithAggregationInputSchema.array(), + PingSlackMessageOrderByWithAggregationInputSchema, + ]) + .optional(), + by: PingSlackMessageScalarFieldEnumSchema.array(), + having: PingSlackMessageScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const PingSlackMessageFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const PingSlackMessageFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const QuestionSlackMessageFindFirstArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionSlackMessageOrderByWithRelationInputSchema.array(), + QuestionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionSlackMessageScalarFieldEnumSchema, + QuestionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionSlackMessageOrderByWithRelationInputSchema.array(), + QuestionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionSlackMessageScalarFieldEnumSchema, + QuestionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageFindManyArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionSlackMessageOrderByWithRelationInputSchema.array(), + QuestionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + QuestionSlackMessageScalarFieldEnumSchema, + QuestionSlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const QuestionSlackMessageAggregateArgsSchema: z.ZodType = + z + .object({ + where: QuestionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionSlackMessageOrderByWithRelationInputSchema.array(), + QuestionSlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: QuestionSlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionSlackMessageGroupByArgsSchema: z.ZodType = + z + .object({ + where: QuestionSlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + QuestionSlackMessageOrderByWithAggregationInputSchema.array(), + QuestionSlackMessageOrderByWithAggregationInputSchema, + ]) + .optional(), + by: QuestionSlackMessageScalarFieldEnumSchema.array(), + having: + QuestionSlackMessageScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const QuestionSlackMessageFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const QuestionSlackMessageFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const SlackMessageFindFirstArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + SlackMessageOrderByWithRelationInputSchema.array(), + SlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: SlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + SlackMessageScalarFieldEnumSchema, + SlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const SlackMessageFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + SlackMessageOrderByWithRelationInputSchema.array(), + SlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: SlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + SlackMessageScalarFieldEnumSchema, + SlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const SlackMessageFindManyArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + SlackMessageOrderByWithRelationInputSchema.array(), + SlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: SlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + SlackMessageScalarFieldEnumSchema, + SlackMessageScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const SlackMessageAggregateArgsSchema: z.ZodType = + z + .object({ + where: SlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + SlackMessageOrderByWithRelationInputSchema.array(), + SlackMessageOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: SlackMessageWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const SlackMessageGroupByArgsSchema: z.ZodType = + z + .object({ + where: SlackMessageWhereInputSchema.optional(), + orderBy: z + .union([ + SlackMessageOrderByWithAggregationInputSchema.array(), + SlackMessageOrderByWithAggregationInputSchema, + ]) + .optional(), + by: SlackMessageScalarFieldEnumSchema.array(), + having: SlackMessageScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const SlackMessageFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const SlackMessageFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const UserFindFirstArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z + .union([ + UserOrderByWithRelationInputSchema.array(), + UserOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([UserScalarFieldEnumSchema, UserScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const UserFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z + .union([ + UserOrderByWithRelationInputSchema.array(), + UserOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([UserScalarFieldEnumSchema, UserScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const UserFindManyArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z + .union([ + UserOrderByWithRelationInputSchema.array(), + UserOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([UserScalarFieldEnumSchema, UserScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const UserAggregateArgsSchema: z.ZodType = z + .object({ + where: UserWhereInputSchema.optional(), + orderBy: z + .union([ + UserOrderByWithRelationInputSchema.array(), + UserOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const UserGroupByArgsSchema: z.ZodType = z + .object({ + where: UserWhereInputSchema.optional(), + orderBy: z + .union([ + UserOrderByWithAggregationInputSchema.array(), + UserOrderByWithAggregationInputSchema, + ]) + .optional(), + by: UserScalarFieldEnumSchema.array(), + having: UserScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const UserFindUniqueArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, + }) + .strict() + +export const UserFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, + }) + .strict() + +export const ProfileFindFirstArgsSchema: z.ZodType = + z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereInputSchema.optional(), + orderBy: z + .union([ + ProfileOrderByWithRelationInputSchema.array(), + ProfileOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ProfileWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ProfileScalarFieldEnumSchema, + ProfileScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ProfileFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereInputSchema.optional(), + orderBy: z + .union([ + ProfileOrderByWithRelationInputSchema.array(), + ProfileOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ProfileWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ProfileScalarFieldEnumSchema, + ProfileScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ProfileFindManyArgsSchema: z.ZodType = + z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereInputSchema.optional(), + orderBy: z + .union([ + ProfileOrderByWithRelationInputSchema.array(), + ProfileOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ProfileWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + ProfileScalarFieldEnumSchema, + ProfileScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const ProfileAggregateArgsSchema: z.ZodType = + z + .object({ + where: ProfileWhereInputSchema.optional(), + orderBy: z + .union([ + ProfileOrderByWithRelationInputSchema.array(), + ProfileOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: ProfileWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ProfileGroupByArgsSchema: z.ZodType = z + .object({ + where: ProfileWhereInputSchema.optional(), + orderBy: z + .union([ + ProfileOrderByWithAggregationInputSchema.array(), + ProfileOrderByWithAggregationInputSchema, + ]) + .optional(), + by: ProfileScalarFieldEnumSchema.array(), + having: ProfileScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const ProfileFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereUniqueInputSchema, + }) + .strict() + +export const ProfileFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereUniqueInputSchema, + }) + .strict() + +export const GroupFindFirstArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereInputSchema.optional(), + orderBy: z + .union([ + GroupOrderByWithRelationInputSchema.array(), + GroupOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: GroupWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([GroupScalarFieldEnumSchema, GroupScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const GroupFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereInputSchema.optional(), + orderBy: z + .union([ + GroupOrderByWithRelationInputSchema.array(), + GroupOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: GroupWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([GroupScalarFieldEnumSchema, GroupScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const GroupFindManyArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereInputSchema.optional(), + orderBy: z + .union([ + GroupOrderByWithRelationInputSchema.array(), + GroupOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: GroupWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([GroupScalarFieldEnumSchema, GroupScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const GroupAggregateArgsSchema: z.ZodType = z + .object({ + where: GroupWhereInputSchema.optional(), + orderBy: z + .union([ + GroupOrderByWithRelationInputSchema.array(), + GroupOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: GroupWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const GroupGroupByArgsSchema: z.ZodType = z + .object({ + where: GroupWhereInputSchema.optional(), + orderBy: z + .union([ + GroupOrderByWithAggregationInputSchema.array(), + GroupOrderByWithAggregationInputSchema, + ]) + .optional(), + by: GroupScalarFieldEnumSchema.array(), + having: GroupScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const GroupFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereUniqueInputSchema, + }) + .strict() + +export const GroupFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereUniqueInputSchema, + }) + .strict() + +export const TargetFindFirstArgsSchema: z.ZodType = + z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereInputSchema.optional(), + orderBy: z + .union([ + TargetOrderByWithRelationInputSchema.array(), + TargetOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TargetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + TargetScalarFieldEnumSchema, + TargetScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const TargetFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereInputSchema.optional(), + orderBy: z + .union([ + TargetOrderByWithRelationInputSchema.array(), + TargetOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TargetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + TargetScalarFieldEnumSchema, + TargetScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const TargetFindManyArgsSchema: z.ZodType = z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereInputSchema.optional(), + orderBy: z + .union([ + TargetOrderByWithRelationInputSchema.array(), + TargetOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TargetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([TargetScalarFieldEnumSchema, TargetScalarFieldEnumSchema.array()]) + .optional(), + }) + .strict() + +export const TargetAggregateArgsSchema: z.ZodType = + z + .object({ + where: TargetWhereInputSchema.optional(), + orderBy: z + .union([ + TargetOrderByWithRelationInputSchema.array(), + TargetOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TargetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TargetGroupByArgsSchema: z.ZodType = z + .object({ + where: TargetWhereInputSchema.optional(), + orderBy: z + .union([ + TargetOrderByWithAggregationInputSchema.array(), + TargetOrderByWithAggregationInputSchema, + ]) + .optional(), + by: TargetScalarFieldEnumSchema.array(), + having: TargetScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TargetFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereUniqueInputSchema, + }) + .strict() + +export const TargetFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereUniqueInputSchema, + }) + .strict() + +export const AccountFindFirstArgsSchema: z.ZodType = + z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereInputSchema.optional(), + orderBy: z + .union([ + AccountOrderByWithRelationInputSchema.array(), + AccountOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: AccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + AccountScalarFieldEnumSchema, + AccountScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const AccountFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereInputSchema.optional(), + orderBy: z + .union([ + AccountOrderByWithRelationInputSchema.array(), + AccountOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: AccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + AccountScalarFieldEnumSchema, + AccountScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const AccountFindManyArgsSchema: z.ZodType = + z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereInputSchema.optional(), + orderBy: z + .union([ + AccountOrderByWithRelationInputSchema.array(), + AccountOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: AccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + AccountScalarFieldEnumSchema, + AccountScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const AccountAggregateArgsSchema: z.ZodType = + z + .object({ + where: AccountWhereInputSchema.optional(), + orderBy: z + .union([ + AccountOrderByWithRelationInputSchema.array(), + AccountOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: AccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const AccountGroupByArgsSchema: z.ZodType = z + .object({ + where: AccountWhereInputSchema.optional(), + orderBy: z + .union([ + AccountOrderByWithAggregationInputSchema.array(), + AccountOrderByWithAggregationInputSchema, + ]) + .optional(), + by: AccountScalarFieldEnumSchema.array(), + having: AccountScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const AccountFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereUniqueInputSchema, + }) + .strict() + +export const AccountFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereUniqueInputSchema, + }) + .strict() + +export const CommentFindFirstArgsSchema: z.ZodType = + z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereInputSchema.optional(), + orderBy: z + .union([ + CommentOrderByWithRelationInputSchema.array(), + CommentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: CommentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + CommentScalarFieldEnumSchema, + CommentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const CommentFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereInputSchema.optional(), + orderBy: z + .union([ + CommentOrderByWithRelationInputSchema.array(), + CommentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: CommentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + CommentScalarFieldEnumSchema, + CommentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const CommentFindManyArgsSchema: z.ZodType = + z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereInputSchema.optional(), + orderBy: z + .union([ + CommentOrderByWithRelationInputSchema.array(), + CommentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: CommentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + CommentScalarFieldEnumSchema, + CommentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const CommentAggregateArgsSchema: z.ZodType = + z + .object({ + where: CommentWhereInputSchema.optional(), + orderBy: z + .union([ + CommentOrderByWithRelationInputSchema.array(), + CommentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: CommentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const CommentGroupByArgsSchema: z.ZodType = z + .object({ + where: CommentWhereInputSchema.optional(), + orderBy: z + .union([ + CommentOrderByWithAggregationInputSchema.array(), + CommentOrderByWithAggregationInputSchema, + ]) + .optional(), + by: CommentScalarFieldEnumSchema.array(), + having: CommentScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const CommentFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereUniqueInputSchema, + }) + .strict() + +export const CommentFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereUniqueInputSchema, + }) + .strict() + +export const UserListFindFirstArgsSchema: z.ZodType = + z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereInputSchema.optional(), + orderBy: z + .union([ + UserListOrderByWithRelationInputSchema.array(), + UserListOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserListWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + UserListScalarFieldEnumSchema, + UserListScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const UserListFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereInputSchema.optional(), + orderBy: z + .union([ + UserListOrderByWithRelationInputSchema.array(), + UserListOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserListWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + UserListScalarFieldEnumSchema, + UserListScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const UserListFindManyArgsSchema: z.ZodType = + z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereInputSchema.optional(), + orderBy: z + .union([ + UserListOrderByWithRelationInputSchema.array(), + UserListOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserListWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + UserListScalarFieldEnumSchema, + UserListScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const UserListAggregateArgsSchema: z.ZodType = + z + .object({ + where: UserListWhereInputSchema.optional(), + orderBy: z + .union([ + UserListOrderByWithRelationInputSchema.array(), + UserListOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: UserListWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const UserListGroupByArgsSchema: z.ZodType = + z + .object({ + where: UserListWhereInputSchema.optional(), + orderBy: z + .union([ + UserListOrderByWithAggregationInputSchema.array(), + UserListOrderByWithAggregationInputSchema, + ]) + .optional(), + by: UserListScalarFieldEnumSchema.array(), + having: UserListScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const UserListFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereUniqueInputSchema, + }) + .strict() + +export const UserListFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereUniqueInputSchema, + }) + .strict() + +export const TournamentFindFirstArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereInputSchema.optional(), + orderBy: z + .union([ + TournamentOrderByWithRelationInputSchema.array(), + TournamentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TournamentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + TournamentScalarFieldEnumSchema, + TournamentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const TournamentFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereInputSchema.optional(), + orderBy: z + .union([ + TournamentOrderByWithRelationInputSchema.array(), + TournamentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TournamentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + TournamentScalarFieldEnumSchema, + TournamentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const TournamentFindManyArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereInputSchema.optional(), + orderBy: z + .union([ + TournamentOrderByWithRelationInputSchema.array(), + TournamentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TournamentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + TournamentScalarFieldEnumSchema, + TournamentScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const TournamentAggregateArgsSchema: z.ZodType = + z + .object({ + where: TournamentWhereInputSchema.optional(), + orderBy: z + .union([ + TournamentOrderByWithRelationInputSchema.array(), + TournamentOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: TournamentWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TournamentGroupByArgsSchema: z.ZodType = + z + .object({ + where: TournamentWhereInputSchema.optional(), + orderBy: z + .union([ + TournamentOrderByWithAggregationInputSchema.array(), + TournamentOrderByWithAggregationInputSchema, + ]) + .optional(), + by: TournamentScalarFieldEnumSchema.array(), + having: TournamentScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const TournamentFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereUniqueInputSchema, + }) + .strict() + +export const TournamentFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereUniqueInputSchema, + }) + .strict() + +export const NotificationFindFirstArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereInputSchema.optional(), + orderBy: z + .union([ + NotificationOrderByWithRelationInputSchema.array(), + NotificationOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: NotificationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + NotificationScalarFieldEnumSchema, + NotificationScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const NotificationFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereInputSchema.optional(), + orderBy: z + .union([ + NotificationOrderByWithRelationInputSchema.array(), + NotificationOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: NotificationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + NotificationScalarFieldEnumSchema, + NotificationScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const NotificationFindManyArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereInputSchema.optional(), + orderBy: z + .union([ + NotificationOrderByWithRelationInputSchema.array(), + NotificationOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: NotificationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + NotificationScalarFieldEnumSchema, + NotificationScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const NotificationAggregateArgsSchema: z.ZodType = + z + .object({ + where: NotificationWhereInputSchema.optional(), + orderBy: z + .union([ + NotificationOrderByWithRelationInputSchema.array(), + NotificationOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: NotificationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const NotificationGroupByArgsSchema: z.ZodType = + z + .object({ + where: NotificationWhereInputSchema.optional(), + orderBy: z + .union([ + NotificationOrderByWithAggregationInputSchema.array(), + NotificationOrderByWithAggregationInputSchema, + ]) + .optional(), + by: NotificationScalarFieldEnumSchema.array(), + having: NotificationScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const NotificationFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereUniqueInputSchema, + }) + .strict() + +export const NotificationFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereUniqueInputSchema, + }) + .strict() + +export const FeedbackFindFirstArgsSchema: z.ZodType = + z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereInputSchema.optional(), + orderBy: z + .union([ + FeedbackOrderByWithRelationInputSchema.array(), + FeedbackOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: FeedbackWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + FeedbackScalarFieldEnumSchema, + FeedbackScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const FeedbackFindFirstOrThrowArgsSchema: z.ZodType = + z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereInputSchema.optional(), + orderBy: z + .union([ + FeedbackOrderByWithRelationInputSchema.array(), + FeedbackOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: FeedbackWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + FeedbackScalarFieldEnumSchema, + FeedbackScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const FeedbackFindManyArgsSchema: z.ZodType = + z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereInputSchema.optional(), + orderBy: z + .union([ + FeedbackOrderByWithRelationInputSchema.array(), + FeedbackOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: FeedbackWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z + .union([ + FeedbackScalarFieldEnumSchema, + FeedbackScalarFieldEnumSchema.array(), + ]) + .optional(), + }) + .strict() + +export const FeedbackAggregateArgsSchema: z.ZodType = + z + .object({ + where: FeedbackWhereInputSchema.optional(), + orderBy: z + .union([ + FeedbackOrderByWithRelationInputSchema.array(), + FeedbackOrderByWithRelationInputSchema, + ]) + .optional(), + cursor: FeedbackWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const FeedbackGroupByArgsSchema: z.ZodType = + z + .object({ + where: FeedbackWhereInputSchema.optional(), + orderBy: z + .union([ + FeedbackOrderByWithAggregationInputSchema.array(), + FeedbackOrderByWithAggregationInputSchema, + ]) + .optional(), + by: FeedbackScalarFieldEnumSchema.array(), + having: FeedbackScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + }) + .strict() + +export const FeedbackFindUniqueArgsSchema: z.ZodType = + z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereUniqueInputSchema, + }) + .strict() + +export const FeedbackFindUniqueOrThrowArgsSchema: z.ZodType = + z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereUniqueInputSchema, + }) + .strict() + +export const WorkspaceCreateArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + data: z.union([ + WorkspaceCreateInputSchema, + WorkspaceUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const WorkspaceUpsertArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereUniqueInputSchema, + create: z.union([ + WorkspaceCreateInputSchema, + WorkspaceUncheckedCreateInputSchema, + ]), + update: z.union([ + WorkspaceUpdateInputSchema, + WorkspaceUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const WorkspaceCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + WorkspaceCreateManyInputSchema, + WorkspaceCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const WorkspaceCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + WorkspaceCreateManyInputSchema, + WorkspaceCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const WorkspaceDeleteArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + where: WorkspaceWhereUniqueInputSchema, + }) + .strict() + +export const WorkspaceUpdateArgsSchema: z.ZodType = + z + .object({ + select: WorkspaceSelectSchema.optional(), + data: z.union([ + WorkspaceUpdateInputSchema, + WorkspaceUncheckedUpdateInputSchema, + ]), + where: WorkspaceWhereUniqueInputSchema, + }) + .strict() + +export const WorkspaceUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + WorkspaceUpdateManyMutationInputSchema, + WorkspaceUncheckedUpdateManyInputSchema, + ]), + where: WorkspaceWhereInputSchema.optional(), + }) + .strict() + +export const WorkspaceDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: WorkspaceWhereInputSchema.optional(), + }) + .strict() + +export const ForecastCreateArgsSchema: z.ZodType = z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + data: z.union([ + ForecastCreateInputSchema, + ForecastUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const ForecastUpsertArgsSchema: z.ZodType = z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereUniqueInputSchema, + create: z.union([ + ForecastCreateInputSchema, + ForecastUncheckedCreateInputSchema, + ]), + update: z.union([ + ForecastUpdateInputSchema, + ForecastUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const ForecastCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ForecastCreateManyInputSchema, + ForecastCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ForecastCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ForecastCreateManyInputSchema, + ForecastCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ForecastDeleteArgsSchema: z.ZodType = z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + where: ForecastWhereUniqueInputSchema, + }) + .strict() + +export const ForecastUpdateArgsSchema: z.ZodType = z + .object({ + select: ForecastSelectSchema.optional(), + include: ForecastIncludeSchema.optional(), + data: z.union([ + ForecastUpdateInputSchema, + ForecastUncheckedUpdateInputSchema, + ]), + where: ForecastWhereUniqueInputSchema, + }) + .strict() + +export const ForecastUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ForecastUpdateManyMutationInputSchema, + ForecastUncheckedUpdateManyInputSchema, + ]), + where: ForecastWhereInputSchema.optional(), + }) + .strict() + +export const ForecastDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: ForecastWhereInputSchema.optional(), + }) + .strict() + +export const QuestionScoreCreateArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + data: z.union([ + QuestionScoreCreateInputSchema, + QuestionScoreUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const QuestionScoreUpsertArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereUniqueInputSchema, + create: z.union([ + QuestionScoreCreateInputSchema, + QuestionScoreUncheckedCreateInputSchema, + ]), + update: z.union([ + QuestionScoreUpdateInputSchema, + QuestionScoreUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const QuestionScoreCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionScoreCreateManyInputSchema, + QuestionScoreCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionScoreCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionScoreCreateManyInputSchema, + QuestionScoreCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionScoreDeleteArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + where: QuestionScoreWhereUniqueInputSchema, + }) + .strict() + +export const QuestionScoreUpdateArgsSchema: z.ZodType = + z + .object({ + select: QuestionScoreSelectSchema.optional(), + include: QuestionScoreIncludeSchema.optional(), + data: z.union([ + QuestionScoreUpdateInputSchema, + QuestionScoreUncheckedUpdateInputSchema, + ]), + where: QuestionScoreWhereUniqueInputSchema, + }) + .strict() + +export const QuestionScoreUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionScoreUpdateManyMutationInputSchema, + QuestionScoreUncheckedUpdateManyInputSchema, + ]), + where: QuestionScoreWhereInputSchema.optional(), + }) + .strict() + +export const QuestionScoreDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: QuestionScoreWhereInputSchema.optional(), + }) + .strict() + +export const QuestionOptionCreateArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + data: z.union([ + QuestionOptionCreateInputSchema, + QuestionOptionUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const QuestionOptionUpsertArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereUniqueInputSchema, + create: z.union([ + QuestionOptionCreateInputSchema, + QuestionOptionUncheckedCreateInputSchema, + ]), + update: z.union([ + QuestionOptionUpdateInputSchema, + QuestionOptionUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const QuestionOptionCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionOptionCreateManyInputSchema, + QuestionOptionCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionOptionCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionOptionCreateManyInputSchema, + QuestionOptionCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionOptionDeleteArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + where: QuestionOptionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionOptionUpdateArgsSchema: z.ZodType = + z + .object({ + select: QuestionOptionSelectSchema.optional(), + include: QuestionOptionIncludeSchema.optional(), + data: z.union([ + QuestionOptionUpdateInputSchema, + QuestionOptionUncheckedUpdateInputSchema, + ]), + where: QuestionOptionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionOptionUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionOptionUpdateManyMutationInputSchema, + QuestionOptionUncheckedUpdateManyInputSchema, + ]), + where: QuestionOptionWhereInputSchema.optional(), + }) + .strict() + +export const QuestionOptionDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: QuestionOptionWhereInputSchema.optional(), + }) + .strict() + +export const QuestionCreateArgsSchema: z.ZodType = z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + data: z.union([ + QuestionCreateInputSchema, + QuestionUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const QuestionUpsertArgsSchema: z.ZodType = z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereUniqueInputSchema, + create: z.union([ + QuestionCreateInputSchema, + QuestionUncheckedCreateInputSchema, + ]), + update: z.union([ + QuestionUpdateInputSchema, + QuestionUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const QuestionCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionCreateManyInputSchema, + QuestionCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionCreateManyInputSchema, + QuestionCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionDeleteArgsSchema: z.ZodType = z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + where: QuestionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionUpdateArgsSchema: z.ZodType = z + .object({ + select: QuestionSelectSchema.optional(), + include: QuestionIncludeSchema.optional(), + data: z.union([ + QuestionUpdateInputSchema, + QuestionUncheckedUpdateInputSchema, + ]), + where: QuestionWhereUniqueInputSchema, + }) + .strict() + +export const QuestionUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionUpdateManyMutationInputSchema, + QuestionUncheckedUpdateManyInputSchema, + ]), + where: QuestionWhereInputSchema.optional(), + }) + .strict() + +export const QuestionDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: QuestionWhereInputSchema.optional(), + }) + .strict() + +export const TagCreateArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + data: z.union([TagCreateInputSchema, TagUncheckedCreateInputSchema]), + }) + .strict() + +export const TagUpsertArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereUniqueInputSchema, + create: z.union([TagCreateInputSchema, TagUncheckedCreateInputSchema]), + update: z.union([TagUpdateInputSchema, TagUncheckedUpdateInputSchema]), + }) + .strict() + +export const TagCreateManyArgsSchema: z.ZodType = z + .object({ + data: z.union([TagCreateManyInputSchema, TagCreateManyInputSchema.array()]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TagCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TagCreateManyInputSchema, + TagCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TagDeleteArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + where: TagWhereUniqueInputSchema, + }) + .strict() + +export const TagUpdateArgsSchema: z.ZodType = z + .object({ + select: TagSelectSchema.optional(), + include: TagIncludeSchema.optional(), + data: z.union([TagUpdateInputSchema, TagUncheckedUpdateInputSchema]), + where: TagWhereUniqueInputSchema, + }) + .strict() + +export const TagUpdateManyArgsSchema: z.ZodType = z + .object({ + data: z.union([ + TagUpdateManyMutationInputSchema, + TagUncheckedUpdateManyInputSchema, + ]), + where: TagWhereInputSchema.optional(), + }) + .strict() + +export const TagDeleteManyArgsSchema: z.ZodType = z + .object({ + where: TagWhereInputSchema.optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + data: z.union([ + ResolutionSlackMessageCreateInputSchema, + ResolutionSlackMessageUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const ResolutionSlackMessageUpsertArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereUniqueInputSchema, + create: z.union([ + ResolutionSlackMessageCreateInputSchema, + ResolutionSlackMessageUncheckedCreateInputSchema, + ]), + update: z.union([ + ResolutionSlackMessageUpdateInputSchema, + ResolutionSlackMessageUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const ResolutionSlackMessageCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ResolutionSlackMessageCreateManyInputSchema, + ResolutionSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ResolutionSlackMessageCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ResolutionSlackMessageCreateManyInputSchema, + ResolutionSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ResolutionSlackMessageDeleteArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + where: ResolutionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const ResolutionSlackMessageUpdateArgsSchema: z.ZodType = + z + .object({ + select: ResolutionSlackMessageSelectSchema.optional(), + include: ResolutionSlackMessageIncludeSchema.optional(), + data: z.union([ + ResolutionSlackMessageUpdateInputSchema, + ResolutionSlackMessageUncheckedUpdateInputSchema, + ]), + where: ResolutionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const ResolutionSlackMessageUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ResolutionSlackMessageUpdateManyMutationInputSchema, + ResolutionSlackMessageUncheckedUpdateManyInputSchema, + ]), + where: ResolutionSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const ResolutionSlackMessageDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: ResolutionSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const PingSlackMessageCreateArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + data: z.union([ + PingSlackMessageCreateInputSchema, + PingSlackMessageUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const PingSlackMessageUpsertArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereUniqueInputSchema, + create: z.union([ + PingSlackMessageCreateInputSchema, + PingSlackMessageUncheckedCreateInputSchema, + ]), + update: z.union([ + PingSlackMessageUpdateInputSchema, + PingSlackMessageUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const PingSlackMessageCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + PingSlackMessageCreateManyInputSchema, + PingSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const PingSlackMessageCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + PingSlackMessageCreateManyInputSchema, + PingSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const PingSlackMessageDeleteArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + where: PingSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const PingSlackMessageUpdateArgsSchema: z.ZodType = + z + .object({ + select: PingSlackMessageSelectSchema.optional(), + include: PingSlackMessageIncludeSchema.optional(), + data: z.union([ + PingSlackMessageUpdateInputSchema, + PingSlackMessageUncheckedUpdateInputSchema, + ]), + where: PingSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const PingSlackMessageUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + PingSlackMessageUpdateManyMutationInputSchema, + PingSlackMessageUncheckedUpdateManyInputSchema, + ]), + where: PingSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const PingSlackMessageDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: PingSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const QuestionSlackMessageCreateArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + data: z.union([ + QuestionSlackMessageCreateInputSchema, + QuestionSlackMessageUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const QuestionSlackMessageUpsertArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereUniqueInputSchema, + create: z.union([ + QuestionSlackMessageCreateInputSchema, + QuestionSlackMessageUncheckedCreateInputSchema, + ]), + update: z.union([ + QuestionSlackMessageUpdateInputSchema, + QuestionSlackMessageUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const QuestionSlackMessageCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionSlackMessageCreateManyInputSchema, + QuestionSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionSlackMessageCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionSlackMessageCreateManyInputSchema, + QuestionSlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const QuestionSlackMessageDeleteArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + where: QuestionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const QuestionSlackMessageUpdateArgsSchema: z.ZodType = + z + .object({ + select: QuestionSlackMessageSelectSchema.optional(), + include: QuestionSlackMessageIncludeSchema.optional(), + data: z.union([ + QuestionSlackMessageUpdateInputSchema, + QuestionSlackMessageUncheckedUpdateInputSchema, + ]), + where: QuestionSlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const QuestionSlackMessageUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + QuestionSlackMessageUpdateManyMutationInputSchema, + QuestionSlackMessageUncheckedUpdateManyInputSchema, + ]), + where: QuestionSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const QuestionSlackMessageDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: QuestionSlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const SlackMessageCreateArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + data: z.union([ + SlackMessageCreateInputSchema, + SlackMessageUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const SlackMessageUpsertArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereUniqueInputSchema, + create: z.union([ + SlackMessageCreateInputSchema, + SlackMessageUncheckedCreateInputSchema, + ]), + update: z.union([ + SlackMessageUpdateInputSchema, + SlackMessageUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const SlackMessageCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + SlackMessageCreateManyInputSchema, + SlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const SlackMessageCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + SlackMessageCreateManyInputSchema, + SlackMessageCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const SlackMessageDeleteArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + where: SlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const SlackMessageUpdateArgsSchema: z.ZodType = + z + .object({ + select: SlackMessageSelectSchema.optional(), + include: SlackMessageIncludeSchema.optional(), + data: z.union([ + SlackMessageUpdateInputSchema, + SlackMessageUncheckedUpdateInputSchema, + ]), + where: SlackMessageWhereUniqueInputSchema, + }) + .strict() + +export const SlackMessageUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + SlackMessageUpdateManyMutationInputSchema, + SlackMessageUncheckedUpdateManyInputSchema, + ]), + where: SlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const SlackMessageDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: SlackMessageWhereInputSchema.optional(), + }) + .strict() + +export const UserCreateArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + data: z.union([UserCreateInputSchema, UserUncheckedCreateInputSchema]), + }) + .strict() + +export const UserUpsertArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, + create: z.union([UserCreateInputSchema, UserUncheckedCreateInputSchema]), + update: z.union([UserUpdateInputSchema, UserUncheckedUpdateInputSchema]), + }) + .strict() + +export const UserCreateManyArgsSchema: z.ZodType = z + .object({ + data: z.union([ + UserCreateManyInputSchema, + UserCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + UserCreateManyInputSchema, + UserCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserDeleteArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, + }) + .strict() + +export const UserUpdateArgsSchema: z.ZodType = z + .object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + data: z.union([UserUpdateInputSchema, UserUncheckedUpdateInputSchema]), + where: UserWhereUniqueInputSchema, + }) + .strict() + +export const UserUpdateManyArgsSchema: z.ZodType = z + .object({ + data: z.union([ + UserUpdateManyMutationInputSchema, + UserUncheckedUpdateManyInputSchema, + ]), + where: UserWhereInputSchema.optional(), + }) + .strict() + +export const UserDeleteManyArgsSchema: z.ZodType = z + .object({ + where: UserWhereInputSchema.optional(), + }) + .strict() + +export const ProfileCreateArgsSchema: z.ZodType = z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + data: z.union([ + ProfileCreateInputSchema, + ProfileUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const ProfileUpsertArgsSchema: z.ZodType = z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereUniqueInputSchema, + create: z.union([ + ProfileCreateInputSchema, + ProfileUncheckedCreateInputSchema, + ]), + update: z.union([ + ProfileUpdateInputSchema, + ProfileUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const ProfileCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ProfileCreateManyInputSchema, + ProfileCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ProfileCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ProfileCreateManyInputSchema, + ProfileCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const ProfileDeleteArgsSchema: z.ZodType = z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + where: ProfileWhereUniqueInputSchema, + }) + .strict() + +export const ProfileUpdateArgsSchema: z.ZodType = z + .object({ + select: ProfileSelectSchema.optional(), + include: ProfileIncludeSchema.optional(), + data: z.union([ + ProfileUpdateInputSchema, + ProfileUncheckedUpdateInputSchema, + ]), + where: ProfileWhereUniqueInputSchema, + }) + .strict() + +export const ProfileUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + ProfileUpdateManyMutationInputSchema, + ProfileUncheckedUpdateManyInputSchema, + ]), + where: ProfileWhereInputSchema.optional(), + }) + .strict() + +export const ProfileDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: ProfileWhereInputSchema.optional(), + }) + .strict() + +export const GroupCreateArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + data: z.union([GroupCreateInputSchema, GroupUncheckedCreateInputSchema]), + }) + .strict() + +export const GroupUpsertArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereUniqueInputSchema, + create: z.union([GroupCreateInputSchema, GroupUncheckedCreateInputSchema]), + update: z.union([GroupUpdateInputSchema, GroupUncheckedUpdateInputSchema]), + }) + .strict() + +export const GroupCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + GroupCreateManyInputSchema, + GroupCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const GroupCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + GroupCreateManyInputSchema, + GroupCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const GroupDeleteArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + where: GroupWhereUniqueInputSchema, + }) + .strict() + +export const GroupUpdateArgsSchema: z.ZodType = z + .object({ + select: GroupSelectSchema.optional(), + data: z.union([GroupUpdateInputSchema, GroupUncheckedUpdateInputSchema]), + where: GroupWhereUniqueInputSchema, + }) + .strict() + +export const GroupUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + GroupUpdateManyMutationInputSchema, + GroupUncheckedUpdateManyInputSchema, + ]), + where: GroupWhereInputSchema.optional(), + }) + .strict() + +export const GroupDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: GroupWhereInputSchema.optional(), + }) + .strict() + +export const TargetCreateArgsSchema: z.ZodType = z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + data: z.union([TargetCreateInputSchema, TargetUncheckedCreateInputSchema]), + }) + .strict() + +export const TargetUpsertArgsSchema: z.ZodType = z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereUniqueInputSchema, + create: z.union([ + TargetCreateInputSchema, + TargetUncheckedCreateInputSchema, + ]), + update: z.union([ + TargetUpdateInputSchema, + TargetUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const TargetCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TargetCreateManyInputSchema, + TargetCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TargetCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TargetCreateManyInputSchema, + TargetCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TargetDeleteArgsSchema: z.ZodType = z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + where: TargetWhereUniqueInputSchema, + }) + .strict() + +export const TargetUpdateArgsSchema: z.ZodType = z + .object({ + select: TargetSelectSchema.optional(), + include: TargetIncludeSchema.optional(), + data: z.union([TargetUpdateInputSchema, TargetUncheckedUpdateInputSchema]), + where: TargetWhereUniqueInputSchema, + }) + .strict() + +export const TargetUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TargetUpdateManyMutationInputSchema, + TargetUncheckedUpdateManyInputSchema, + ]), + where: TargetWhereInputSchema.optional(), + }) + .strict() + +export const TargetDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: TargetWhereInputSchema.optional(), + }) + .strict() + +export const AccountCreateArgsSchema: z.ZodType = z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + data: z.union([ + AccountCreateInputSchema, + AccountUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const AccountUpsertArgsSchema: z.ZodType = z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereUniqueInputSchema, + create: z.union([ + AccountCreateInputSchema, + AccountUncheckedCreateInputSchema, + ]), + update: z.union([ + AccountUpdateInputSchema, + AccountUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const AccountCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + AccountCreateManyInputSchema, + AccountCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const AccountCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + AccountCreateManyInputSchema, + AccountCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const AccountDeleteArgsSchema: z.ZodType = z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + where: AccountWhereUniqueInputSchema, + }) + .strict() + +export const AccountUpdateArgsSchema: z.ZodType = z + .object({ + select: AccountSelectSchema.optional(), + include: AccountIncludeSchema.optional(), + data: z.union([ + AccountUpdateInputSchema, + AccountUncheckedUpdateInputSchema, + ]), + where: AccountWhereUniqueInputSchema, + }) + .strict() + +export const AccountUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + AccountUpdateManyMutationInputSchema, + AccountUncheckedUpdateManyInputSchema, + ]), + where: AccountWhereInputSchema.optional(), + }) + .strict() + +export const AccountDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: AccountWhereInputSchema.optional(), + }) + .strict() + +export const CommentCreateArgsSchema: z.ZodType = z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + data: z.union([ + CommentCreateInputSchema, + CommentUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const CommentUpsertArgsSchema: z.ZodType = z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereUniqueInputSchema, + create: z.union([ + CommentCreateInputSchema, + CommentUncheckedCreateInputSchema, + ]), + update: z.union([ + CommentUpdateInputSchema, + CommentUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const CommentCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + CommentCreateManyInputSchema, + CommentCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const CommentCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + CommentCreateManyInputSchema, + CommentCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const CommentDeleteArgsSchema: z.ZodType = z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + where: CommentWhereUniqueInputSchema, + }) + .strict() + +export const CommentUpdateArgsSchema: z.ZodType = z + .object({ + select: CommentSelectSchema.optional(), + include: CommentIncludeSchema.optional(), + data: z.union([ + CommentUpdateInputSchema, + CommentUncheckedUpdateInputSchema, + ]), + where: CommentWhereUniqueInputSchema, + }) + .strict() + +export const CommentUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + CommentUpdateManyMutationInputSchema, + CommentUncheckedUpdateManyInputSchema, + ]), + where: CommentWhereInputSchema.optional(), + }) + .strict() + +export const CommentDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: CommentWhereInputSchema.optional(), + }) + .strict() + +export const UserListCreateArgsSchema: z.ZodType = z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + data: z.union([ + UserListCreateInputSchema, + UserListUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const UserListUpsertArgsSchema: z.ZodType = z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereUniqueInputSchema, + create: z.union([ + UserListCreateInputSchema, + UserListUncheckedCreateInputSchema, + ]), + update: z.union([ + UserListUpdateInputSchema, + UserListUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const UserListCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + UserListCreateManyInputSchema, + UserListCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserListCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + UserListCreateManyInputSchema, + UserListCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const UserListDeleteArgsSchema: z.ZodType = z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + where: UserListWhereUniqueInputSchema, + }) + .strict() + +export const UserListUpdateArgsSchema: z.ZodType = z + .object({ + select: UserListSelectSchema.optional(), + include: UserListIncludeSchema.optional(), + data: z.union([ + UserListUpdateInputSchema, + UserListUncheckedUpdateInputSchema, + ]), + where: UserListWhereUniqueInputSchema, + }) + .strict() + +export const UserListUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + UserListUpdateManyMutationInputSchema, + UserListUncheckedUpdateManyInputSchema, + ]), + where: UserListWhereInputSchema.optional(), + }) + .strict() + +export const UserListDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: UserListWhereInputSchema.optional(), + }) + .strict() + +export const TournamentCreateArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + data: z.union([ + TournamentCreateInputSchema, + TournamentUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const TournamentUpsertArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereUniqueInputSchema, + create: z.union([ + TournamentCreateInputSchema, + TournamentUncheckedCreateInputSchema, + ]), + update: z.union([ + TournamentUpdateInputSchema, + TournamentUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const TournamentCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TournamentCreateManyInputSchema, + TournamentCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TournamentCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TournamentCreateManyInputSchema, + TournamentCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const TournamentDeleteArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + where: TournamentWhereUniqueInputSchema, + }) + .strict() + +export const TournamentUpdateArgsSchema: z.ZodType = + z + .object({ + select: TournamentSelectSchema.optional(), + include: TournamentIncludeSchema.optional(), + data: z.union([ + TournamentUpdateInputSchema, + TournamentUncheckedUpdateInputSchema, + ]), + where: TournamentWhereUniqueInputSchema, + }) + .strict() + +export const TournamentUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + TournamentUpdateManyMutationInputSchema, + TournamentUncheckedUpdateManyInputSchema, + ]), + where: TournamentWhereInputSchema.optional(), + }) + .strict() + +export const TournamentDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: TournamentWhereInputSchema.optional(), + }) + .strict() + +export const NotificationCreateArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + data: z.union([ + NotificationCreateInputSchema, + NotificationUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const NotificationUpsertArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereUniqueInputSchema, + create: z.union([ + NotificationCreateInputSchema, + NotificationUncheckedCreateInputSchema, + ]), + update: z.union([ + NotificationUpdateInputSchema, + NotificationUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const NotificationCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + NotificationCreateManyInputSchema, + NotificationCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const NotificationCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + NotificationCreateManyInputSchema, + NotificationCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const NotificationDeleteArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + where: NotificationWhereUniqueInputSchema, + }) + .strict() + +export const NotificationUpdateArgsSchema: z.ZodType = + z + .object({ + select: NotificationSelectSchema.optional(), + include: NotificationIncludeSchema.optional(), + data: z.union([ + NotificationUpdateInputSchema, + NotificationUncheckedUpdateInputSchema, + ]), + where: NotificationWhereUniqueInputSchema, + }) + .strict() + +export const NotificationUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + NotificationUpdateManyMutationInputSchema, + NotificationUncheckedUpdateManyInputSchema, + ]), + where: NotificationWhereInputSchema.optional(), + }) + .strict() + +export const NotificationDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: NotificationWhereInputSchema.optional(), + }) + .strict() + +export const FeedbackCreateArgsSchema: z.ZodType = z + .object({ + select: FeedbackSelectSchema.optional(), + data: z.union([ + FeedbackCreateInputSchema, + FeedbackUncheckedCreateInputSchema, + ]), + }) + .strict() + +export const FeedbackUpsertArgsSchema: z.ZodType = z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereUniqueInputSchema, + create: z.union([ + FeedbackCreateInputSchema, + FeedbackUncheckedCreateInputSchema, + ]), + update: z.union([ + FeedbackUpdateInputSchema, + FeedbackUncheckedUpdateInputSchema, + ]), + }) + .strict() + +export const FeedbackCreateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + FeedbackCreateManyInputSchema, + FeedbackCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const FeedbackCreateManyAndReturnArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + FeedbackCreateManyInputSchema, + FeedbackCreateManyInputSchema.array(), + ]), + skipDuplicates: z.boolean().optional(), + }) + .strict() + +export const FeedbackDeleteArgsSchema: z.ZodType = z + .object({ + select: FeedbackSelectSchema.optional(), + where: FeedbackWhereUniqueInputSchema, + }) + .strict() + +export const FeedbackUpdateArgsSchema: z.ZodType = z + .object({ + select: FeedbackSelectSchema.optional(), + data: z.union([ + FeedbackUpdateInputSchema, + FeedbackUncheckedUpdateInputSchema, + ]), + where: FeedbackWhereUniqueInputSchema, + }) + .strict() + +export const FeedbackUpdateManyArgsSchema: z.ZodType = + z + .object({ + data: z.union([ + FeedbackUpdateManyMutationInputSchema, + FeedbackUncheckedUpdateManyInputSchema, + ]), + where: FeedbackWhereInputSchema.optional(), + }) + .strict() + +export const FeedbackDeleteManyArgsSchema: z.ZodType = + z + .object({ + where: FeedbackWhereInputSchema.optional(), + }) + .strict() diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 4a9b418..0dec012 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -3,6 +3,10 @@ generator client { previewFeatures = ["fullTextSearch"] } +generator zod { + provider = "zod-prisma-types" +} + datasource db { provider = "postgresql" url = env("DATABASE_URL") diff --git a/tsconfig.json b/tsconfig.json index df994a5..59a88a1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, - "module": "esnext", + "module": "ESNext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, @@ -26,7 +26,8 @@ { "name": "next" } - ] + ], + "allowSyntheticDefaultImports": true }, "include": [ "next-env.d.ts",