diff --git a/.gitignore b/.gitignore index 21f61a8..3ee5034 100644 --- a/.gitignore +++ b/.gitignore @@ -37,8 +37,5 @@ yarn-error.log* next-env.d.ts # Prisma -# Note: We keep generated Prisma client for deployment in Iran servers -# /node_modules/.prisma -# /node_modules/@prisma/client -# Keep prisma/generated for deployment -!/prisma/generated +# Keep lib/generated/prisma committed so Docker builds do not need to +# download Prisma binaries during deployment. diff --git a/Dockerfile b/Dockerfile index c2395e1..fa7c5fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ FROM node:20-alpine AS deps WORKDIR /app -# استفاده از Runflare mirror برای NPM RUN npm config set registry https://mirror-npm.runflare.com/ \ && npm config set replace-registry-host always -# غیرفعال کردن Prisma postinstall ENV PRISMA_SKIP_POSTINSTALL_GENERATE=1 COPY package.json package-lock.json ./ @@ -16,31 +14,18 @@ WORKDIR /app ARG DATABASE_URL ARG NEXTAUTH_URL -ARG NEXTAUTH_SECRET -ARG IPPANEL_TOKEN ENV DATABASE_URL=$DATABASE_URL ENV NEXTAUTH_URL=$NEXTAUTH_URL -ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET -ENV IPPANEL_TOKEN=$IPPANEL_TOKEN ENV NEXT_TELEMETRY_DISABLED=1 ENV PRISMA_SKIP_POSTINSTALL_GENERATE=1 COPY --from=deps /app/node_modules ./node_modules COPY . . -# استفاده از pre-generated Prisma client اگر وجود داشته باشد -RUN if [ -d "prisma/generated/.prisma-client" ]; then \ - echo "Using pre-generated Prisma client..."; \ - mkdir -p node_modules/.prisma; \ - cp -r prisma/generated/.prisma-client node_modules/.prisma/client; \ - cp -r prisma/generated/@prisma-client node_modules/@prisma/client; \ - else \ - echo "Warning: Pre-generated Prisma client not found"; \ - fi +RUN test -f lib/generated/prisma/index.js -# ساخت بدون Prisma generate ENV NODE_ENV=production -RUN npm run build 2>&1 || echo "Build completed with warnings" +RUN npm run build:docker FROM node:20-alpine AS runner WORKDIR /app @@ -57,6 +42,7 @@ COPY --from=builder --chown=nextjs:nextjs /app/node_modules ./node_modules COPY --from=builder --chown=nextjs:nextjs /app/.next ./.next COPY --from=builder --chown=nextjs:nextjs /app/public ./public COPY --from=builder --chown=nextjs:nextjs /app/prisma ./prisma +COPY --from=builder --chown=nextjs:nextjs /app/lib/generated ./lib/generated COPY --from=builder --chown=nextjs:nextjs /app/next.config.* ./ USER nextjs diff --git a/lib/auth.ts b/lib/auth.ts index 83d7499..485ec6b 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -5,7 +5,7 @@ import { db } from "@/lib/db"; import bcrypt from "bcryptjs"; export const authOptions: NextAuthOptions = { - adapter: PrismaAdapter(db) as any, + adapter: (PrismaAdapter as any)(db), session: { strategy: "jwt" }, pages: { signIn: "/login", diff --git a/lib/generated/prisma/client.d.ts b/lib/generated/prisma/client.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/lib/generated/prisma/client.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/lib/generated/prisma/client.js b/lib/generated/prisma/client.js new file mode 100644 index 0000000..6ac8a81 --- /dev/null +++ b/lib/generated/prisma/client.js @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +module.exports = { ...require('.') } \ No newline at end of file diff --git a/lib/generated/prisma/default.d.ts b/lib/generated/prisma/default.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/lib/generated/prisma/default.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/lib/generated/prisma/default.js b/lib/generated/prisma/default.js new file mode 100644 index 0000000..eb55675 --- /dev/null +++ b/lib/generated/prisma/default.js @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +module.exports = { ...require('#main-entry-point') } \ No newline at end of file diff --git a/lib/generated/prisma/edge.d.ts b/lib/generated/prisma/edge.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/lib/generated/prisma/edge.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/lib/generated/prisma/edge.js b/lib/generated/prisma/edge.js new file mode 100644 index 0000000..4428da7 --- /dev/null +++ b/lib/generated/prisma/edge.js @@ -0,0 +1,531 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ +Prisma.prismaVersion = { + client: "6.19.3", + engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CountryScalarFieldEnum = { + id: 'id', + name: 'name', + code: 'code', + flagUrl: 'flagUrl', + flagImage: 'flagImage', + confederation: 'confederation', + qualificationMethod: 'qualificationMethod', + qualificationDate: 'qualificationDate', + participationHistory: 'participationHistory', + bestResult: 'bestResult', + description: 'description', + defaultFormation: 'defaultFormation', + defaultLineupPlayerIds: 'defaultLineupPlayerIds', + defaultCaptainId: 'defaultCaptainId', + groupId: 'groupId', + isEliminated: 'isEliminated' +}; + +exports.Prisma.GroupScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.PlayerScalarFieldEnum = { + id: 'id', + name: 'name', + image: 'image', + position: 'position', + countryId: 'countryId', + price: 'price', + totalPoints: 'totalPoints', + isActive: 'isActive', + isGoldenCardEligible: 'isGoldenCardEligible', + cardTier: 'cardTier', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.MatchScalarFieldEnum = { + id: 'id', + homeTeamId: 'homeTeamId', + awayTeamId: 'awayTeamId', + homeScore: 'homeScore', + awayScore: 'awayScore', + stage: 'stage', + status: 'status', + matchDate: 'matchDate', + matchDatePersian: 'matchDatePersian', + stadium: 'stadium', + city: 'city', + referee: 'referee', + assistant1: 'assistant1', + assistant2: 'assistant2', + fourthOfficial: 'fourthOfficial', + attendance: 'attendance', + weather: 'weather', + description: 'description', + roundId: 'roundId', + createdAt: 'createdAt' +}; + +exports.Prisma.RoundScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.GameweekScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchEventScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + playerId: 'playerId', + type: 'type', + minute: 'minute', + extraInfo: 'extraInfo', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchLineupScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + countryId: 'countryId', + formation: 'formation', + playerIds: 'playerIds' +}; + +exports.Prisma.PlayerMatchStatScalarFieldEnum = { + id: 'id', + playerId: 'playerId', + matchId: 'matchId', + goals: 'goals', + assists: 'assists', + yellowCards: 'yellowCards', + redCards: 'redCards', + minutesPlayed: 'minutesPlayed', + cleanSheet: 'cleanSheet', + penaltySaved: 'penaltySaved', + penaltyMissed: 'penaltyMissed', + ownGoals: 'ownGoals', + isMotm: 'isMotm', + extraTimeBonus: 'extraTimeBonus', + points: 'points' +}; + +exports.Prisma.ScoringRuleScalarFieldEnum = { + id: 'id', + position: 'position', + eventType: 'eventType', + points: 'points', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + password: 'password', + role: 'role', + createdAt: 'createdAt' +}; + +exports.Prisma.LoginOtpScalarFieldEnum = { + id: 'id', + phone: 'phone', + codeHash: 'codeHash', + attempts: 'attempts', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.FantasyNewsScalarFieldEnum = { + id: 'id', + icon: 'icon', + title: 'title', + description: 'description', + newsTime: 'newsTime', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.DailyQuizScalarFieldEnum = { + id: 'id', + date: 'date', + windowStart: 'windowStart', + windowEnd: 'windowEnd', + goldWinnersCount: 'goldWinnersCount', + silverWinnersCount: 'silverWinnersCount', + bronzeWinnersCount: 'bronzeWinnersCount', + goldMinCorrect: 'goldMinCorrect', + silverMinCorrect: 'silverMinCorrect', + bronzeMinCorrect: 'bronzeMinCorrect', + isProcessed: 'isProcessed', + createdAt: 'createdAt' +}; + +exports.Prisma.QuizQuestionScalarFieldEnum = { + id: 'id', + quizId: 'quizId', + questionText: 'questionText', + options: 'options', + correctAnswer: 'correctAnswer', + order: 'order' +}; + +exports.Prisma.QuizSubmissionScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + answers: 'answers', + correctAnswers: 'correctAnswers', + score: 'score', + submittedAt: 'submittedAt' +}; + +exports.Prisma.GoldenCardScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + playerId: 'playerId', + cardTier: 'cardTier', + status: 'status', + state: 'state', + acquiredDate: 'acquiredDate', + openedAt: 'openedAt' +}; + +exports.Prisma.SessionScalarFieldEnum = { + id: 'id', + sessionToken: 'sessionToken', + userId: 'userId', + expires: 'expires' +}; + +exports.Prisma.TeamScalarFieldEnum = { + id: 'id', + name: 'name', + userId: 'userId', + budget: 'budget', + totalPoints: 'totalPoints', + formation: 'formation', + status: 'status', + createdAt: 'createdAt' +}; + +exports.Prisma.TeamPlayerScalarFieldEnum = { + teamId: 'teamId', + playerId: 'playerId', + goldenCardId: 'goldenCardId', + isCaptain: 'isCaptain', + isViceCaptain: 'isViceCaptain', + isBench: 'isBench', + positionIndex: 'positionIndex' +}; + +exports.Prisma.PackageScalarFieldEnum = { + id: 'id', + name: 'name', + budgetBonus: 'budgetBonus', + price: 'price', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.PaymentScalarFieldEnum = { + id: 'id', + userId: 'userId', + packageId: 'packageId', + amount: 'amount', + authority: 'authority', + refId: 'refId', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; +exports.Role = exports.$Enums.Role = { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +exports.Position = exports.$Enums.Position = { + GK: 'GK', + DEF: 'DEF', + MID: 'MID', + FWD: 'FWD' +}; + +exports.MatchStage = exports.$Enums.MatchStage = { + GROUP: 'GROUP', + ROUND_OF_16: 'ROUND_OF_16', + QUARTER_FINAL: 'QUARTER_FINAL', + SEMI_FINAL: 'SEMI_FINAL', + THIRD_PLACE: 'THIRD_PLACE', + FINAL: 'FINAL' +}; + +exports.MatchStatus = exports.$Enums.MatchStatus = { + SCHEDULED: 'SCHEDULED', + LIVE: 'LIVE', + FINISHED: 'FINISHED' +}; + +exports.TeamStatus = exports.$Enums.TeamStatus = { + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.PaymentStatus = exports.$Enums.PaymentStatus = { + PENDING: 'PENDING', + SUCCESS: 'SUCCESS', + FAILED: 'FAILED' +}; + +exports.CardTier = exports.$Enums.CardTier = { + BRONZE: 'BRONZE', + SILVER: 'SILVER', + GOLD: 'GOLD' +}; + +exports.EventType = exports.$Enums.EventType = { + GOAL: 'GOAL', + ASSIST: 'ASSIST', + YELLOW_CARD: 'YELLOW_CARD', + RED_CARD: 'RED_CARD', + SECOND_YELLOW: 'SECOND_YELLOW', + SUBSTITUTION_IN: 'SUBSTITUTION_IN', + SUBSTITUTION_OUT: 'SUBSTITUTION_OUT', + INJURY_NO_SUB: 'INJURY_NO_SUB', + CLEAN_SHEET: 'CLEAN_SHEET', + PENALTY_SAVED: 'PENALTY_SAVED', + PENALTY_MISSED: 'PENALTY_MISSED', + OWN_GOAL: 'OWN_GOAL', + EXTRA_TIME_BONUS: 'EXTRA_TIME_BONUS', + MOTM: 'MOTM' +}; + +exports.GoldenCardStatus = exports.$Enums.GoldenCardStatus = { + SEALED: 'SEALED', + OPENED: 'OPENED' +}; + +exports.SpecialCardState = exports.$Enums.SpecialCardState = { + IN_INVENTORY: 'IN_INVENTORY', + IN_TEAM: 'IN_TEAM', + SOLD: 'SOLD' +}; + +exports.Prisma.ModelName = { + Country: 'Country', + Group: 'Group', + Player: 'Player', + Match: 'Match', + Round: 'Round', + Gameweek: 'Gameweek', + MatchEvent: 'MatchEvent', + MatchLineup: 'MatchLineup', + PlayerMatchStat: 'PlayerMatchStat', + ScoringRule: 'ScoringRule', + User: 'User', + LoginOtp: 'LoginOtp', + FantasyNews: 'FantasyNews', + DailyQuiz: 'DailyQuiz', + QuizQuestion: 'QuizQuestion', + QuizSubmission: 'QuizSubmission', + GoldenCard: 'GoldenCard', + Session: 'Session', + Team: 'Team', + TeamPlayer: 'TeamPlayer', + Package: 'Package', + Payment: 'Payment' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "C:\\Users\\s.roosta\\Desktop\\football-next\\lib\\generated\\prisma", + "fromEnvVar": null + }, + "config": { + "engineType": "client" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + } + ], + "previewFeatures": [], + "sourceFilePath": "C:\\Users\\s.roosta\\Desktop\\football-next\\prisma\\schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": "../../../.env", + "schemaEnvPath": "../../../.env" + }, + "relativePath": "../../../prisma", + "clientVersion": "6.19.3", + "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n engineType = \"client\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum Role {\n USER\n ADMIN\n}\n\nenum Position {\n GK\n DEF\n MID\n FWD\n}\n\nenum MatchStage {\n GROUP\n ROUND_OF_16\n QUARTER_FINAL\n SEMI_FINAL\n THIRD_PLACE\n FINAL\n}\n\nenum MatchStatus {\n SCHEDULED\n LIVE\n FINISHED\n}\n\nenum TeamStatus {\n PENDING\n APPROVED\n REJECTED\n ACTIVE\n INACTIVE\n}\n\nenum PaymentStatus {\n PENDING\n SUCCESS\n FAILED\n}\n\nenum CardTier {\n BRONZE\n SILVER\n GOLD\n}\n\nenum EventType {\n GOAL\n ASSIST\n YELLOW_CARD\n RED_CARD\n SECOND_YELLOW\n SUBSTITUTION_IN\n SUBSTITUTION_OUT\n INJURY_NO_SUB\n CLEAN_SHEET\n PENALTY_SAVED\n PENALTY_MISSED\n OWN_GOAL\n EXTRA_TIME_BONUS\n MOTM\n}\n\nmodel Country {\n id String @id @default(cuid())\n name String @unique\n code String @unique\n flagUrl String?\n flagImage String? // نام فایل پرچم مثل Flag_of_Australia.webp\n confederation String? // کنفدراسیون (UEFA, AFC, CAF, ...)\n qualificationMethod String? // شیوه راه‌یابی\n qualificationDate String? // تاریخ راه‌یابی\n participationHistory String? // سابقه شرکت\n bestResult String? // بهترین نتیجه\n description String? @db.Text // توضیحات کامل\n defaultFormation String @default(\"4-3-3\")\n defaultLineupPlayerIds String[] @default([])\n defaultCaptainId String? // شناسه کاپیتان پیش‌فرض\n group Group? @relation(fields: [groupId], references: [id])\n groupId String?\n isEliminated Boolean @default(false)\n players Player[]\n homeMatches Match[] @relation(\"HomeTeam\")\n awayMatches Match[] @relation(\"AwayTeam\")\n}\n\nmodel Group {\n id String @id @default(cuid())\n name String @unique\n countries Country[]\n}\n\nmodel Player {\n id String @id @default(cuid())\n name String\n image String? // نام فایل تصویر در public/uploads/players/\n position Position\n countryId String\n country Country @relation(fields: [countryId], references: [id])\n price Float @default(5.0)\n totalPoints Int @default(0)\n isActive Boolean @default(true)\n isGoldenCardEligible Boolean @default(false)\n cardTier CardTier @default(BRONZE)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n matchStats PlayerMatchStat[]\n teamPlayers TeamPlayer[]\n events MatchEvent[]\n goldenCards GoldenCard[]\n}\n\nmodel Match {\n id String @id @default(cuid())\n homeTeamId String\n awayTeamId String\n homeTeam Country @relation(\"HomeTeam\", fields: [homeTeamId], references: [id])\n awayTeam Country @relation(\"AwayTeam\", fields: [awayTeamId], references: [id])\n homeScore Int?\n awayScore Int?\n stage MatchStage @default(GROUP)\n status MatchStatus @default(SCHEDULED)\n matchDate DateTime\n matchDatePersian String? // تاریخ شمسی\n stadium String? // نام ورزشگاه\n city String? // شهر\n referee String? // داور اصلی\n assistant1 String? // کمک داور 1\n assistant2 String? // کمک داور 2\n fourthOfficial String? // داور چهارم\n attendance Int? // تعداد تماشاگر\n weather String? // وضعیت آب و هوا\n description String? @db.Text // توضیحات بازی\n roundId String?\n round Round? @relation(fields: [roundId], references: [id])\n playerStats PlayerMatchStat[]\n events MatchEvent[]\n lineups MatchLineup[]\n createdAt DateTime @default(now())\n}\n\nmodel Round {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n matches Match[]\n createdAt DateTime @default(now())\n}\n\nmodel Gameweek {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n createdAt DateTime @default(now())\n}\n\nmodel MatchEvent {\n id String @id @default(cuid())\n matchId String\n playerId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n type EventType\n minute Int?\n extraInfo String?\n createdAt DateTime @default(now())\n}\n\nmodel MatchLineup {\n id String @id @default(cuid())\n matchId String\n countryId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n formation String\n playerIds String[]\n}\n\nmodel PlayerMatchStat {\n id String @id @default(cuid())\n playerId String\n matchId String\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n goals Int @default(0)\n assists Int @default(0)\n yellowCards Int @default(0)\n redCards Int @default(0)\n minutesPlayed Int @default(0)\n cleanSheet Boolean @default(false)\n penaltySaved Int @default(0)\n penaltyMissed Int @default(0)\n ownGoals Int @default(0)\n isMotm Boolean @default(false)\n extraTimeBonus Int @default(0)\n points Int @default(0)\n\n @@unique([playerId, matchId])\n}\n\nmodel ScoringRule {\n id String @id @default(cuid())\n position Position\n eventType EventType\n points Int\n updatedAt DateTime @updatedAt\n updatedBy String?\n\n @@unique([position, eventType])\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n phone String? @unique\n password String\n role Role @default(USER)\n createdAt DateTime @default(now())\n team Team?\n sessions Session[]\n payments Payment[]\n quizSubmissions QuizSubmission[]\n goldenCards GoldenCard[]\n}\n\nmodel LoginOtp {\n id String @id @default(cuid())\n phone String\n codeHash String\n attempts Int @default(0)\n expiresAt DateTime\n consumedAt DateTime?\n createdAt DateTime @default(now())\n\n @@index([phone, createdAt])\n}\n\nmodel FantasyNews {\n id String @id @default(cuid())\n icon String\n title String\n description String @db.Text\n newsTime DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([newsTime])\n}\n\nenum GoldenCardStatus {\n SEALED\n OPENED\n}\n\nenum SpecialCardState {\n IN_INVENTORY\n IN_TEAM\n SOLD\n}\n\nmodel DailyQuiz {\n id String @id @default(cuid())\n date DateTime @db.Date\n windowStart DateTime\n windowEnd DateTime\n goldWinnersCount Int @default(1)\n silverWinnersCount Int @default(0)\n bronzeWinnersCount Int @default(0)\n goldMinCorrect Int?\n silverMinCorrect Int?\n bronzeMinCorrect Int?\n isProcessed Boolean @default(false)\n createdAt DateTime @default(now())\n questions QuizQuestion[]\n submissions QuizSubmission[]\n awardedCards GoldenCard[]\n\n @@unique([date])\n}\n\nmodel QuizQuestion {\n id String @id @default(cuid())\n quizId String\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n questionText String\n options String[]\n correctAnswer Int // index of correct option (0-based)\n order Int @default(0)\n}\n\nmodel QuizSubmission {\n id String @id @default(cuid())\n userId String\n quizId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n answers Int[] // user's selected option indexes\n correctAnswers Int @default(0)\n score Int @default(0) // percentage 0-100\n submittedAt DateTime @default(now())\n\n @@unique([userId, quizId])\n}\n\nmodel GoldenCard {\n id String @id @default(cuid())\n userId String\n quizId String?\n playerId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz? @relation(fields: [quizId], references: [id], onDelete: SetNull)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n cardTier CardTier @default(GOLD)\n status GoldenCardStatus @default(SEALED)\n state SpecialCardState @default(IN_INVENTORY)\n acquiredDate DateTime @default(now())\n openedAt DateTime?\n teamPlayer TeamPlayer?\n}\n\nmodel Session {\n id String @id @default(cuid())\n sessionToken String @unique\n userId String\n expires DateTime\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel Team {\n id String @id @default(cuid())\n name String\n userId String @unique\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n budget Float @default(100.0)\n totalPoints Int @default(0)\n formation String @default(\"4-3-3\")\n status TeamStatus @default(INACTIVE)\n createdAt DateTime @default(now())\n players TeamPlayer[]\n}\n\nmodel TeamPlayer {\n teamId String\n playerId String\n goldenCardId String? @unique\n isCaptain Boolean @default(false)\n isViceCaptain Boolean @default(false)\n isBench Boolean @default(false)\n positionIndex Int @default(0)\n team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n goldenCard GoldenCard? @relation(fields: [goldenCardId], references: [id], onDelete: SetNull)\n\n @@id([teamId, playerId])\n}\n\nmodel Package {\n id String @id @default(cuid())\n name String\n budgetBonus Float\n price Int\n description String?\n isActive Boolean @default(true)\n payments Payment[]\n}\n\nmodel Payment {\n id String @id @default(cuid())\n userId String\n packageId String\n user User @relation(fields: [userId], references: [id])\n package Package @relation(fields: [packageId], references: [id])\n amount Int\n authority String? @unique\n refId String?\n status PaymentStatus @default(PENDING)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", + "inlineSchemaHash": "97ad530f39fbd0a5b25054636137b2d4c6123d03a537c2ff3b9a51a4155369d0", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Country\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flagUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"flagImage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confederation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"qualificationMethod\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"qualificationDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"participationHistory\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bestResult\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultFormation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"4-3-3\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultLineupPlayerIds\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultCaptainId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"group\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Group\",\"nativeType\":null,\"relationName\":\"CountryToGroup\",\"relationFromFields\":[\"groupId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"groupId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isEliminated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Player\",\"nativeType\":null,\"relationName\":\"CountryToPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"homeMatches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"HomeTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"awayMatches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"AwayTeam\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Group\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"countries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Country\",\"nativeType\":null,\"relationName\":\"CountryToGroup\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Player\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"position\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Position\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"countryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"country\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Country\",\"nativeType\":null,\"relationName\":\"CountryToPlayer\",\"relationFromFields\":[\"countryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"price\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":5,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isGoldenCardEligible\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cardTier\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CardTier\",\"nativeType\":null,\"default\":\"BRONZE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"matchStats\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerMatchStat\",\"nativeType\":null,\"relationName\":\"PlayerToPlayerMatchStat\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamPlayers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamPlayer\",\"nativeType\":null,\"relationName\":\"PlayerToTeamPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchEvent\",\"nativeType\":null,\"relationName\":\"MatchEventToPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldenCards\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GoldenCard\",\"nativeType\":null,\"relationName\":\"GoldenCardToPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"homeTeamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"awayTeamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"homeTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Country\",\"nativeType\":null,\"relationName\":\"HomeTeam\",\"relationFromFields\":[\"homeTeamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"awayTeam\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Country\",\"nativeType\":null,\"relationName\":\"AwayTeam\",\"relationFromFields\":[\"awayTeamId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"homeScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"awayScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stage\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MatchStage\",\"nativeType\":null,\"default\":\"GROUP\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MatchStatus\",\"nativeType\":null,\"default\":\"SCHEDULED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchDatePersian\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stadium\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referee\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assistant1\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assistant2\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fourthOfficial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attendance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weather\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roundId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"round\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Round\",\"nativeType\":null,\"relationName\":\"MatchToRound\",\"relationFromFields\":[\"roundId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerStats\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PlayerMatchStat\",\"nativeType\":null,\"relationName\":\"MatchToPlayerMatchStat\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"events\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchEvent\",\"nativeType\":null,\"relationName\":\"MatchToMatchEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lineups\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchLineup\",\"nativeType\":null,\"relationName\":\"MatchToMatchLineup\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Round\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deadline\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToRound\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Gameweek\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"number\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deadline\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchEvent\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchEvent\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"player\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Player\",\"nativeType\":null,\"relationName\":\"MatchEventToPlayer\",\"relationFromFields\":[\"playerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"EventType\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minute\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"extraInfo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchLineup\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"countryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToMatchLineup\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"formation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerIds\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PlayerMatchStat\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"player\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Player\",\"nativeType\":null,\"relationName\":\"PlayerToPlayerMatchStat\",\"relationFromFields\":[\"playerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"nativeType\":null,\"relationName\":\"MatchToPlayerMatchStat\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goals\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assists\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"yellowCards\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"redCards\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minutesPlayed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cleanSheet\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"penaltySaved\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"penaltyMissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ownGoals\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMotm\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"extraTimeBonus\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"points\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"playerId\",\"matchId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"playerId\",\"matchId\"]}],\"isGenerated\":false},\"ScoringRule\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"position\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Position\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eventType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"EventType\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"points\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"position\",\"eventType\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"position\",\"eventType\"]}],\"isGenerated\":false},\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Role\",\"nativeType\":null,\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Session\",\"nativeType\":null,\"relationName\":\"SessionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Payment\",\"nativeType\":null,\"relationName\":\"PaymentToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quizSubmissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"QuizSubmission\",\"nativeType\":null,\"relationName\":\"QuizSubmissionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldenCards\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GoldenCard\",\"nativeType\":null,\"relationName\":\"GoldenCardToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LoginOtp\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"codeHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"FantasyNews\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"newsTime\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DailyQuiz\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":[\"Date\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"windowStart\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"windowEnd\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldWinnersCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"silverWinnersCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bronzeWinnersCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldMinCorrect\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"silverMinCorrect\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bronzeMinCorrect\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isProcessed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"questions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"QuizQuestion\",\"nativeType\":null,\"relationName\":\"DailyQuizToQuizQuestion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"QuizSubmission\",\"nativeType\":null,\"relationName\":\"DailyQuizToQuizSubmission\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"awardedCards\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GoldenCard\",\"nativeType\":null,\"relationName\":\"DailyQuizToGoldenCard\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"date\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"date\"]}],\"isGenerated\":false},\"QuizQuestion\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quizId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quiz\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DailyQuiz\",\"nativeType\":null,\"relationName\":\"DailyQuizToQuizQuestion\",\"relationFromFields\":[\"quizId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"questionText\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctAnswer\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"QuizSubmission\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quizId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"QuizSubmissionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quiz\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DailyQuiz\",\"nativeType\":null,\"relationName\":\"DailyQuizToQuizSubmission\",\"relationFromFields\":[\"quizId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"answers\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctAnswers\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"score\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"submittedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"quizId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"quizId\"]}],\"isGenerated\":false},\"GoldenCard\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quizId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"GoldenCardToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quiz\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DailyQuiz\",\"nativeType\":null,\"relationName\":\"DailyQuizToGoldenCard\",\"relationFromFields\":[\"quizId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"player\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Player\",\"nativeType\":null,\"relationName\":\"GoldenCardToPlayer\",\"relationFromFields\":[\"playerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cardTier\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CardTier\",\"nativeType\":null,\"default\":\"GOLD\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"GoldenCardStatus\",\"nativeType\":null,\"default\":\"SEALED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"state\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"SpecialCardState\",\"nativeType\":null,\"default\":\"IN_INVENTORY\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"acquiredDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"openedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamPlayer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamPlayer\",\"nativeType\":null,\"relationName\":\"GoldenCardToTeamPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"SessionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Team\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"TeamToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"budget\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Float\",\"nativeType\":null,\"default\":100,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"formation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"4-3-3\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"TeamStatus\",\"nativeType\":null,\"default\":\"INACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"TeamPlayer\",\"nativeType\":null,\"relationName\":\"TeamToTeamPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TeamPlayer\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"teamId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"playerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldenCardId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isCaptain\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isViceCaptain\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isBench\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"positionIndex\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"team\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Team\",\"nativeType\":null,\"relationName\":\"TeamToTeamPlayer\",\"relationFromFields\":[\"teamId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"player\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Player\",\"nativeType\":null,\"relationName\":\"PlayerToTeamPlayer\",\"relationFromFields\":[\"playerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldenCard\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GoldenCard\",\"nativeType\":null,\"relationName\":\"GoldenCardToTeamPlayer\",\"relationFromFields\":[\"goldenCardId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"teamId\",\"playerId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Package\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"budgetBonus\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"price\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Payment\",\"nativeType\":null,\"relationName\":\"PackageToPayment\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Payment\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"packageId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"PaymentToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"package\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Package\",\"nativeType\":null,\"relationName\":\"PackageToPayment\",\"relationFromFields\":[\"packageId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"authority\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PaymentStatus\",\"nativeType\":null,\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"Role\":{\"values\":[{\"name\":\"USER\",\"dbName\":null},{\"name\":\"ADMIN\",\"dbName\":null}],\"dbName\":null},\"Position\":{\"values\":[{\"name\":\"GK\",\"dbName\":null},{\"name\":\"DEF\",\"dbName\":null},{\"name\":\"MID\",\"dbName\":null},{\"name\":\"FWD\",\"dbName\":null}],\"dbName\":null},\"MatchStage\":{\"values\":[{\"name\":\"GROUP\",\"dbName\":null},{\"name\":\"ROUND_OF_16\",\"dbName\":null},{\"name\":\"QUARTER_FINAL\",\"dbName\":null},{\"name\":\"SEMI_FINAL\",\"dbName\":null},{\"name\":\"THIRD_PLACE\",\"dbName\":null},{\"name\":\"FINAL\",\"dbName\":null}],\"dbName\":null},\"MatchStatus\":{\"values\":[{\"name\":\"SCHEDULED\",\"dbName\":null},{\"name\":\"LIVE\",\"dbName\":null},{\"name\":\"FINISHED\",\"dbName\":null}],\"dbName\":null},\"TeamStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null},{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"INACTIVE\",\"dbName\":null}],\"dbName\":null},\"PaymentStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"SUCCESS\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null}],\"dbName\":null},\"CardTier\":{\"values\":[{\"name\":\"BRONZE\",\"dbName\":null},{\"name\":\"SILVER\",\"dbName\":null},{\"name\":\"GOLD\",\"dbName\":null}],\"dbName\":null},\"EventType\":{\"values\":[{\"name\":\"GOAL\",\"dbName\":null},{\"name\":\"ASSIST\",\"dbName\":null},{\"name\":\"YELLOW_CARD\",\"dbName\":null},{\"name\":\"RED_CARD\",\"dbName\":null},{\"name\":\"SECOND_YELLOW\",\"dbName\":null},{\"name\":\"SUBSTITUTION_IN\",\"dbName\":null},{\"name\":\"SUBSTITUTION_OUT\",\"dbName\":null},{\"name\":\"INJURY_NO_SUB\",\"dbName\":null},{\"name\":\"CLEAN_SHEET\",\"dbName\":null},{\"name\":\"PENALTY_SAVED\",\"dbName\":null},{\"name\":\"PENALTY_MISSED\",\"dbName\":null},{\"name\":\"OWN_GOAL\",\"dbName\":null},{\"name\":\"EXTRA_TIME_BONUS\",\"dbName\":null},{\"name\":\"MOTM\",\"dbName\":null}],\"dbName\":null},\"GoldenCardStatus\":{\"values\":[{\"name\":\"SEALED\",\"dbName\":null},{\"name\":\"OPENED\",\"dbName\":null}],\"dbName\":null},\"SpecialCardState\":{\"values\":[{\"name\":\"IN_INVENTORY\",\"dbName\":null},{\"name\":\"IN_TEAM\",\"dbName\":null},{\"name\":\"SOLD\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined +config.compilerWasm = undefined + +config.injectableEdgeEnv = () => ({ + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/lib/generated/prisma/index-browser.js b/lib/generated/prisma/index-browser.js new file mode 100644 index 0000000..1d2d9c6 --- /dev/null +++ b/lib/generated/prisma/index-browser.js @@ -0,0 +1,517 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('./runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ +Prisma.prismaVersion = { + client: "6.19.3", + engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CountryScalarFieldEnum = { + id: 'id', + name: 'name', + code: 'code', + flagUrl: 'flagUrl', + flagImage: 'flagImage', + confederation: 'confederation', + qualificationMethod: 'qualificationMethod', + qualificationDate: 'qualificationDate', + participationHistory: 'participationHistory', + bestResult: 'bestResult', + description: 'description', + defaultFormation: 'defaultFormation', + defaultLineupPlayerIds: 'defaultLineupPlayerIds', + defaultCaptainId: 'defaultCaptainId', + groupId: 'groupId', + isEliminated: 'isEliminated' +}; + +exports.Prisma.GroupScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.PlayerScalarFieldEnum = { + id: 'id', + name: 'name', + image: 'image', + position: 'position', + countryId: 'countryId', + price: 'price', + totalPoints: 'totalPoints', + isActive: 'isActive', + isGoldenCardEligible: 'isGoldenCardEligible', + cardTier: 'cardTier', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.MatchScalarFieldEnum = { + id: 'id', + homeTeamId: 'homeTeamId', + awayTeamId: 'awayTeamId', + homeScore: 'homeScore', + awayScore: 'awayScore', + stage: 'stage', + status: 'status', + matchDate: 'matchDate', + matchDatePersian: 'matchDatePersian', + stadium: 'stadium', + city: 'city', + referee: 'referee', + assistant1: 'assistant1', + assistant2: 'assistant2', + fourthOfficial: 'fourthOfficial', + attendance: 'attendance', + weather: 'weather', + description: 'description', + roundId: 'roundId', + createdAt: 'createdAt' +}; + +exports.Prisma.RoundScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.GameweekScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchEventScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + playerId: 'playerId', + type: 'type', + minute: 'minute', + extraInfo: 'extraInfo', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchLineupScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + countryId: 'countryId', + formation: 'formation', + playerIds: 'playerIds' +}; + +exports.Prisma.PlayerMatchStatScalarFieldEnum = { + id: 'id', + playerId: 'playerId', + matchId: 'matchId', + goals: 'goals', + assists: 'assists', + yellowCards: 'yellowCards', + redCards: 'redCards', + minutesPlayed: 'minutesPlayed', + cleanSheet: 'cleanSheet', + penaltySaved: 'penaltySaved', + penaltyMissed: 'penaltyMissed', + ownGoals: 'ownGoals', + isMotm: 'isMotm', + extraTimeBonus: 'extraTimeBonus', + points: 'points' +}; + +exports.Prisma.ScoringRuleScalarFieldEnum = { + id: 'id', + position: 'position', + eventType: 'eventType', + points: 'points', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + password: 'password', + role: 'role', + createdAt: 'createdAt' +}; + +exports.Prisma.LoginOtpScalarFieldEnum = { + id: 'id', + phone: 'phone', + codeHash: 'codeHash', + attempts: 'attempts', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.FantasyNewsScalarFieldEnum = { + id: 'id', + icon: 'icon', + title: 'title', + description: 'description', + newsTime: 'newsTime', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.DailyQuizScalarFieldEnum = { + id: 'id', + date: 'date', + windowStart: 'windowStart', + windowEnd: 'windowEnd', + goldWinnersCount: 'goldWinnersCount', + silverWinnersCount: 'silverWinnersCount', + bronzeWinnersCount: 'bronzeWinnersCount', + goldMinCorrect: 'goldMinCorrect', + silverMinCorrect: 'silverMinCorrect', + bronzeMinCorrect: 'bronzeMinCorrect', + isProcessed: 'isProcessed', + createdAt: 'createdAt' +}; + +exports.Prisma.QuizQuestionScalarFieldEnum = { + id: 'id', + quizId: 'quizId', + questionText: 'questionText', + options: 'options', + correctAnswer: 'correctAnswer', + order: 'order' +}; + +exports.Prisma.QuizSubmissionScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + answers: 'answers', + correctAnswers: 'correctAnswers', + score: 'score', + submittedAt: 'submittedAt' +}; + +exports.Prisma.GoldenCardScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + playerId: 'playerId', + cardTier: 'cardTier', + status: 'status', + state: 'state', + acquiredDate: 'acquiredDate', + openedAt: 'openedAt' +}; + +exports.Prisma.SessionScalarFieldEnum = { + id: 'id', + sessionToken: 'sessionToken', + userId: 'userId', + expires: 'expires' +}; + +exports.Prisma.TeamScalarFieldEnum = { + id: 'id', + name: 'name', + userId: 'userId', + budget: 'budget', + totalPoints: 'totalPoints', + formation: 'formation', + status: 'status', + createdAt: 'createdAt' +}; + +exports.Prisma.TeamPlayerScalarFieldEnum = { + teamId: 'teamId', + playerId: 'playerId', + goldenCardId: 'goldenCardId', + isCaptain: 'isCaptain', + isViceCaptain: 'isViceCaptain', + isBench: 'isBench', + positionIndex: 'positionIndex' +}; + +exports.Prisma.PackageScalarFieldEnum = { + id: 'id', + name: 'name', + budgetBonus: 'budgetBonus', + price: 'price', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.PaymentScalarFieldEnum = { + id: 'id', + userId: 'userId', + packageId: 'packageId', + amount: 'amount', + authority: 'authority', + refId: 'refId', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; +exports.Position = exports.$Enums.Position = { + GK: 'GK', + DEF: 'DEF', + MID: 'MID', + FWD: 'FWD' +}; + +exports.CardTier = exports.$Enums.CardTier = { + BRONZE: 'BRONZE', + SILVER: 'SILVER', + GOLD: 'GOLD' +}; + +exports.MatchStage = exports.$Enums.MatchStage = { + GROUP: 'GROUP', + ROUND_OF_16: 'ROUND_OF_16', + QUARTER_FINAL: 'QUARTER_FINAL', + SEMI_FINAL: 'SEMI_FINAL', + THIRD_PLACE: 'THIRD_PLACE', + FINAL: 'FINAL' +}; + +exports.MatchStatus = exports.$Enums.MatchStatus = { + SCHEDULED: 'SCHEDULED', + LIVE: 'LIVE', + FINISHED: 'FINISHED' +}; + +exports.EventType = exports.$Enums.EventType = { + GOAL: 'GOAL', + ASSIST: 'ASSIST', + YELLOW_CARD: 'YELLOW_CARD', + RED_CARD: 'RED_CARD', + SECOND_YELLOW: 'SECOND_YELLOW', + SUBSTITUTION_IN: 'SUBSTITUTION_IN', + SUBSTITUTION_OUT: 'SUBSTITUTION_OUT', + INJURY_NO_SUB: 'INJURY_NO_SUB', + CLEAN_SHEET: 'CLEAN_SHEET', + PENALTY_SAVED: 'PENALTY_SAVED', + PENALTY_MISSED: 'PENALTY_MISSED', + OWN_GOAL: 'OWN_GOAL', + EXTRA_TIME_BONUS: 'EXTRA_TIME_BONUS', + MOTM: 'MOTM' +}; + +exports.Role = exports.$Enums.Role = { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +exports.GoldenCardStatus = exports.$Enums.GoldenCardStatus = { + SEALED: 'SEALED', + OPENED: 'OPENED' +}; + +exports.SpecialCardState = exports.$Enums.SpecialCardState = { + IN_INVENTORY: 'IN_INVENTORY', + IN_TEAM: 'IN_TEAM', + SOLD: 'SOLD' +}; + +exports.TeamStatus = exports.$Enums.TeamStatus = { + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.PaymentStatus = exports.$Enums.PaymentStatus = { + PENDING: 'PENDING', + SUCCESS: 'SUCCESS', + FAILED: 'FAILED' +}; + +exports.Prisma.ModelName = { + Country: 'Country', + Group: 'Group', + Player: 'Player', + Match: 'Match', + Round: 'Round', + Gameweek: 'Gameweek', + MatchEvent: 'MatchEvent', + MatchLineup: 'MatchLineup', + PlayerMatchStat: 'PlayerMatchStat', + ScoringRule: 'ScoringRule', + User: 'User', + LoginOtp: 'LoginOtp', + FantasyNews: 'FantasyNews', + DailyQuiz: 'DailyQuiz', + QuizQuestion: 'QuizQuestion', + QuizSubmission: 'QuizSubmission', + GoldenCard: 'GoldenCard', + Session: 'Session', + Team: 'Team', + TeamPlayer: 'TeamPlayer', + Package: 'Package', + Payment: 'Payment' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/lib/generated/prisma/index.d.ts b/lib/generated/prisma/index.d.ts new file mode 100644 index 0000000..88b8450 --- /dev/null +++ b/lib/generated/prisma/index.d.ts @@ -0,0 +1,40347 @@ + +/** + * Client +**/ + +import * as runtime from './runtime/client.js'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise + + +/** + * Model Country + * + */ +export type Country = $Result.DefaultSelection +/** + * Model Group + * + */ +export type Group = $Result.DefaultSelection +/** + * Model Player + * + */ +export type Player = $Result.DefaultSelection +/** + * Model Match + * + */ +export type Match = $Result.DefaultSelection +/** + * Model Round + * + */ +export type Round = $Result.DefaultSelection +/** + * Model Gameweek + * + */ +export type Gameweek = $Result.DefaultSelection +/** + * Model MatchEvent + * + */ +export type MatchEvent = $Result.DefaultSelection +/** + * Model MatchLineup + * + */ +export type MatchLineup = $Result.DefaultSelection +/** + * Model PlayerMatchStat + * + */ +export type PlayerMatchStat = $Result.DefaultSelection +/** + * Model ScoringRule + * + */ +export type ScoringRule = $Result.DefaultSelection +/** + * Model User + * + */ +export type User = $Result.DefaultSelection +/** + * Model LoginOtp + * + */ +export type LoginOtp = $Result.DefaultSelection +/** + * Model FantasyNews + * + */ +export type FantasyNews = $Result.DefaultSelection +/** + * Model DailyQuiz + * + */ +export type DailyQuiz = $Result.DefaultSelection +/** + * Model QuizQuestion + * + */ +export type QuizQuestion = $Result.DefaultSelection +/** + * Model QuizSubmission + * + */ +export type QuizSubmission = $Result.DefaultSelection +/** + * Model GoldenCard + * + */ +export type GoldenCard = $Result.DefaultSelection +/** + * Model Session + * + */ +export type Session = $Result.DefaultSelection +/** + * Model Team + * + */ +export type Team = $Result.DefaultSelection +/** + * Model TeamPlayer + * + */ +export type TeamPlayer = $Result.DefaultSelection +/** + * Model Package + * + */ +export type Package = $Result.DefaultSelection +/** + * Model Payment + * + */ +export type Payment = $Result.DefaultSelection + +/** + * Enums + */ +export namespace $Enums { + export const Role: { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +export type Role = (typeof Role)[keyof typeof Role] + + +export const Position: { + GK: 'GK', + DEF: 'DEF', + MID: 'MID', + FWD: 'FWD' +}; + +export type Position = (typeof Position)[keyof typeof Position] + + +export const MatchStage: { + GROUP: 'GROUP', + ROUND_OF_16: 'ROUND_OF_16', + QUARTER_FINAL: 'QUARTER_FINAL', + SEMI_FINAL: 'SEMI_FINAL', + THIRD_PLACE: 'THIRD_PLACE', + FINAL: 'FINAL' +}; + +export type MatchStage = (typeof MatchStage)[keyof typeof MatchStage] + + +export const MatchStatus: { + SCHEDULED: 'SCHEDULED', + LIVE: 'LIVE', + FINISHED: 'FINISHED' +}; + +export type MatchStatus = (typeof MatchStatus)[keyof typeof MatchStatus] + + +export const TeamStatus: { + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +export type TeamStatus = (typeof TeamStatus)[keyof typeof TeamStatus] + + +export const PaymentStatus: { + PENDING: 'PENDING', + SUCCESS: 'SUCCESS', + FAILED: 'FAILED' +}; + +export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus] + + +export const CardTier: { + BRONZE: 'BRONZE', + SILVER: 'SILVER', + GOLD: 'GOLD' +}; + +export type CardTier = (typeof CardTier)[keyof typeof CardTier] + + +export const EventType: { + GOAL: 'GOAL', + ASSIST: 'ASSIST', + YELLOW_CARD: 'YELLOW_CARD', + RED_CARD: 'RED_CARD', + SECOND_YELLOW: 'SECOND_YELLOW', + SUBSTITUTION_IN: 'SUBSTITUTION_IN', + SUBSTITUTION_OUT: 'SUBSTITUTION_OUT', + INJURY_NO_SUB: 'INJURY_NO_SUB', + CLEAN_SHEET: 'CLEAN_SHEET', + PENALTY_SAVED: 'PENALTY_SAVED', + PENALTY_MISSED: 'PENALTY_MISSED', + OWN_GOAL: 'OWN_GOAL', + EXTRA_TIME_BONUS: 'EXTRA_TIME_BONUS', + MOTM: 'MOTM' +}; + +export type EventType = (typeof EventType)[keyof typeof EventType] + + +export const GoldenCardStatus: { + SEALED: 'SEALED', + OPENED: 'OPENED' +}; + +export type GoldenCardStatus = (typeof GoldenCardStatus)[keyof typeof GoldenCardStatus] + + +export const SpecialCardState: { + IN_INVENTORY: 'IN_INVENTORY', + IN_TEAM: 'IN_TEAM', + SOLD: 'SOLD' +}; + +export type SpecialCardState = (typeof SpecialCardState)[keyof typeof SpecialCardState] + +} + +export type Role = $Enums.Role + +export const Role: typeof $Enums.Role + +export type Position = $Enums.Position + +export const Position: typeof $Enums.Position + +export type MatchStage = $Enums.MatchStage + +export const MatchStage: typeof $Enums.MatchStage + +export type MatchStatus = $Enums.MatchStatus + +export const MatchStatus: typeof $Enums.MatchStatus + +export type TeamStatus = $Enums.TeamStatus + +export const TeamStatus: typeof $Enums.TeamStatus + +export type PaymentStatus = $Enums.PaymentStatus + +export const PaymentStatus: typeof $Enums.PaymentStatus + +export type CardTier = $Enums.CardTier + +export const CardTier: typeof $Enums.CardTier + +export type EventType = $Enums.EventType + +export const EventType: typeof $Enums.EventType + +export type GoldenCardStatus = $Enums.GoldenCardStatus + +export const GoldenCardStatus: typeof $Enums.GoldenCardStatus + +export type SpecialCardState = $Enums.SpecialCardState + +export const SpecialCardState: typeof $Enums.SpecialCardState + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Countries + * const countries = await prisma.country.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Countries + * const countries = await prisma.country.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): $Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise + + + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.country`: Exposes CRUD operations for the **Country** model. + * Example usage: + * ```ts + * // Fetch zero or more Countries + * const countries = await prisma.country.findMany() + * ``` + */ + get country(): Prisma.CountryDelegate; + + /** + * `prisma.group`: Exposes CRUD operations for the **Group** model. + * Example usage: + * ```ts + * // Fetch zero or more Groups + * const groups = await prisma.group.findMany() + * ``` + */ + get group(): Prisma.GroupDelegate; + + /** + * `prisma.player`: Exposes CRUD operations for the **Player** model. + * Example usage: + * ```ts + * // Fetch zero or more Players + * const players = await prisma.player.findMany() + * ``` + */ + get player(): Prisma.PlayerDelegate; + + /** + * `prisma.match`: Exposes CRUD operations for the **Match** model. + * Example usage: + * ```ts + * // Fetch zero or more Matches + * const matches = await prisma.match.findMany() + * ``` + */ + get match(): Prisma.MatchDelegate; + + /** + * `prisma.round`: Exposes CRUD operations for the **Round** model. + * Example usage: + * ```ts + * // Fetch zero or more Rounds + * const rounds = await prisma.round.findMany() + * ``` + */ + get round(): Prisma.RoundDelegate; + + /** + * `prisma.gameweek`: Exposes CRUD operations for the **Gameweek** model. + * Example usage: + * ```ts + * // Fetch zero or more Gameweeks + * const gameweeks = await prisma.gameweek.findMany() + * ``` + */ + get gameweek(): Prisma.GameweekDelegate; + + /** + * `prisma.matchEvent`: Exposes CRUD operations for the **MatchEvent** model. + * Example usage: + * ```ts + * // Fetch zero or more MatchEvents + * const matchEvents = await prisma.matchEvent.findMany() + * ``` + */ + get matchEvent(): Prisma.MatchEventDelegate; + + /** + * `prisma.matchLineup`: Exposes CRUD operations for the **MatchLineup** model. + * Example usage: + * ```ts + * // Fetch zero or more MatchLineups + * const matchLineups = await prisma.matchLineup.findMany() + * ``` + */ + get matchLineup(): Prisma.MatchLineupDelegate; + + /** + * `prisma.playerMatchStat`: Exposes CRUD operations for the **PlayerMatchStat** model. + * Example usage: + * ```ts + * // Fetch zero or more PlayerMatchStats + * const playerMatchStats = await prisma.playerMatchStat.findMany() + * ``` + */ + get playerMatchStat(): Prisma.PlayerMatchStatDelegate; + + /** + * `prisma.scoringRule`: Exposes CRUD operations for the **ScoringRule** model. + * Example usage: + * ```ts + * // Fetch zero or more ScoringRules + * const scoringRules = await prisma.scoringRule.findMany() + * ``` + */ + get scoringRule(): Prisma.ScoringRuleDelegate; + + /** + * `prisma.user`: Exposes CRUD operations for the **User** model. + * Example usage: + * ```ts + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + */ + get user(): Prisma.UserDelegate; + + /** + * `prisma.loginOtp`: Exposes CRUD operations for the **LoginOtp** model. + * Example usage: + * ```ts + * // Fetch zero or more LoginOtps + * const loginOtps = await prisma.loginOtp.findMany() + * ``` + */ + get loginOtp(): Prisma.LoginOtpDelegate; + + /** + * `prisma.fantasyNews`: Exposes CRUD operations for the **FantasyNews** model. + * Example usage: + * ```ts + * // Fetch zero or more FantasyNews + * const fantasyNews = await prisma.fantasyNews.findMany() + * ``` + */ + get fantasyNews(): Prisma.FantasyNewsDelegate; + + /** + * `prisma.dailyQuiz`: Exposes CRUD operations for the **DailyQuiz** model. + * Example usage: + * ```ts + * // Fetch zero or more DailyQuizs + * const dailyQuizs = await prisma.dailyQuiz.findMany() + * ``` + */ + get dailyQuiz(): Prisma.DailyQuizDelegate; + + /** + * `prisma.quizQuestion`: Exposes CRUD operations for the **QuizQuestion** model. + * Example usage: + * ```ts + * // Fetch zero or more QuizQuestions + * const quizQuestions = await prisma.quizQuestion.findMany() + * ``` + */ + get quizQuestion(): Prisma.QuizQuestionDelegate; + + /** + * `prisma.quizSubmission`: Exposes CRUD operations for the **QuizSubmission** model. + * Example usage: + * ```ts + * // Fetch zero or more QuizSubmissions + * const quizSubmissions = await prisma.quizSubmission.findMany() + * ``` + */ + get quizSubmission(): Prisma.QuizSubmissionDelegate; + + /** + * `prisma.goldenCard`: Exposes CRUD operations for the **GoldenCard** model. + * Example usage: + * ```ts + * // Fetch zero or more GoldenCards + * const goldenCards = await prisma.goldenCard.findMany() + * ``` + */ + get goldenCard(): Prisma.GoldenCardDelegate; + + /** + * `prisma.session`: Exposes CRUD operations for the **Session** model. + * Example usage: + * ```ts + * // Fetch zero or more Sessions + * const sessions = await prisma.session.findMany() + * ``` + */ + get session(): Prisma.SessionDelegate; + + /** + * `prisma.team`: Exposes CRUD operations for the **Team** model. + * Example usage: + * ```ts + * // Fetch zero or more Teams + * const teams = await prisma.team.findMany() + * ``` + */ + get team(): Prisma.TeamDelegate; + + /** + * `prisma.teamPlayer`: Exposes CRUD operations for the **TeamPlayer** model. + * Example usage: + * ```ts + * // Fetch zero or more TeamPlayers + * const teamPlayers = await prisma.teamPlayer.findMany() + * ``` + */ + get teamPlayer(): Prisma.TeamPlayerDelegate; + + /** + * `prisma.package`: Exposes CRUD operations for the **Package** model. + * Example usage: + * ```ts + * // Fetch zero or more Packages + * const packages = await prisma.package.findMany() + * ``` + */ + get package(): Prisma.PackageDelegate; + + /** + * `prisma.payment`: Exposes CRUD operations for the **Payment** model. + * Example usage: + * ```ts + * // Fetch zero or more Payments + * const payments = await prisma.payment.findMany() + * ``` + */ + get payment(): Prisma.PaymentDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export import Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = $Public.Args + export import Payload = $Public.Payload + export import Result = $Public.Result + export import Exact = $Public.Exact + + /** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + + export import Bytes = runtime.Bytes + export import JsonObject = runtime.JsonObject + export import JsonArray = runtime.JsonArray + export import JsonValue = runtime.JsonValue + export import InputJsonObject = runtime.InputJsonObject + export import InputJsonArray = runtime.InputJsonArray + export import InputJsonValue = runtime.InputJsonValue + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + + type SelectAndOmit = { + select: any + omit: any + } + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType $Utils.JsPromise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but additionally can also accept an array of keys + */ + type PickEnumerable | keyof T> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + Country: 'Country', + Group: 'Group', + Player: 'Player', + Match: 'Match', + Round: 'Round', + Gameweek: 'Gameweek', + MatchEvent: 'MatchEvent', + MatchLineup: 'MatchLineup', + PlayerMatchStat: 'PlayerMatchStat', + ScoringRule: 'ScoringRule', + User: 'User', + LoginOtp: 'LoginOtp', + FantasyNews: 'FantasyNews', + DailyQuiz: 'DailyQuiz', + QuizQuestion: 'QuizQuestion', + QuizSubmission: 'QuizSubmission', + GoldenCard: 'GoldenCard', + Session: 'Session', + Team: 'Team', + TeamPlayer: 'TeamPlayer', + Package: 'Package', + Payment: 'Payment' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "country" | "group" | "player" | "match" | "round" | "gameweek" | "matchEvent" | "matchLineup" | "playerMatchStat" | "scoringRule" | "user" | "loginOtp" | "fantasyNews" | "dailyQuiz" | "quizQuestion" | "quizSubmission" | "goldenCard" | "session" | "team" | "teamPlayer" | "package" | "payment" + txIsolationLevel: Prisma.TransactionIsolationLevel + } + model: { + Country: { + payload: Prisma.$CountryPayload + fields: Prisma.CountryFieldRefs + operations: { + findUnique: { + args: Prisma.CountryFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CountryFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CountryFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CountryFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CountryFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CountryCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CountryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CountryCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CountryDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CountryUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CountryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CountryUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.CountryUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.CountryUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CountryAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CountryGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CountryCountArgs + result: $Utils.Optional | number + } + } + } + Group: { + payload: Prisma.$GroupPayload + fields: Prisma.GroupFieldRefs + operations: { + findUnique: { + args: Prisma.GroupFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GroupFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.GroupFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GroupFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.GroupFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.GroupCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.GroupCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GroupCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.GroupDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.GroupUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GroupDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GroupUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GroupUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GroupUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.GroupAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.GroupGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.GroupCountArgs + result: $Utils.Optional | number + } + } + } + Player: { + payload: Prisma.$PlayerPayload + fields: Prisma.PlayerFieldRefs + operations: { + findUnique: { + args: Prisma.PlayerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PlayerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PlayerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PlayerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PlayerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PlayerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PlayerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PlayerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PlayerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PlayerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PlayerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PlayerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PlayerUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PlayerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PlayerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PlayerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PlayerCountArgs + result: $Utils.Optional | number + } + } + } + Match: { + payload: Prisma.$MatchPayload + fields: Prisma.MatchFieldRefs + operations: { + findUnique: { + args: Prisma.MatchFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MatchFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MatchFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MatchFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MatchFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MatchCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MatchCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MatchCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MatchDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MatchUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MatchDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MatchUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MatchUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MatchUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MatchAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MatchGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MatchCountArgs + result: $Utils.Optional | number + } + } + } + Round: { + payload: Prisma.$RoundPayload + fields: Prisma.RoundFieldRefs + operations: { + findUnique: { + args: Prisma.RoundFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.RoundFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.RoundFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.RoundFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.RoundFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.RoundCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.RoundCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.RoundCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.RoundDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.RoundUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.RoundDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.RoundUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.RoundUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.RoundUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.RoundAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.RoundGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.RoundCountArgs + result: $Utils.Optional | number + } + } + } + Gameweek: { + payload: Prisma.$GameweekPayload + fields: Prisma.GameweekFieldRefs + operations: { + findUnique: { + args: Prisma.GameweekFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GameweekFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.GameweekFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GameweekFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.GameweekFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.GameweekCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.GameweekCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GameweekCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.GameweekDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.GameweekUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GameweekDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GameweekUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GameweekUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GameweekUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.GameweekAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.GameweekGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.GameweekCountArgs + result: $Utils.Optional | number + } + } + } + MatchEvent: { + payload: Prisma.$MatchEventPayload + fields: Prisma.MatchEventFieldRefs + operations: { + findUnique: { + args: Prisma.MatchEventFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MatchEventFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MatchEventFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MatchEventFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MatchEventFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MatchEventCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MatchEventCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MatchEventCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MatchEventDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MatchEventUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MatchEventDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MatchEventUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MatchEventUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MatchEventUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MatchEventAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MatchEventGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MatchEventCountArgs + result: $Utils.Optional | number + } + } + } + MatchLineup: { + payload: Prisma.$MatchLineupPayload + fields: Prisma.MatchLineupFieldRefs + operations: { + findUnique: { + args: Prisma.MatchLineupFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MatchLineupFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MatchLineupFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MatchLineupFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MatchLineupFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MatchLineupCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MatchLineupCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MatchLineupCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MatchLineupDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MatchLineupUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MatchLineupDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MatchLineupUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MatchLineupUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MatchLineupUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MatchLineupAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MatchLineupGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MatchLineupCountArgs + result: $Utils.Optional | number + } + } + } + PlayerMatchStat: { + payload: Prisma.$PlayerMatchStatPayload + fields: Prisma.PlayerMatchStatFieldRefs + operations: { + findUnique: { + args: Prisma.PlayerMatchStatFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PlayerMatchStatFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PlayerMatchStatFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PlayerMatchStatFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PlayerMatchStatFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PlayerMatchStatCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PlayerMatchStatCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PlayerMatchStatCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PlayerMatchStatDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PlayerMatchStatUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PlayerMatchStatDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PlayerMatchStatUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PlayerMatchStatUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PlayerMatchStatUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PlayerMatchStatAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PlayerMatchStatGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PlayerMatchStatCountArgs + result: $Utils.Optional | number + } + } + } + ScoringRule: { + payload: Prisma.$ScoringRulePayload + fields: Prisma.ScoringRuleFieldRefs + operations: { + findUnique: { + args: Prisma.ScoringRuleFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ScoringRuleFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ScoringRuleFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ScoringRuleFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ScoringRuleFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ScoringRuleCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ScoringRuleCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ScoringRuleCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ScoringRuleDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ScoringRuleUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ScoringRuleDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ScoringRuleUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.ScoringRuleUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.ScoringRuleUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ScoringRuleAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ScoringRuleGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ScoringRuleCountArgs + result: $Utils.Optional | number + } + } + } + User: { + payload: Prisma.$UserPayload + fields: Prisma.UserFieldRefs + operations: { + findUnique: { + args: Prisma.UserFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.UserFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.UserCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.UserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.UserUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.UserUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.UserUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.UserGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.UserCountArgs + result: $Utils.Optional | number + } + } + } + LoginOtp: { + payload: Prisma.$LoginOtpPayload + fields: Prisma.LoginOtpFieldRefs + operations: { + findUnique: { + args: Prisma.LoginOtpFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.LoginOtpFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.LoginOtpFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.LoginOtpFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.LoginOtpFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.LoginOtpCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.LoginOtpCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.LoginOtpCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.LoginOtpDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.LoginOtpUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.LoginOtpDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.LoginOtpUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.LoginOtpUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.LoginOtpUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.LoginOtpAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.LoginOtpGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.LoginOtpCountArgs + result: $Utils.Optional | number + } + } + } + FantasyNews: { + payload: Prisma.$FantasyNewsPayload + fields: Prisma.FantasyNewsFieldRefs + operations: { + findUnique: { + args: Prisma.FantasyNewsFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.FantasyNewsFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.FantasyNewsFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.FantasyNewsFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.FantasyNewsFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.FantasyNewsCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.FantasyNewsCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.FantasyNewsCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.FantasyNewsDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.FantasyNewsUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.FantasyNewsDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.FantasyNewsUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.FantasyNewsUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.FantasyNewsUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.FantasyNewsAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.FantasyNewsGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.FantasyNewsCountArgs + result: $Utils.Optional | number + } + } + } + DailyQuiz: { + payload: Prisma.$DailyQuizPayload + fields: Prisma.DailyQuizFieldRefs + operations: { + findUnique: { + args: Prisma.DailyQuizFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.DailyQuizFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.DailyQuizFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.DailyQuizFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.DailyQuizFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.DailyQuizCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.DailyQuizCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.DailyQuizCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.DailyQuizDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.DailyQuizUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.DailyQuizDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.DailyQuizUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.DailyQuizUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.DailyQuizUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.DailyQuizAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.DailyQuizGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.DailyQuizCountArgs + result: $Utils.Optional | number + } + } + } + QuizQuestion: { + payload: Prisma.$QuizQuestionPayload + fields: Prisma.QuizQuestionFieldRefs + operations: { + findUnique: { + args: Prisma.QuizQuestionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.QuizQuestionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.QuizQuestionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.QuizQuestionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.QuizQuestionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.QuizQuestionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.QuizQuestionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.QuizQuestionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.QuizQuestionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.QuizQuestionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.QuizQuestionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.QuizQuestionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.QuizQuestionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.QuizQuestionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.QuizQuestionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.QuizQuestionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.QuizQuestionCountArgs + result: $Utils.Optional | number + } + } + } + QuizSubmission: { + payload: Prisma.$QuizSubmissionPayload + fields: Prisma.QuizSubmissionFieldRefs + operations: { + findUnique: { + args: Prisma.QuizSubmissionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.QuizSubmissionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.QuizSubmissionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.QuizSubmissionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.QuizSubmissionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.QuizSubmissionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.QuizSubmissionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.QuizSubmissionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.QuizSubmissionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.QuizSubmissionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.QuizSubmissionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.QuizSubmissionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.QuizSubmissionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.QuizSubmissionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.QuizSubmissionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.QuizSubmissionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.QuizSubmissionCountArgs + result: $Utils.Optional | number + } + } + } + GoldenCard: { + payload: Prisma.$GoldenCardPayload + fields: Prisma.GoldenCardFieldRefs + operations: { + findUnique: { + args: Prisma.GoldenCardFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GoldenCardFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.GoldenCardFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GoldenCardFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.GoldenCardFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.GoldenCardCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.GoldenCardCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GoldenCardCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.GoldenCardDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.GoldenCardUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GoldenCardDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GoldenCardUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GoldenCardUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GoldenCardUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.GoldenCardAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.GoldenCardGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.GoldenCardCountArgs + result: $Utils.Optional | number + } + } + } + Session: { + payload: Prisma.$SessionPayload + fields: Prisma.SessionFieldRefs + operations: { + findUnique: { + args: Prisma.SessionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SessionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.SessionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SessionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.SessionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.SessionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.SessionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.SessionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.SessionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.SessionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SessionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SessionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.SessionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.SessionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.SessionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.SessionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.SessionCountArgs + result: $Utils.Optional | number + } + } + } + Team: { + payload: Prisma.$TeamPayload + fields: Prisma.TeamFieldRefs + operations: { + findUnique: { + args: Prisma.TeamFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TeamFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.TeamFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TeamFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.TeamFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.TeamCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.TeamCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.TeamCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.TeamDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.TeamUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TeamDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TeamUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.TeamUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.TeamUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.TeamAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.TeamGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.TeamCountArgs + result: $Utils.Optional | number + } + } + } + TeamPlayer: { + payload: Prisma.$TeamPlayerPayload + fields: Prisma.TeamPlayerFieldRefs + operations: { + findUnique: { + args: Prisma.TeamPlayerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TeamPlayerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.TeamPlayerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TeamPlayerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.TeamPlayerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.TeamPlayerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.TeamPlayerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.TeamPlayerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.TeamPlayerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.TeamPlayerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TeamPlayerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TeamPlayerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.TeamPlayerUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.TeamPlayerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.TeamPlayerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.TeamPlayerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.TeamPlayerCountArgs + result: $Utils.Optional | number + } + } + } + Package: { + payload: Prisma.$PackagePayload + fields: Prisma.PackageFieldRefs + operations: { + findUnique: { + args: Prisma.PackageFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PackageFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PackageFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PackageFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PackageFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PackageCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PackageCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PackageCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PackageDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PackageUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PackageDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PackageUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PackageUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PackageUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PackageAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PackageGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PackageCountArgs + result: $Utils.Optional | number + } + } + } + Payment: { + payload: Prisma.$PaymentPayload + fields: Prisma.PaymentFieldRefs + operations: { + findUnique: { + args: Prisma.PaymentFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PaymentFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PaymentFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PaymentFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PaymentFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PaymentCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PaymentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PaymentCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PaymentDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PaymentUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PaymentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PaymentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PaymentUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PaymentUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PaymentAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PaymentGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PaymentCountArgs + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + } + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale` + */ + adapter?: runtime.SqlDriverAdapterFactory | null + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: Prisma.GlobalOmitConfig + } + export type GlobalOmitConfig = { + country?: CountryOmit + group?: GroupOmit + player?: PlayerOmit + match?: MatchOmit + round?: RoundOmit + gameweek?: GameweekOmit + matchEvent?: MatchEventOmit + matchLineup?: MatchLineupOmit + playerMatchStat?: PlayerMatchStatOmit + scoringRule?: ScoringRuleOmit + user?: UserOmit + loginOtp?: LoginOtpOmit + fantasyNews?: FantasyNewsOmit + dailyQuiz?: DailyQuizOmit + quizQuestion?: QuizQuestionOmit + quizSubmission?: QuizSubmissionOmit + goldenCard?: GoldenCardOmit + session?: SessionOmit + team?: TeamOmit + teamPlayer?: TeamPlayerOmit + package?: PackageOmit + payment?: PaymentOmit + } + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type CheckIsLogLevel = T extends LogLevel ? T : never; + + export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T + >; + + export type GetEvents = T extends Array + ? GetLogType + : never; + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + + // tested in getLogLevel.test.ts + export function getLogLevel(log: Array): LogLevel | undefined; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + /** + * Count Type CountryCountOutputType + */ + + export type CountryCountOutputType = { + players: number + homeMatches: number + awayMatches: number + } + + export type CountryCountOutputTypeSelect = { + players?: boolean | CountryCountOutputTypeCountPlayersArgs + homeMatches?: boolean | CountryCountOutputTypeCountHomeMatchesArgs + awayMatches?: boolean | CountryCountOutputTypeCountAwayMatchesArgs + } + + // Custom InputTypes + /** + * CountryCountOutputType without action + */ + export type CountryCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CountryCountOutputType + */ + select?: CountryCountOutputTypeSelect | null + } + + /** + * CountryCountOutputType without action + */ + export type CountryCountOutputTypeCountPlayersArgs = { + where?: PlayerWhereInput + } + + /** + * CountryCountOutputType without action + */ + export type CountryCountOutputTypeCountHomeMatchesArgs = { + where?: MatchWhereInput + } + + /** + * CountryCountOutputType without action + */ + export type CountryCountOutputTypeCountAwayMatchesArgs = { + where?: MatchWhereInput + } + + + /** + * Count Type GroupCountOutputType + */ + + export type GroupCountOutputType = { + countries: number + } + + export type GroupCountOutputTypeSelect = { + countries?: boolean | GroupCountOutputTypeCountCountriesArgs + } + + // Custom InputTypes + /** + * GroupCountOutputType without action + */ + export type GroupCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the GroupCountOutputType + */ + select?: GroupCountOutputTypeSelect | null + } + + /** + * GroupCountOutputType without action + */ + export type GroupCountOutputTypeCountCountriesArgs = { + where?: CountryWhereInput + } + + + /** + * Count Type PlayerCountOutputType + */ + + export type PlayerCountOutputType = { + matchStats: number + teamPlayers: number + events: number + goldenCards: number + } + + export type PlayerCountOutputTypeSelect = { + matchStats?: boolean | PlayerCountOutputTypeCountMatchStatsArgs + teamPlayers?: boolean | PlayerCountOutputTypeCountTeamPlayersArgs + events?: boolean | PlayerCountOutputTypeCountEventsArgs + goldenCards?: boolean | PlayerCountOutputTypeCountGoldenCardsArgs + } + + // Custom InputTypes + /** + * PlayerCountOutputType without action + */ + export type PlayerCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PlayerCountOutputType + */ + select?: PlayerCountOutputTypeSelect | null + } + + /** + * PlayerCountOutputType without action + */ + export type PlayerCountOutputTypeCountMatchStatsArgs = { + where?: PlayerMatchStatWhereInput + } + + /** + * PlayerCountOutputType without action + */ + export type PlayerCountOutputTypeCountTeamPlayersArgs = { + where?: TeamPlayerWhereInput + } + + /** + * PlayerCountOutputType without action + */ + export type PlayerCountOutputTypeCountEventsArgs = { + where?: MatchEventWhereInput + } + + /** + * PlayerCountOutputType without action + */ + export type PlayerCountOutputTypeCountGoldenCardsArgs = { + where?: GoldenCardWhereInput + } + + + /** + * Count Type MatchCountOutputType + */ + + export type MatchCountOutputType = { + playerStats: number + events: number + lineups: number + } + + export type MatchCountOutputTypeSelect = { + playerStats?: boolean | MatchCountOutputTypeCountPlayerStatsArgs + events?: boolean | MatchCountOutputTypeCountEventsArgs + lineups?: boolean | MatchCountOutputTypeCountLineupsArgs + } + + // Custom InputTypes + /** + * MatchCountOutputType without action + */ + export type MatchCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the MatchCountOutputType + */ + select?: MatchCountOutputTypeSelect | null + } + + /** + * MatchCountOutputType without action + */ + export type MatchCountOutputTypeCountPlayerStatsArgs = { + where?: PlayerMatchStatWhereInput + } + + /** + * MatchCountOutputType without action + */ + export type MatchCountOutputTypeCountEventsArgs = { + where?: MatchEventWhereInput + } + + /** + * MatchCountOutputType without action + */ + export type MatchCountOutputTypeCountLineupsArgs = { + where?: MatchLineupWhereInput + } + + + /** + * Count Type RoundCountOutputType + */ + + export type RoundCountOutputType = { + matches: number + } + + export type RoundCountOutputTypeSelect = { + matches?: boolean | RoundCountOutputTypeCountMatchesArgs + } + + // Custom InputTypes + /** + * RoundCountOutputType without action + */ + export type RoundCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the RoundCountOutputType + */ + select?: RoundCountOutputTypeSelect | null + } + + /** + * RoundCountOutputType without action + */ + export type RoundCountOutputTypeCountMatchesArgs = { + where?: MatchWhereInput + } + + + /** + * Count Type UserCountOutputType + */ + + export type UserCountOutputType = { + sessions: number + payments: number + quizSubmissions: number + goldenCards: number + } + + export type UserCountOutputTypeSelect = { + sessions?: boolean | UserCountOutputTypeCountSessionsArgs + payments?: boolean | UserCountOutputTypeCountPaymentsArgs + quizSubmissions?: boolean | UserCountOutputTypeCountQuizSubmissionsArgs + goldenCards?: boolean | UserCountOutputTypeCountGoldenCardsArgs + } + + // Custom InputTypes + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the UserCountOutputType + */ + select?: UserCountOutputTypeSelect | null + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountSessionsArgs = { + where?: SessionWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountPaymentsArgs = { + where?: PaymentWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountQuizSubmissionsArgs = { + where?: QuizSubmissionWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountGoldenCardsArgs = { + where?: GoldenCardWhereInput + } + + + /** + * Count Type DailyQuizCountOutputType + */ + + export type DailyQuizCountOutputType = { + questions: number + submissions: number + awardedCards: number + } + + export type DailyQuizCountOutputTypeSelect = { + questions?: boolean | DailyQuizCountOutputTypeCountQuestionsArgs + submissions?: boolean | DailyQuizCountOutputTypeCountSubmissionsArgs + awardedCards?: boolean | DailyQuizCountOutputTypeCountAwardedCardsArgs + } + + // Custom InputTypes + /** + * DailyQuizCountOutputType without action + */ + export type DailyQuizCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the DailyQuizCountOutputType + */ + select?: DailyQuizCountOutputTypeSelect | null + } + + /** + * DailyQuizCountOutputType without action + */ + export type DailyQuizCountOutputTypeCountQuestionsArgs = { + where?: QuizQuestionWhereInput + } + + /** + * DailyQuizCountOutputType without action + */ + export type DailyQuizCountOutputTypeCountSubmissionsArgs = { + where?: QuizSubmissionWhereInput + } + + /** + * DailyQuizCountOutputType without action + */ + export type DailyQuizCountOutputTypeCountAwardedCardsArgs = { + where?: GoldenCardWhereInput + } + + + /** + * Count Type TeamCountOutputType + */ + + export type TeamCountOutputType = { + players: number + } + + export type TeamCountOutputTypeSelect = { + players?: boolean | TeamCountOutputTypeCountPlayersArgs + } + + // Custom InputTypes + /** + * TeamCountOutputType without action + */ + export type TeamCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the TeamCountOutputType + */ + select?: TeamCountOutputTypeSelect | null + } + + /** + * TeamCountOutputType without action + */ + export type TeamCountOutputTypeCountPlayersArgs = { + where?: TeamPlayerWhereInput + } + + + /** + * Count Type PackageCountOutputType + */ + + export type PackageCountOutputType = { + payments: number + } + + export type PackageCountOutputTypeSelect = { + payments?: boolean | PackageCountOutputTypeCountPaymentsArgs + } + + // Custom InputTypes + /** + * PackageCountOutputType without action + */ + export type PackageCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PackageCountOutputType + */ + select?: PackageCountOutputTypeSelect | null + } + + /** + * PackageCountOutputType without action + */ + export type PackageCountOutputTypeCountPaymentsArgs = { + where?: PaymentWhereInput + } + + + /** + * Models + */ + + /** + * Model Country + */ + + export type AggregateCountry = { + _count: CountryCountAggregateOutputType | null + _min: CountryMinAggregateOutputType | null + _max: CountryMaxAggregateOutputType | null + } + + export type CountryMinAggregateOutputType = { + id: string | null + name: string | null + code: string | null + flagUrl: string | null + flagImage: string | null + confederation: string | null + qualificationMethod: string | null + qualificationDate: string | null + participationHistory: string | null + bestResult: string | null + description: string | null + defaultFormation: string | null + defaultCaptainId: string | null + groupId: string | null + isEliminated: boolean | null + } + + export type CountryMaxAggregateOutputType = { + id: string | null + name: string | null + code: string | null + flagUrl: string | null + flagImage: string | null + confederation: string | null + qualificationMethod: string | null + qualificationDate: string | null + participationHistory: string | null + bestResult: string | null + description: string | null + defaultFormation: string | null + defaultCaptainId: string | null + groupId: string | null + isEliminated: boolean | null + } + + export type CountryCountAggregateOutputType = { + id: number + name: number + code: number + flagUrl: number + flagImage: number + confederation: number + qualificationMethod: number + qualificationDate: number + participationHistory: number + bestResult: number + description: number + defaultFormation: number + defaultLineupPlayerIds: number + defaultCaptainId: number + groupId: number + isEliminated: number + _all: number + } + + + export type CountryMinAggregateInputType = { + id?: true + name?: true + code?: true + flagUrl?: true + flagImage?: true + confederation?: true + qualificationMethod?: true + qualificationDate?: true + participationHistory?: true + bestResult?: true + description?: true + defaultFormation?: true + defaultCaptainId?: true + groupId?: true + isEliminated?: true + } + + export type CountryMaxAggregateInputType = { + id?: true + name?: true + code?: true + flagUrl?: true + flagImage?: true + confederation?: true + qualificationMethod?: true + qualificationDate?: true + participationHistory?: true + bestResult?: true + description?: true + defaultFormation?: true + defaultCaptainId?: true + groupId?: true + isEliminated?: true + } + + export type CountryCountAggregateInputType = { + id?: true + name?: true + code?: true + flagUrl?: true + flagImage?: true + confederation?: true + qualificationMethod?: true + qualificationDate?: true + participationHistory?: true + bestResult?: true + description?: true + defaultFormation?: true + defaultLineupPlayerIds?: true + defaultCaptainId?: true + groupId?: true + isEliminated?: true + _all?: true + } + + export type CountryAggregateArgs = { + /** + * Filter which Country to aggregate. + */ + where?: CountryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Countries to fetch. + */ + orderBy?: CountryOrderByWithRelationInput | CountryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CountryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Countries from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Countries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Countries + **/ + _count?: true | CountryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CountryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CountryMaxAggregateInputType + } + + export type GetCountryAggregateType = { + [P in keyof T & keyof AggregateCountry]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CountryGroupByArgs = { + where?: CountryWhereInput + orderBy?: CountryOrderByWithAggregationInput | CountryOrderByWithAggregationInput[] + by: CountryScalarFieldEnum[] | CountryScalarFieldEnum + having?: CountryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CountryCountAggregateInputType | true + _min?: CountryMinAggregateInputType + _max?: CountryMaxAggregateInputType + } + + export type CountryGroupByOutputType = { + id: string + name: string + code: string + flagUrl: string | null + flagImage: string | null + confederation: string | null + qualificationMethod: string | null + qualificationDate: string | null + participationHistory: string | null + bestResult: string | null + description: string | null + defaultFormation: string + defaultLineupPlayerIds: string[] + defaultCaptainId: string | null + groupId: string | null + isEliminated: boolean + _count: CountryCountAggregateOutputType | null + _min: CountryMinAggregateOutputType | null + _max: CountryMaxAggregateOutputType | null + } + + type GetCountryGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CountryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CountrySelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + code?: boolean + flagUrl?: boolean + flagImage?: boolean + confederation?: boolean + qualificationMethod?: boolean + qualificationDate?: boolean + participationHistory?: boolean + bestResult?: boolean + description?: boolean + defaultFormation?: boolean + defaultLineupPlayerIds?: boolean + defaultCaptainId?: boolean + groupId?: boolean + isEliminated?: boolean + group?: boolean | Country$groupArgs + players?: boolean | Country$playersArgs + homeMatches?: boolean | Country$homeMatchesArgs + awayMatches?: boolean | Country$awayMatchesArgs + _count?: boolean | CountryCountOutputTypeDefaultArgs + }, ExtArgs["result"]["country"]> + + export type CountrySelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + code?: boolean + flagUrl?: boolean + flagImage?: boolean + confederation?: boolean + qualificationMethod?: boolean + qualificationDate?: boolean + participationHistory?: boolean + bestResult?: boolean + description?: boolean + defaultFormation?: boolean + defaultLineupPlayerIds?: boolean + defaultCaptainId?: boolean + groupId?: boolean + isEliminated?: boolean + group?: boolean | Country$groupArgs + }, ExtArgs["result"]["country"]> + + export type CountrySelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + code?: boolean + flagUrl?: boolean + flagImage?: boolean + confederation?: boolean + qualificationMethod?: boolean + qualificationDate?: boolean + participationHistory?: boolean + bestResult?: boolean + description?: boolean + defaultFormation?: boolean + defaultLineupPlayerIds?: boolean + defaultCaptainId?: boolean + groupId?: boolean + isEliminated?: boolean + group?: boolean | Country$groupArgs + }, ExtArgs["result"]["country"]> + + export type CountrySelectScalar = { + id?: boolean + name?: boolean + code?: boolean + flagUrl?: boolean + flagImage?: boolean + confederation?: boolean + qualificationMethod?: boolean + qualificationDate?: boolean + participationHistory?: boolean + bestResult?: boolean + description?: boolean + defaultFormation?: boolean + defaultLineupPlayerIds?: boolean + defaultCaptainId?: boolean + groupId?: boolean + isEliminated?: boolean + } + + export type CountryOmit = $Extensions.GetOmit<"id" | "name" | "code" | "flagUrl" | "flagImage" | "confederation" | "qualificationMethod" | "qualificationDate" | "participationHistory" | "bestResult" | "description" | "defaultFormation" | "defaultLineupPlayerIds" | "defaultCaptainId" | "groupId" | "isEliminated", ExtArgs["result"]["country"]> + export type CountryInclude = { + group?: boolean | Country$groupArgs + players?: boolean | Country$playersArgs + homeMatches?: boolean | Country$homeMatchesArgs + awayMatches?: boolean | Country$awayMatchesArgs + _count?: boolean | CountryCountOutputTypeDefaultArgs + } + export type CountryIncludeCreateManyAndReturn = { + group?: boolean | Country$groupArgs + } + export type CountryIncludeUpdateManyAndReturn = { + group?: boolean | Country$groupArgs + } + + export type $CountryPayload = { + name: "Country" + objects: { + group: Prisma.$GroupPayload | null + players: Prisma.$PlayerPayload[] + homeMatches: Prisma.$MatchPayload[] + awayMatches: Prisma.$MatchPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + code: string + flagUrl: string | null + flagImage: string | null + confederation: string | null + qualificationMethod: string | null + qualificationDate: string | null + participationHistory: string | null + bestResult: string | null + description: string | null + defaultFormation: string + defaultLineupPlayerIds: string[] + defaultCaptainId: string | null + groupId: string | null + isEliminated: boolean + }, ExtArgs["result"]["country"]> + composites: {} + } + + type CountryGetPayload = $Result.GetResult + + type CountryCountArgs = + Omit & { + select?: CountryCountAggregateInputType | true + } + + export interface CountryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Country'], meta: { name: 'Country' } } + /** + * Find zero or one Country that matches the filter. + * @param {CountryFindUniqueArgs} args - Arguments to find a Country + * @example + * // Get one Country + * const country = await prisma.country.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Country that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CountryFindUniqueOrThrowArgs} args - Arguments to find a Country + * @example + * // Get one Country + * const country = await prisma.country.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Country that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryFindFirstArgs} args - Arguments to find a Country + * @example + * // Get one Country + * const country = await prisma.country.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Country that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryFindFirstOrThrowArgs} args - Arguments to find a Country + * @example + * // Get one Country + * const country = await prisma.country.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Countries that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Countries + * const countries = await prisma.country.findMany() + * + * // Get first 10 Countries + * const countries = await prisma.country.findMany({ take: 10 }) + * + * // Only select the `id` + * const countryWithIdOnly = await prisma.country.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Country. + * @param {CountryCreateArgs} args - Arguments to create a Country. + * @example + * // Create one Country + * const Country = await prisma.country.create({ + * data: { + * // ... data to create a Country + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Countries. + * @param {CountryCreateManyArgs} args - Arguments to create many Countries. + * @example + * // Create many Countries + * const country = await prisma.country.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Countries and returns the data saved in the database. + * @param {CountryCreateManyAndReturnArgs} args - Arguments to create many Countries. + * @example + * // Create many Countries + * const country = await prisma.country.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Countries and only return the `id` + * const countryWithIdOnly = await prisma.country.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Country. + * @param {CountryDeleteArgs} args - Arguments to delete one Country. + * @example + * // Delete one Country + * const Country = await prisma.country.delete({ + * where: { + * // ... filter to delete one Country + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Country. + * @param {CountryUpdateArgs} args - Arguments to update one Country. + * @example + * // Update one Country + * const country = await prisma.country.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Countries. + * @param {CountryDeleteManyArgs} args - Arguments to filter Countries to delete. + * @example + * // Delete a few Countries + * const { count } = await prisma.country.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Countries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Countries + * const country = await prisma.country.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Countries and returns the data updated in the database. + * @param {CountryUpdateManyAndReturnArgs} args - Arguments to update many Countries. + * @example + * // Update many Countries + * const country = await prisma.country.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Countries and only return the `id` + * const countryWithIdOnly = await prisma.country.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Country. + * @param {CountryUpsertArgs} args - Arguments to update or create a Country. + * @example + * // Update or create a Country + * const country = await prisma.country.upsert({ + * create: { + * // ... data to create a Country + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Country we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CountryClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Countries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryCountArgs} args - Arguments to filter Countries to count. + * @example + * // Count the number of Countries + * const count = await prisma.country.count({ + * where: { + * // ... the filter for the Countries we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Country. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Country. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CountryGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CountryGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CountryGroupByArgs['orderBy'] } + : { orderBy?: CountryGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCountryGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Country model + */ + readonly fields: CountryFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Country. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__CountryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + group = {}>(args?: Subset>): Prisma__GroupClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + players = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + homeMatches = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + awayMatches = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Country model + */ + interface CountryFieldRefs { + readonly id: FieldRef<"Country", 'String'> + readonly name: FieldRef<"Country", 'String'> + readonly code: FieldRef<"Country", 'String'> + readonly flagUrl: FieldRef<"Country", 'String'> + readonly flagImage: FieldRef<"Country", 'String'> + readonly confederation: FieldRef<"Country", 'String'> + readonly qualificationMethod: FieldRef<"Country", 'String'> + readonly qualificationDate: FieldRef<"Country", 'String'> + readonly participationHistory: FieldRef<"Country", 'String'> + readonly bestResult: FieldRef<"Country", 'String'> + readonly description: FieldRef<"Country", 'String'> + readonly defaultFormation: FieldRef<"Country", 'String'> + readonly defaultLineupPlayerIds: FieldRef<"Country", 'String[]'> + readonly defaultCaptainId: FieldRef<"Country", 'String'> + readonly groupId: FieldRef<"Country", 'String'> + readonly isEliminated: FieldRef<"Country", 'Boolean'> + } + + + // Custom InputTypes + /** + * Country findUnique + */ + export type CountryFindUniqueArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter, which Country to fetch. + */ + where: CountryWhereUniqueInput + } + + /** + * Country findUniqueOrThrow + */ + export type CountryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter, which Country to fetch. + */ + where: CountryWhereUniqueInput + } + + /** + * Country findFirst + */ + export type CountryFindFirstArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter, which Country to fetch. + */ + where?: CountryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Countries to fetch. + */ + orderBy?: CountryOrderByWithRelationInput | CountryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Countries. + */ + cursor?: CountryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Countries from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Countries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Countries. + */ + distinct?: CountryScalarFieldEnum | CountryScalarFieldEnum[] + } + + /** + * Country findFirstOrThrow + */ + export type CountryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter, which Country to fetch. + */ + where?: CountryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Countries to fetch. + */ + orderBy?: CountryOrderByWithRelationInput | CountryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Countries. + */ + cursor?: CountryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Countries from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Countries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Countries. + */ + distinct?: CountryScalarFieldEnum | CountryScalarFieldEnum[] + } + + /** + * Country findMany + */ + export type CountryFindManyArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter, which Countries to fetch. + */ + where?: CountryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Countries to fetch. + */ + orderBy?: CountryOrderByWithRelationInput | CountryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Countries. + */ + cursor?: CountryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Countries from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Countries. + */ + skip?: number + distinct?: CountryScalarFieldEnum | CountryScalarFieldEnum[] + } + + /** + * Country create + */ + export type CountryCreateArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * The data needed to create a Country. + */ + data: XOR + } + + /** + * Country createMany + */ + export type CountryCreateManyArgs = { + /** + * The data used to create many Countries. + */ + data: CountryCreateManyInput | CountryCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Country createManyAndReturn + */ + export type CountryCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelectCreateManyAndReturn | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * The data used to create many Countries. + */ + data: CountryCreateManyInput | CountryCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryIncludeCreateManyAndReturn | null + } + + /** + * Country update + */ + export type CountryUpdateArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * The data needed to update a Country. + */ + data: XOR + /** + * Choose, which Country to update. + */ + where: CountryWhereUniqueInput + } + + /** + * Country updateMany + */ + export type CountryUpdateManyArgs = { + /** + * The data used to update Countries. + */ + data: XOR + /** + * Filter which Countries to update + */ + where?: CountryWhereInput + /** + * Limit how many Countries to update. + */ + limit?: number + } + + /** + * Country updateManyAndReturn + */ + export type CountryUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * The data used to update Countries. + */ + data: XOR + /** + * Filter which Countries to update + */ + where?: CountryWhereInput + /** + * Limit how many Countries to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryIncludeUpdateManyAndReturn | null + } + + /** + * Country upsert + */ + export type CountryUpsertArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * The filter to search for the Country to update in case it exists. + */ + where: CountryWhereUniqueInput + /** + * In case the Country found by the `where` argument doesn't exist, create a new Country with this data. + */ + create: XOR + /** + * In case the Country was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Country delete + */ + export type CountryDeleteArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + /** + * Filter which Country to delete. + */ + where: CountryWhereUniqueInput + } + + /** + * Country deleteMany + */ + export type CountryDeleteManyArgs = { + /** + * Filter which Countries to delete + */ + where?: CountryWhereInput + /** + * Limit how many Countries to delete. + */ + limit?: number + } + + /** + * Country.group + */ + export type Country$groupArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + where?: GroupWhereInput + } + + /** + * Country.players + */ + export type Country$playersArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + where?: PlayerWhereInput + orderBy?: PlayerOrderByWithRelationInput | PlayerOrderByWithRelationInput[] + cursor?: PlayerWhereUniqueInput + take?: number + skip?: number + distinct?: PlayerScalarFieldEnum | PlayerScalarFieldEnum[] + } + + /** + * Country.homeMatches + */ + export type Country$homeMatchesArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + where?: MatchWhereInput + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + cursor?: MatchWhereUniqueInput + take?: number + skip?: number + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Country.awayMatches + */ + export type Country$awayMatchesArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + where?: MatchWhereInput + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + cursor?: MatchWhereUniqueInput + take?: number + skip?: number + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Country without action + */ + export type CountryDefaultArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + } + + + /** + * Model Group + */ + + export type AggregateGroup = { + _count: GroupCountAggregateOutputType | null + _min: GroupMinAggregateOutputType | null + _max: GroupMaxAggregateOutputType | null + } + + export type GroupMinAggregateOutputType = { + id: string | null + name: string | null + } + + export type GroupMaxAggregateOutputType = { + id: string | null + name: string | null + } + + export type GroupCountAggregateOutputType = { + id: number + name: number + _all: number + } + + + export type GroupMinAggregateInputType = { + id?: true + name?: true + } + + export type GroupMaxAggregateInputType = { + id?: true + name?: true + } + + export type GroupCountAggregateInputType = { + id?: true + name?: true + _all?: true + } + + export type GroupAggregateArgs = { + /** + * Filter which Group to aggregate. + */ + where?: GroupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Groups to fetch. + */ + orderBy?: GroupOrderByWithRelationInput | GroupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: GroupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Groups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Groups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Groups + **/ + _count?: true | GroupCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GroupMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GroupMaxAggregateInputType + } + + export type GetGroupAggregateType = { + [P in keyof T & keyof AggregateGroup]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type GroupGroupByArgs = { + where?: GroupWhereInput + orderBy?: GroupOrderByWithAggregationInput | GroupOrderByWithAggregationInput[] + by: GroupScalarFieldEnum[] | GroupScalarFieldEnum + having?: GroupScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GroupCountAggregateInputType | true + _min?: GroupMinAggregateInputType + _max?: GroupMaxAggregateInputType + } + + export type GroupGroupByOutputType = { + id: string + name: string + _count: GroupCountAggregateOutputType | null + _min: GroupMinAggregateOutputType | null + _max: GroupMaxAggregateOutputType | null + } + + type GetGroupGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof GroupGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type GroupSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + countries?: boolean | Group$countriesArgs + _count?: boolean | GroupCountOutputTypeDefaultArgs + }, ExtArgs["result"]["group"]> + + export type GroupSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + }, ExtArgs["result"]["group"]> + + export type GroupSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + }, ExtArgs["result"]["group"]> + + export type GroupSelectScalar = { + id?: boolean + name?: boolean + } + + export type GroupOmit = $Extensions.GetOmit<"id" | "name", ExtArgs["result"]["group"]> + export type GroupInclude = { + countries?: boolean | Group$countriesArgs + _count?: boolean | GroupCountOutputTypeDefaultArgs + } + export type GroupIncludeCreateManyAndReturn = {} + export type GroupIncludeUpdateManyAndReturn = {} + + export type $GroupPayload = { + name: "Group" + objects: { + countries: Prisma.$CountryPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + }, ExtArgs["result"]["group"]> + composites: {} + } + + type GroupGetPayload = $Result.GetResult + + type GroupCountArgs = + Omit & { + select?: GroupCountAggregateInputType | true + } + + export interface GroupDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Group'], meta: { name: 'Group' } } + /** + * Find zero or one Group that matches the filter. + * @param {GroupFindUniqueArgs} args - Arguments to find a Group + * @example + * // Get one Group + * const group = await prisma.group.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Group that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GroupFindUniqueOrThrowArgs} args - Arguments to find a Group + * @example + * // Get one Group + * const group = await prisma.group.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Group that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupFindFirstArgs} args - Arguments to find a Group + * @example + * // Get one Group + * const group = await prisma.group.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Group that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupFindFirstOrThrowArgs} args - Arguments to find a Group + * @example + * // Get one Group + * const group = await prisma.group.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Groups that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Groups + * const groups = await prisma.group.findMany() + * + * // Get first 10 Groups + * const groups = await prisma.group.findMany({ take: 10 }) + * + * // Only select the `id` + * const groupWithIdOnly = await prisma.group.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Group. + * @param {GroupCreateArgs} args - Arguments to create a Group. + * @example + * // Create one Group + * const Group = await prisma.group.create({ + * data: { + * // ... data to create a Group + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Groups. + * @param {GroupCreateManyArgs} args - Arguments to create many Groups. + * @example + * // Create many Groups + * const group = await prisma.group.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Groups and returns the data saved in the database. + * @param {GroupCreateManyAndReturnArgs} args - Arguments to create many Groups. + * @example + * // Create many Groups + * const group = await prisma.group.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Groups and only return the `id` + * const groupWithIdOnly = await prisma.group.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Group. + * @param {GroupDeleteArgs} args - Arguments to delete one Group. + * @example + * // Delete one Group + * const Group = await prisma.group.delete({ + * where: { + * // ... filter to delete one Group + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Group. + * @param {GroupUpdateArgs} args - Arguments to update one Group. + * @example + * // Update one Group + * const group = await prisma.group.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Groups. + * @param {GroupDeleteManyArgs} args - Arguments to filter Groups to delete. + * @example + * // Delete a few Groups + * const { count } = await prisma.group.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Groups. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Groups + * const group = await prisma.group.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Groups and returns the data updated in the database. + * @param {GroupUpdateManyAndReturnArgs} args - Arguments to update many Groups. + * @example + * // Update many Groups + * const group = await prisma.group.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Groups and only return the `id` + * const groupWithIdOnly = await prisma.group.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Group. + * @param {GroupUpsertArgs} args - Arguments to update or create a Group. + * @example + * // Update or create a Group + * const group = await prisma.group.upsert({ + * create: { + * // ... data to create a Group + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Group we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__GroupClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Groups. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupCountArgs} args - Arguments to filter Groups to count. + * @example + * // Count the number of Groups + * const count = await prisma.group.count({ + * where: { + * // ... the filter for the Groups we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Group. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Group. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GroupGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends GroupGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: GroupGroupByArgs['orderBy'] } + : { orderBy?: GroupGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGroupGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Group model + */ + readonly fields: GroupFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Group. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__GroupClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + countries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Group model + */ + interface GroupFieldRefs { + readonly id: FieldRef<"Group", 'String'> + readonly name: FieldRef<"Group", 'String'> + } + + + // Custom InputTypes + /** + * Group findUnique + */ + export type GroupFindUniqueArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter, which Group to fetch. + */ + where: GroupWhereUniqueInput + } + + /** + * Group findUniqueOrThrow + */ + export type GroupFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter, which Group to fetch. + */ + where: GroupWhereUniqueInput + } + + /** + * Group findFirst + */ + export type GroupFindFirstArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter, which Group to fetch. + */ + where?: GroupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Groups to fetch. + */ + orderBy?: GroupOrderByWithRelationInput | GroupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Groups. + */ + cursor?: GroupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Groups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Groups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Groups. + */ + distinct?: GroupScalarFieldEnum | GroupScalarFieldEnum[] + } + + /** + * Group findFirstOrThrow + */ + export type GroupFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter, which Group to fetch. + */ + where?: GroupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Groups to fetch. + */ + orderBy?: GroupOrderByWithRelationInput | GroupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Groups. + */ + cursor?: GroupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Groups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Groups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Groups. + */ + distinct?: GroupScalarFieldEnum | GroupScalarFieldEnum[] + } + + /** + * Group findMany + */ + export type GroupFindManyArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter, which Groups to fetch. + */ + where?: GroupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Groups to fetch. + */ + orderBy?: GroupOrderByWithRelationInput | GroupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Groups. + */ + cursor?: GroupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Groups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Groups. + */ + skip?: number + distinct?: GroupScalarFieldEnum | GroupScalarFieldEnum[] + } + + /** + * Group create + */ + export type GroupCreateArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * The data needed to create a Group. + */ + data: XOR + } + + /** + * Group createMany + */ + export type GroupCreateManyArgs = { + /** + * The data used to create many Groups. + */ + data: GroupCreateManyInput | GroupCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Group createManyAndReturn + */ + export type GroupCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * The data used to create many Groups. + */ + data: GroupCreateManyInput | GroupCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Group update + */ + export type GroupUpdateArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * The data needed to update a Group. + */ + data: XOR + /** + * Choose, which Group to update. + */ + where: GroupWhereUniqueInput + } + + /** + * Group updateMany + */ + export type GroupUpdateManyArgs = { + /** + * The data used to update Groups. + */ + data: XOR + /** + * Filter which Groups to update + */ + where?: GroupWhereInput + /** + * Limit how many Groups to update. + */ + limit?: number + } + + /** + * Group updateManyAndReturn + */ + export type GroupUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * The data used to update Groups. + */ + data: XOR + /** + * Filter which Groups to update + */ + where?: GroupWhereInput + /** + * Limit how many Groups to update. + */ + limit?: number + } + + /** + * Group upsert + */ + export type GroupUpsertArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * The filter to search for the Group to update in case it exists. + */ + where: GroupWhereUniqueInput + /** + * In case the Group found by the `where` argument doesn't exist, create a new Group with this data. + */ + create: XOR + /** + * In case the Group was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Group delete + */ + export type GroupDeleteArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + /** + * Filter which Group to delete. + */ + where: GroupWhereUniqueInput + } + + /** + * Group deleteMany + */ + export type GroupDeleteManyArgs = { + /** + * Filter which Groups to delete + */ + where?: GroupWhereInput + /** + * Limit how many Groups to delete. + */ + limit?: number + } + + /** + * Group.countries + */ + export type Group$countriesArgs = { + /** + * Select specific fields to fetch from the Country + */ + select?: CountrySelect | null + /** + * Omit specific fields from the Country + */ + omit?: CountryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CountryInclude | null + where?: CountryWhereInput + orderBy?: CountryOrderByWithRelationInput | CountryOrderByWithRelationInput[] + cursor?: CountryWhereUniqueInput + take?: number + skip?: number + distinct?: CountryScalarFieldEnum | CountryScalarFieldEnum[] + } + + /** + * Group without action + */ + export type GroupDefaultArgs = { + /** + * Select specific fields to fetch from the Group + */ + select?: GroupSelect | null + /** + * Omit specific fields from the Group + */ + omit?: GroupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GroupInclude | null + } + + + /** + * Model Player + */ + + export type AggregatePlayer = { + _count: PlayerCountAggregateOutputType | null + _avg: PlayerAvgAggregateOutputType | null + _sum: PlayerSumAggregateOutputType | null + _min: PlayerMinAggregateOutputType | null + _max: PlayerMaxAggregateOutputType | null + } + + export type PlayerAvgAggregateOutputType = { + price: number | null + totalPoints: number | null + } + + export type PlayerSumAggregateOutputType = { + price: number | null + totalPoints: number | null + } + + export type PlayerMinAggregateOutputType = { + id: string | null + name: string | null + image: string | null + position: $Enums.Position | null + countryId: string | null + price: number | null + totalPoints: number | null + isActive: boolean | null + isGoldenCardEligible: boolean | null + cardTier: $Enums.CardTier | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PlayerMaxAggregateOutputType = { + id: string | null + name: string | null + image: string | null + position: $Enums.Position | null + countryId: string | null + price: number | null + totalPoints: number | null + isActive: boolean | null + isGoldenCardEligible: boolean | null + cardTier: $Enums.CardTier | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PlayerCountAggregateOutputType = { + id: number + name: number + image: number + position: number + countryId: number + price: number + totalPoints: number + isActive: number + isGoldenCardEligible: number + cardTier: number + createdAt: number + updatedAt: number + _all: number + } + + + export type PlayerAvgAggregateInputType = { + price?: true + totalPoints?: true + } + + export type PlayerSumAggregateInputType = { + price?: true + totalPoints?: true + } + + export type PlayerMinAggregateInputType = { + id?: true + name?: true + image?: true + position?: true + countryId?: true + price?: true + totalPoints?: true + isActive?: true + isGoldenCardEligible?: true + cardTier?: true + createdAt?: true + updatedAt?: true + } + + export type PlayerMaxAggregateInputType = { + id?: true + name?: true + image?: true + position?: true + countryId?: true + price?: true + totalPoints?: true + isActive?: true + isGoldenCardEligible?: true + cardTier?: true + createdAt?: true + updatedAt?: true + } + + export type PlayerCountAggregateInputType = { + id?: true + name?: true + image?: true + position?: true + countryId?: true + price?: true + totalPoints?: true + isActive?: true + isGoldenCardEligible?: true + cardTier?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type PlayerAggregateArgs = { + /** + * Filter which Player to aggregate. + */ + where?: PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: PlayerOrderByWithRelationInput | PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Players + **/ + _count?: true | PlayerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PlayerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PlayerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PlayerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PlayerMaxAggregateInputType + } + + export type GetPlayerAggregateType = { + [P in keyof T & keyof AggregatePlayer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PlayerGroupByArgs = { + where?: PlayerWhereInput + orderBy?: PlayerOrderByWithAggregationInput | PlayerOrderByWithAggregationInput[] + by: PlayerScalarFieldEnum[] | PlayerScalarFieldEnum + having?: PlayerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PlayerCountAggregateInputType | true + _avg?: PlayerAvgAggregateInputType + _sum?: PlayerSumAggregateInputType + _min?: PlayerMinAggregateInputType + _max?: PlayerMaxAggregateInputType + } + + export type PlayerGroupByOutputType = { + id: string + name: string + image: string | null + position: $Enums.Position + countryId: string + price: number + totalPoints: number + isActive: boolean + isGoldenCardEligible: boolean + cardTier: $Enums.CardTier + createdAt: Date + updatedAt: Date + _count: PlayerCountAggregateOutputType | null + _avg: PlayerAvgAggregateOutputType | null + _sum: PlayerSumAggregateOutputType | null + _min: PlayerMinAggregateOutputType | null + _max: PlayerMaxAggregateOutputType | null + } + + type GetPlayerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PlayerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PlayerSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + image?: boolean + position?: boolean + countryId?: boolean + price?: boolean + totalPoints?: boolean + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: boolean + createdAt?: boolean + updatedAt?: boolean + country?: boolean | CountryDefaultArgs + matchStats?: boolean | Player$matchStatsArgs + teamPlayers?: boolean | Player$teamPlayersArgs + events?: boolean | Player$eventsArgs + goldenCards?: boolean | Player$goldenCardsArgs + _count?: boolean | PlayerCountOutputTypeDefaultArgs + }, ExtArgs["result"]["player"]> + + export type PlayerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + image?: boolean + position?: boolean + countryId?: boolean + price?: boolean + totalPoints?: boolean + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: boolean + createdAt?: boolean + updatedAt?: boolean + country?: boolean | CountryDefaultArgs + }, ExtArgs["result"]["player"]> + + export type PlayerSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + image?: boolean + position?: boolean + countryId?: boolean + price?: boolean + totalPoints?: boolean + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: boolean + createdAt?: boolean + updatedAt?: boolean + country?: boolean | CountryDefaultArgs + }, ExtArgs["result"]["player"]> + + export type PlayerSelectScalar = { + id?: boolean + name?: boolean + image?: boolean + position?: boolean + countryId?: boolean + price?: boolean + totalPoints?: boolean + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type PlayerOmit = $Extensions.GetOmit<"id" | "name" | "image" | "position" | "countryId" | "price" | "totalPoints" | "isActive" | "isGoldenCardEligible" | "cardTier" | "createdAt" | "updatedAt", ExtArgs["result"]["player"]> + export type PlayerInclude = { + country?: boolean | CountryDefaultArgs + matchStats?: boolean | Player$matchStatsArgs + teamPlayers?: boolean | Player$teamPlayersArgs + events?: boolean | Player$eventsArgs + goldenCards?: boolean | Player$goldenCardsArgs + _count?: boolean | PlayerCountOutputTypeDefaultArgs + } + export type PlayerIncludeCreateManyAndReturn = { + country?: boolean | CountryDefaultArgs + } + export type PlayerIncludeUpdateManyAndReturn = { + country?: boolean | CountryDefaultArgs + } + + export type $PlayerPayload = { + name: "Player" + objects: { + country: Prisma.$CountryPayload + matchStats: Prisma.$PlayerMatchStatPayload[] + teamPlayers: Prisma.$TeamPlayerPayload[] + events: Prisma.$MatchEventPayload[] + goldenCards: Prisma.$GoldenCardPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + image: string | null + position: $Enums.Position + countryId: string + price: number + totalPoints: number + isActive: boolean + isGoldenCardEligible: boolean + cardTier: $Enums.CardTier + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["player"]> + composites: {} + } + + type PlayerGetPayload = $Result.GetResult + + type PlayerCountArgs = + Omit & { + select?: PlayerCountAggregateInputType | true + } + + export interface PlayerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Player'], meta: { name: 'Player' } } + /** + * Find zero or one Player that matches the filter. + * @param {PlayerFindUniqueArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Player that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PlayerFindUniqueOrThrowArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Player that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerFindFirstArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Player that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerFindFirstOrThrowArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Players that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Players + * const players = await prisma.player.findMany() + * + * // Get first 10 Players + * const players = await prisma.player.findMany({ take: 10 }) + * + * // Only select the `id` + * const playerWithIdOnly = await prisma.player.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Player. + * @param {PlayerCreateArgs} args - Arguments to create a Player. + * @example + * // Create one Player + * const Player = await prisma.player.create({ + * data: { + * // ... data to create a Player + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Players. + * @param {PlayerCreateManyArgs} args - Arguments to create many Players. + * @example + * // Create many Players + * const player = await prisma.player.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Players and returns the data saved in the database. + * @param {PlayerCreateManyAndReturnArgs} args - Arguments to create many Players. + * @example + * // Create many Players + * const player = await prisma.player.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Players and only return the `id` + * const playerWithIdOnly = await prisma.player.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Player. + * @param {PlayerDeleteArgs} args - Arguments to delete one Player. + * @example + * // Delete one Player + * const Player = await prisma.player.delete({ + * where: { + * // ... filter to delete one Player + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Player. + * @param {PlayerUpdateArgs} args - Arguments to update one Player. + * @example + * // Update one Player + * const player = await prisma.player.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Players. + * @param {PlayerDeleteManyArgs} args - Arguments to filter Players to delete. + * @example + * // Delete a few Players + * const { count } = await prisma.player.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Players. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Players + * const player = await prisma.player.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Players and returns the data updated in the database. + * @param {PlayerUpdateManyAndReturnArgs} args - Arguments to update many Players. + * @example + * // Update many Players + * const player = await prisma.player.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Players and only return the `id` + * const playerWithIdOnly = await prisma.player.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Player. + * @param {PlayerUpsertArgs} args - Arguments to update or create a Player. + * @example + * // Update or create a Player + * const player = await prisma.player.upsert({ + * create: { + * // ... data to create a Player + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Player we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PlayerClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Players. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerCountArgs} args - Arguments to filter Players to count. + * @example + * // Count the number of Players + * const count = await prisma.player.count({ + * where: { + * // ... the filter for the Players we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Player. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Player. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PlayerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PlayerGroupByArgs['orderBy'] } + : { orderBy?: PlayerGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPlayerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Player model + */ + readonly fields: PlayerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Player. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PlayerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + country = {}>(args?: Subset>): Prisma__CountryClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + matchStats = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + teamPlayers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + events = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + goldenCards = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Player model + */ + interface PlayerFieldRefs { + readonly id: FieldRef<"Player", 'String'> + readonly name: FieldRef<"Player", 'String'> + readonly image: FieldRef<"Player", 'String'> + readonly position: FieldRef<"Player", 'Position'> + readonly countryId: FieldRef<"Player", 'String'> + readonly price: FieldRef<"Player", 'Float'> + readonly totalPoints: FieldRef<"Player", 'Int'> + readonly isActive: FieldRef<"Player", 'Boolean'> + readonly isGoldenCardEligible: FieldRef<"Player", 'Boolean'> + readonly cardTier: FieldRef<"Player", 'CardTier'> + readonly createdAt: FieldRef<"Player", 'DateTime'> + readonly updatedAt: FieldRef<"Player", 'DateTime'> + } + + + // Custom InputTypes + /** + * Player findUnique + */ + export type PlayerFindUniqueArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where: PlayerWhereUniqueInput + } + + /** + * Player findUniqueOrThrow + */ + export type PlayerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where: PlayerWhereUniqueInput + } + + /** + * Player findFirst + */ + export type PlayerFindFirstArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where?: PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: PlayerOrderByWithRelationInput | PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Players. + */ + cursor?: PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Players. + */ + distinct?: PlayerScalarFieldEnum | PlayerScalarFieldEnum[] + } + + /** + * Player findFirstOrThrow + */ + export type PlayerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where?: PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: PlayerOrderByWithRelationInput | PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Players. + */ + cursor?: PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Players. + */ + distinct?: PlayerScalarFieldEnum | PlayerScalarFieldEnum[] + } + + /** + * Player findMany + */ + export type PlayerFindManyArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter, which Players to fetch. + */ + where?: PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: PlayerOrderByWithRelationInput | PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Players. + */ + cursor?: PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Players. + */ + skip?: number + distinct?: PlayerScalarFieldEnum | PlayerScalarFieldEnum[] + } + + /** + * Player create + */ + export type PlayerCreateArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * The data needed to create a Player. + */ + data: XOR + } + + /** + * Player createMany + */ + export type PlayerCreateManyArgs = { + /** + * The data used to create many Players. + */ + data: PlayerCreateManyInput | PlayerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Player createManyAndReturn + */ + export type PlayerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * The data used to create many Players. + */ + data: PlayerCreateManyInput | PlayerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerIncludeCreateManyAndReturn | null + } + + /** + * Player update + */ + export type PlayerUpdateArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * The data needed to update a Player. + */ + data: XOR + /** + * Choose, which Player to update. + */ + where: PlayerWhereUniqueInput + } + + /** + * Player updateMany + */ + export type PlayerUpdateManyArgs = { + /** + * The data used to update Players. + */ + data: XOR + /** + * Filter which Players to update + */ + where?: PlayerWhereInput + /** + * Limit how many Players to update. + */ + limit?: number + } + + /** + * Player updateManyAndReturn + */ + export type PlayerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * The data used to update Players. + */ + data: XOR + /** + * Filter which Players to update + */ + where?: PlayerWhereInput + /** + * Limit how many Players to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerIncludeUpdateManyAndReturn | null + } + + /** + * Player upsert + */ + export type PlayerUpsertArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * The filter to search for the Player to update in case it exists. + */ + where: PlayerWhereUniqueInput + /** + * In case the Player found by the `where` argument doesn't exist, create a new Player with this data. + */ + create: XOR + /** + * In case the Player was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Player delete + */ + export type PlayerDeleteArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + /** + * Filter which Player to delete. + */ + where: PlayerWhereUniqueInput + } + + /** + * Player deleteMany + */ + export type PlayerDeleteManyArgs = { + /** + * Filter which Players to delete + */ + where?: PlayerWhereInput + /** + * Limit how many Players to delete. + */ + limit?: number + } + + /** + * Player.matchStats + */ + export type Player$matchStatsArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + where?: PlayerMatchStatWhereInput + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + cursor?: PlayerMatchStatWhereUniqueInput + take?: number + skip?: number + distinct?: PlayerMatchStatScalarFieldEnum | PlayerMatchStatScalarFieldEnum[] + } + + /** + * Player.teamPlayers + */ + export type Player$teamPlayersArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + where?: TeamPlayerWhereInput + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + cursor?: TeamPlayerWhereUniqueInput + take?: number + skip?: number + distinct?: TeamPlayerScalarFieldEnum | TeamPlayerScalarFieldEnum[] + } + + /** + * Player.events + */ + export type Player$eventsArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + where?: MatchEventWhereInput + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + cursor?: MatchEventWhereUniqueInput + take?: number + skip?: number + distinct?: MatchEventScalarFieldEnum | MatchEventScalarFieldEnum[] + } + + /** + * Player.goldenCards + */ + export type Player$goldenCardsArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + where?: GoldenCardWhereInput + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + cursor?: GoldenCardWhereUniqueInput + take?: number + skip?: number + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * Player without action + */ + export type PlayerDefaultArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerInclude | null + } + + + /** + * Model Match + */ + + export type AggregateMatch = { + _count: MatchCountAggregateOutputType | null + _avg: MatchAvgAggregateOutputType | null + _sum: MatchSumAggregateOutputType | null + _min: MatchMinAggregateOutputType | null + _max: MatchMaxAggregateOutputType | null + } + + export type MatchAvgAggregateOutputType = { + homeScore: number | null + awayScore: number | null + attendance: number | null + } + + export type MatchSumAggregateOutputType = { + homeScore: number | null + awayScore: number | null + attendance: number | null + } + + export type MatchMinAggregateOutputType = { + id: string | null + homeTeamId: string | null + awayTeamId: string | null + homeScore: number | null + awayScore: number | null + stage: $Enums.MatchStage | null + status: $Enums.MatchStatus | null + matchDate: Date | null + matchDatePersian: string | null + stadium: string | null + city: string | null + referee: string | null + assistant1: string | null + assistant2: string | null + fourthOfficial: string | null + attendance: number | null + weather: string | null + description: string | null + roundId: string | null + createdAt: Date | null + } + + export type MatchMaxAggregateOutputType = { + id: string | null + homeTeamId: string | null + awayTeamId: string | null + homeScore: number | null + awayScore: number | null + stage: $Enums.MatchStage | null + status: $Enums.MatchStatus | null + matchDate: Date | null + matchDatePersian: string | null + stadium: string | null + city: string | null + referee: string | null + assistant1: string | null + assistant2: string | null + fourthOfficial: string | null + attendance: number | null + weather: string | null + description: string | null + roundId: string | null + createdAt: Date | null + } + + export type MatchCountAggregateOutputType = { + id: number + homeTeamId: number + awayTeamId: number + homeScore: number + awayScore: number + stage: number + status: number + matchDate: number + matchDatePersian: number + stadium: number + city: number + referee: number + assistant1: number + assistant2: number + fourthOfficial: number + attendance: number + weather: number + description: number + roundId: number + createdAt: number + _all: number + } + + + export type MatchAvgAggregateInputType = { + homeScore?: true + awayScore?: true + attendance?: true + } + + export type MatchSumAggregateInputType = { + homeScore?: true + awayScore?: true + attendance?: true + } + + export type MatchMinAggregateInputType = { + id?: true + homeTeamId?: true + awayTeamId?: true + homeScore?: true + awayScore?: true + stage?: true + status?: true + matchDate?: true + matchDatePersian?: true + stadium?: true + city?: true + referee?: true + assistant1?: true + assistant2?: true + fourthOfficial?: true + attendance?: true + weather?: true + description?: true + roundId?: true + createdAt?: true + } + + export type MatchMaxAggregateInputType = { + id?: true + homeTeamId?: true + awayTeamId?: true + homeScore?: true + awayScore?: true + stage?: true + status?: true + matchDate?: true + matchDatePersian?: true + stadium?: true + city?: true + referee?: true + assistant1?: true + assistant2?: true + fourthOfficial?: true + attendance?: true + weather?: true + description?: true + roundId?: true + createdAt?: true + } + + export type MatchCountAggregateInputType = { + id?: true + homeTeamId?: true + awayTeamId?: true + homeScore?: true + awayScore?: true + stage?: true + status?: true + matchDate?: true + matchDatePersian?: true + stadium?: true + city?: true + referee?: true + assistant1?: true + assistant2?: true + fourthOfficial?: true + attendance?: true + weather?: true + description?: true + roundId?: true + createdAt?: true + _all?: true + } + + export type MatchAggregateArgs = { + /** + * Filter which Match to aggregate. + */ + where?: MatchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Matches to fetch. + */ + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MatchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Matches from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Matches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Matches + **/ + _count?: true | MatchCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: MatchAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: MatchSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MatchMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MatchMaxAggregateInputType + } + + export type GetMatchAggregateType = { + [P in keyof T & keyof AggregateMatch]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MatchGroupByArgs = { + where?: MatchWhereInput + orderBy?: MatchOrderByWithAggregationInput | MatchOrderByWithAggregationInput[] + by: MatchScalarFieldEnum[] | MatchScalarFieldEnum + having?: MatchScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MatchCountAggregateInputType | true + _avg?: MatchAvgAggregateInputType + _sum?: MatchSumAggregateInputType + _min?: MatchMinAggregateInputType + _max?: MatchMaxAggregateInputType + } + + export type MatchGroupByOutputType = { + id: string + homeTeamId: string + awayTeamId: string + homeScore: number | null + awayScore: number | null + stage: $Enums.MatchStage + status: $Enums.MatchStatus + matchDate: Date + matchDatePersian: string | null + stadium: string | null + city: string | null + referee: string | null + assistant1: string | null + assistant2: string | null + fourthOfficial: string | null + attendance: number | null + weather: string | null + description: string | null + roundId: string | null + createdAt: Date + _count: MatchCountAggregateOutputType | null + _avg: MatchAvgAggregateOutputType | null + _sum: MatchSumAggregateOutputType | null + _min: MatchMinAggregateOutputType | null + _max: MatchMaxAggregateOutputType | null + } + + type GetMatchGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MatchGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MatchSelect = $Extensions.GetSelect<{ + id?: boolean + homeTeamId?: boolean + awayTeamId?: boolean + homeScore?: boolean + awayScore?: boolean + stage?: boolean + status?: boolean + matchDate?: boolean + matchDatePersian?: boolean + stadium?: boolean + city?: boolean + referee?: boolean + assistant1?: boolean + assistant2?: boolean + fourthOfficial?: boolean + attendance?: boolean + weather?: boolean + description?: boolean + roundId?: boolean + createdAt?: boolean + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + playerStats?: boolean | Match$playerStatsArgs + events?: boolean | Match$eventsArgs + lineups?: boolean | Match$lineupsArgs + _count?: boolean | MatchCountOutputTypeDefaultArgs + }, ExtArgs["result"]["match"]> + + export type MatchSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + homeTeamId?: boolean + awayTeamId?: boolean + homeScore?: boolean + awayScore?: boolean + stage?: boolean + status?: boolean + matchDate?: boolean + matchDatePersian?: boolean + stadium?: boolean + city?: boolean + referee?: boolean + assistant1?: boolean + assistant2?: boolean + fourthOfficial?: boolean + attendance?: boolean + weather?: boolean + description?: boolean + roundId?: boolean + createdAt?: boolean + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + }, ExtArgs["result"]["match"]> + + export type MatchSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + homeTeamId?: boolean + awayTeamId?: boolean + homeScore?: boolean + awayScore?: boolean + stage?: boolean + status?: boolean + matchDate?: boolean + matchDatePersian?: boolean + stadium?: boolean + city?: boolean + referee?: boolean + assistant1?: boolean + assistant2?: boolean + fourthOfficial?: boolean + attendance?: boolean + weather?: boolean + description?: boolean + roundId?: boolean + createdAt?: boolean + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + }, ExtArgs["result"]["match"]> + + export type MatchSelectScalar = { + id?: boolean + homeTeamId?: boolean + awayTeamId?: boolean + homeScore?: boolean + awayScore?: boolean + stage?: boolean + status?: boolean + matchDate?: boolean + matchDatePersian?: boolean + stadium?: boolean + city?: boolean + referee?: boolean + assistant1?: boolean + assistant2?: boolean + fourthOfficial?: boolean + attendance?: boolean + weather?: boolean + description?: boolean + roundId?: boolean + createdAt?: boolean + } + + export type MatchOmit = $Extensions.GetOmit<"id" | "homeTeamId" | "awayTeamId" | "homeScore" | "awayScore" | "stage" | "status" | "matchDate" | "matchDatePersian" | "stadium" | "city" | "referee" | "assistant1" | "assistant2" | "fourthOfficial" | "attendance" | "weather" | "description" | "roundId" | "createdAt", ExtArgs["result"]["match"]> + export type MatchInclude = { + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + playerStats?: boolean | Match$playerStatsArgs + events?: boolean | Match$eventsArgs + lineups?: boolean | Match$lineupsArgs + _count?: boolean | MatchCountOutputTypeDefaultArgs + } + export type MatchIncludeCreateManyAndReturn = { + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + } + export type MatchIncludeUpdateManyAndReturn = { + homeTeam?: boolean | CountryDefaultArgs + awayTeam?: boolean | CountryDefaultArgs + round?: boolean | Match$roundArgs + } + + export type $MatchPayload = { + name: "Match" + objects: { + homeTeam: Prisma.$CountryPayload + awayTeam: Prisma.$CountryPayload + round: Prisma.$RoundPayload | null + playerStats: Prisma.$PlayerMatchStatPayload[] + events: Prisma.$MatchEventPayload[] + lineups: Prisma.$MatchLineupPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + homeTeamId: string + awayTeamId: string + homeScore: number | null + awayScore: number | null + stage: $Enums.MatchStage + status: $Enums.MatchStatus + matchDate: Date + matchDatePersian: string | null + stadium: string | null + city: string | null + referee: string | null + assistant1: string | null + assistant2: string | null + fourthOfficial: string | null + attendance: number | null + weather: string | null + description: string | null + roundId: string | null + createdAt: Date + }, ExtArgs["result"]["match"]> + composites: {} + } + + type MatchGetPayload = $Result.GetResult + + type MatchCountArgs = + Omit & { + select?: MatchCountAggregateInputType | true + } + + export interface MatchDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Match'], meta: { name: 'Match' } } + /** + * Find zero or one Match that matches the filter. + * @param {MatchFindUniqueArgs} args - Arguments to find a Match + * @example + * // Get one Match + * const match = await prisma.match.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Match that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MatchFindUniqueOrThrowArgs} args - Arguments to find a Match + * @example + * // Get one Match + * const match = await prisma.match.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Match that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchFindFirstArgs} args - Arguments to find a Match + * @example + * // Get one Match + * const match = await prisma.match.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Match that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchFindFirstOrThrowArgs} args - Arguments to find a Match + * @example + * // Get one Match + * const match = await prisma.match.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Matches that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Matches + * const matches = await prisma.match.findMany() + * + * // Get first 10 Matches + * const matches = await prisma.match.findMany({ take: 10 }) + * + * // Only select the `id` + * const matchWithIdOnly = await prisma.match.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Match. + * @param {MatchCreateArgs} args - Arguments to create a Match. + * @example + * // Create one Match + * const Match = await prisma.match.create({ + * data: { + * // ... data to create a Match + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Matches. + * @param {MatchCreateManyArgs} args - Arguments to create many Matches. + * @example + * // Create many Matches + * const match = await prisma.match.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Matches and returns the data saved in the database. + * @param {MatchCreateManyAndReturnArgs} args - Arguments to create many Matches. + * @example + * // Create many Matches + * const match = await prisma.match.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Matches and only return the `id` + * const matchWithIdOnly = await prisma.match.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Match. + * @param {MatchDeleteArgs} args - Arguments to delete one Match. + * @example + * // Delete one Match + * const Match = await prisma.match.delete({ + * where: { + * // ... filter to delete one Match + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Match. + * @param {MatchUpdateArgs} args - Arguments to update one Match. + * @example + * // Update one Match + * const match = await prisma.match.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Matches. + * @param {MatchDeleteManyArgs} args - Arguments to filter Matches to delete. + * @example + * // Delete a few Matches + * const { count } = await prisma.match.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Matches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Matches + * const match = await prisma.match.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Matches and returns the data updated in the database. + * @param {MatchUpdateManyAndReturnArgs} args - Arguments to update many Matches. + * @example + * // Update many Matches + * const match = await prisma.match.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Matches and only return the `id` + * const matchWithIdOnly = await prisma.match.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Match. + * @param {MatchUpsertArgs} args - Arguments to update or create a Match. + * @example + * // Update or create a Match + * const match = await prisma.match.upsert({ + * create: { + * // ... data to create a Match + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Match we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MatchClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Matches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchCountArgs} args - Arguments to filter Matches to count. + * @example + * // Count the number of Matches + * const count = await prisma.match.count({ + * where: { + * // ... the filter for the Matches we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Match. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Match. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MatchGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MatchGroupByArgs['orderBy'] } + : { orderBy?: MatchGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMatchGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Match model + */ + readonly fields: MatchFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Match. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MatchClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + homeTeam = {}>(args?: Subset>): Prisma__CountryClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + awayTeam = {}>(args?: Subset>): Prisma__CountryClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + round = {}>(args?: Subset>): Prisma__RoundClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + playerStats = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + events = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + lineups = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Match model + */ + interface MatchFieldRefs { + readonly id: FieldRef<"Match", 'String'> + readonly homeTeamId: FieldRef<"Match", 'String'> + readonly awayTeamId: FieldRef<"Match", 'String'> + readonly homeScore: FieldRef<"Match", 'Int'> + readonly awayScore: FieldRef<"Match", 'Int'> + readonly stage: FieldRef<"Match", 'MatchStage'> + readonly status: FieldRef<"Match", 'MatchStatus'> + readonly matchDate: FieldRef<"Match", 'DateTime'> + readonly matchDatePersian: FieldRef<"Match", 'String'> + readonly stadium: FieldRef<"Match", 'String'> + readonly city: FieldRef<"Match", 'String'> + readonly referee: FieldRef<"Match", 'String'> + readonly assistant1: FieldRef<"Match", 'String'> + readonly assistant2: FieldRef<"Match", 'String'> + readonly fourthOfficial: FieldRef<"Match", 'String'> + readonly attendance: FieldRef<"Match", 'Int'> + readonly weather: FieldRef<"Match", 'String'> + readonly description: FieldRef<"Match", 'String'> + readonly roundId: FieldRef<"Match", 'String'> + readonly createdAt: FieldRef<"Match", 'DateTime'> + } + + + // Custom InputTypes + /** + * Match findUnique + */ + export type MatchFindUniqueArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter, which Match to fetch. + */ + where: MatchWhereUniqueInput + } + + /** + * Match findUniqueOrThrow + */ + export type MatchFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter, which Match to fetch. + */ + where: MatchWhereUniqueInput + } + + /** + * Match findFirst + */ + export type MatchFindFirstArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter, which Match to fetch. + */ + where?: MatchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Matches to fetch. + */ + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Matches. + */ + cursor?: MatchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Matches from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Matches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Matches. + */ + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Match findFirstOrThrow + */ + export type MatchFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter, which Match to fetch. + */ + where?: MatchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Matches to fetch. + */ + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Matches. + */ + cursor?: MatchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Matches from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Matches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Matches. + */ + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Match findMany + */ + export type MatchFindManyArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter, which Matches to fetch. + */ + where?: MatchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Matches to fetch. + */ + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Matches. + */ + cursor?: MatchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Matches from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Matches. + */ + skip?: number + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Match create + */ + export type MatchCreateArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * The data needed to create a Match. + */ + data: XOR + } + + /** + * Match createMany + */ + export type MatchCreateManyArgs = { + /** + * The data used to create many Matches. + */ + data: MatchCreateManyInput | MatchCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Match createManyAndReturn + */ + export type MatchCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * The data used to create many Matches. + */ + data: MatchCreateManyInput | MatchCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchIncludeCreateManyAndReturn | null + } + + /** + * Match update + */ + export type MatchUpdateArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * The data needed to update a Match. + */ + data: XOR + /** + * Choose, which Match to update. + */ + where: MatchWhereUniqueInput + } + + /** + * Match updateMany + */ + export type MatchUpdateManyArgs = { + /** + * The data used to update Matches. + */ + data: XOR + /** + * Filter which Matches to update + */ + where?: MatchWhereInput + /** + * Limit how many Matches to update. + */ + limit?: number + } + + /** + * Match updateManyAndReturn + */ + export type MatchUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * The data used to update Matches. + */ + data: XOR + /** + * Filter which Matches to update + */ + where?: MatchWhereInput + /** + * Limit how many Matches to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchIncludeUpdateManyAndReturn | null + } + + /** + * Match upsert + */ + export type MatchUpsertArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * The filter to search for the Match to update in case it exists. + */ + where: MatchWhereUniqueInput + /** + * In case the Match found by the `where` argument doesn't exist, create a new Match with this data. + */ + create: XOR + /** + * In case the Match was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Match delete + */ + export type MatchDeleteArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + /** + * Filter which Match to delete. + */ + where: MatchWhereUniqueInput + } + + /** + * Match deleteMany + */ + export type MatchDeleteManyArgs = { + /** + * Filter which Matches to delete + */ + where?: MatchWhereInput + /** + * Limit how many Matches to delete. + */ + limit?: number + } + + /** + * Match.round + */ + export type Match$roundArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + where?: RoundWhereInput + } + + /** + * Match.playerStats + */ + export type Match$playerStatsArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + where?: PlayerMatchStatWhereInput + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + cursor?: PlayerMatchStatWhereUniqueInput + take?: number + skip?: number + distinct?: PlayerMatchStatScalarFieldEnum | PlayerMatchStatScalarFieldEnum[] + } + + /** + * Match.events + */ + export type Match$eventsArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + where?: MatchEventWhereInput + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + cursor?: MatchEventWhereUniqueInput + take?: number + skip?: number + distinct?: MatchEventScalarFieldEnum | MatchEventScalarFieldEnum[] + } + + /** + * Match.lineups + */ + export type Match$lineupsArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + where?: MatchLineupWhereInput + orderBy?: MatchLineupOrderByWithRelationInput | MatchLineupOrderByWithRelationInput[] + cursor?: MatchLineupWhereUniqueInput + take?: number + skip?: number + distinct?: MatchLineupScalarFieldEnum | MatchLineupScalarFieldEnum[] + } + + /** + * Match without action + */ + export type MatchDefaultArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + } + + + /** + * Model Round + */ + + export type AggregateRound = { + _count: RoundCountAggregateOutputType | null + _avg: RoundAvgAggregateOutputType | null + _sum: RoundSumAggregateOutputType | null + _min: RoundMinAggregateOutputType | null + _max: RoundMaxAggregateOutputType | null + } + + export type RoundAvgAggregateOutputType = { + number: number | null + } + + export type RoundSumAggregateOutputType = { + number: number | null + } + + export type RoundMinAggregateOutputType = { + id: string | null + number: number | null + name: string | null + isActive: boolean | null + deadline: Date | null + createdAt: Date | null + } + + export type RoundMaxAggregateOutputType = { + id: string | null + number: number | null + name: string | null + isActive: boolean | null + deadline: Date | null + createdAt: Date | null + } + + export type RoundCountAggregateOutputType = { + id: number + number: number + name: number + isActive: number + deadline: number + createdAt: number + _all: number + } + + + export type RoundAvgAggregateInputType = { + number?: true + } + + export type RoundSumAggregateInputType = { + number?: true + } + + export type RoundMinAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + } + + export type RoundMaxAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + } + + export type RoundCountAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + _all?: true + } + + export type RoundAggregateArgs = { + /** + * Filter which Round to aggregate. + */ + where?: RoundWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rounds to fetch. + */ + orderBy?: RoundOrderByWithRelationInput | RoundOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: RoundWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rounds from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rounds. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Rounds + **/ + _count?: true | RoundCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: RoundAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: RoundSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: RoundMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: RoundMaxAggregateInputType + } + + export type GetRoundAggregateType = { + [P in keyof T & keyof AggregateRound]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type RoundGroupByArgs = { + where?: RoundWhereInput + orderBy?: RoundOrderByWithAggregationInput | RoundOrderByWithAggregationInput[] + by: RoundScalarFieldEnum[] | RoundScalarFieldEnum + having?: RoundScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: RoundCountAggregateInputType | true + _avg?: RoundAvgAggregateInputType + _sum?: RoundSumAggregateInputType + _min?: RoundMinAggregateInputType + _max?: RoundMaxAggregateInputType + } + + export type RoundGroupByOutputType = { + id: string + number: number + name: string + isActive: boolean + deadline: Date + createdAt: Date + _count: RoundCountAggregateOutputType | null + _avg: RoundAvgAggregateOutputType | null + _sum: RoundSumAggregateOutputType | null + _min: RoundMinAggregateOutputType | null + _max: RoundMaxAggregateOutputType | null + } + + type GetRoundGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof RoundGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type RoundSelect = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + matches?: boolean | Round$matchesArgs + _count?: boolean | RoundCountOutputTypeDefaultArgs + }, ExtArgs["result"]["round"]> + + export type RoundSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + }, ExtArgs["result"]["round"]> + + export type RoundSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + }, ExtArgs["result"]["round"]> + + export type RoundSelectScalar = { + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + } + + export type RoundOmit = $Extensions.GetOmit<"id" | "number" | "name" | "isActive" | "deadline" | "createdAt", ExtArgs["result"]["round"]> + export type RoundInclude = { + matches?: boolean | Round$matchesArgs + _count?: boolean | RoundCountOutputTypeDefaultArgs + } + export type RoundIncludeCreateManyAndReturn = {} + export type RoundIncludeUpdateManyAndReturn = {} + + export type $RoundPayload = { + name: "Round" + objects: { + matches: Prisma.$MatchPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + number: number + name: string + isActive: boolean + deadline: Date + createdAt: Date + }, ExtArgs["result"]["round"]> + composites: {} + } + + type RoundGetPayload = $Result.GetResult + + type RoundCountArgs = + Omit & { + select?: RoundCountAggregateInputType | true + } + + export interface RoundDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Round'], meta: { name: 'Round' } } + /** + * Find zero or one Round that matches the filter. + * @param {RoundFindUniqueArgs} args - Arguments to find a Round + * @example + * // Get one Round + * const round = await prisma.round.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Round that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {RoundFindUniqueOrThrowArgs} args - Arguments to find a Round + * @example + * // Get one Round + * const round = await prisma.round.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Round that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundFindFirstArgs} args - Arguments to find a Round + * @example + * // Get one Round + * const round = await prisma.round.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Round that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundFindFirstOrThrowArgs} args - Arguments to find a Round + * @example + * // Get one Round + * const round = await prisma.round.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Rounds that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Rounds + * const rounds = await prisma.round.findMany() + * + * // Get first 10 Rounds + * const rounds = await prisma.round.findMany({ take: 10 }) + * + * // Only select the `id` + * const roundWithIdOnly = await prisma.round.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Round. + * @param {RoundCreateArgs} args - Arguments to create a Round. + * @example + * // Create one Round + * const Round = await prisma.round.create({ + * data: { + * // ... data to create a Round + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Rounds. + * @param {RoundCreateManyArgs} args - Arguments to create many Rounds. + * @example + * // Create many Rounds + * const round = await prisma.round.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Rounds and returns the data saved in the database. + * @param {RoundCreateManyAndReturnArgs} args - Arguments to create many Rounds. + * @example + * // Create many Rounds + * const round = await prisma.round.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Rounds and only return the `id` + * const roundWithIdOnly = await prisma.round.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Round. + * @param {RoundDeleteArgs} args - Arguments to delete one Round. + * @example + * // Delete one Round + * const Round = await prisma.round.delete({ + * where: { + * // ... filter to delete one Round + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Round. + * @param {RoundUpdateArgs} args - Arguments to update one Round. + * @example + * // Update one Round + * const round = await prisma.round.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Rounds. + * @param {RoundDeleteManyArgs} args - Arguments to filter Rounds to delete. + * @example + * // Delete a few Rounds + * const { count } = await prisma.round.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Rounds. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Rounds + * const round = await prisma.round.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Rounds and returns the data updated in the database. + * @param {RoundUpdateManyAndReturnArgs} args - Arguments to update many Rounds. + * @example + * // Update many Rounds + * const round = await prisma.round.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Rounds and only return the `id` + * const roundWithIdOnly = await prisma.round.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Round. + * @param {RoundUpsertArgs} args - Arguments to update or create a Round. + * @example + * // Update or create a Round + * const round = await prisma.round.upsert({ + * create: { + * // ... data to create a Round + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Round we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__RoundClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Rounds. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundCountArgs} args - Arguments to filter Rounds to count. + * @example + * // Count the number of Rounds + * const count = await prisma.round.count({ + * where: { + * // ... the filter for the Rounds we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Round. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Round. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoundGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends RoundGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: RoundGroupByArgs['orderBy'] } + : { orderBy?: RoundGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetRoundGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Round model + */ + readonly fields: RoundFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Round. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__RoundClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + matches = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Round model + */ + interface RoundFieldRefs { + readonly id: FieldRef<"Round", 'String'> + readonly number: FieldRef<"Round", 'Int'> + readonly name: FieldRef<"Round", 'String'> + readonly isActive: FieldRef<"Round", 'Boolean'> + readonly deadline: FieldRef<"Round", 'DateTime'> + readonly createdAt: FieldRef<"Round", 'DateTime'> + } + + + // Custom InputTypes + /** + * Round findUnique + */ + export type RoundFindUniqueArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter, which Round to fetch. + */ + where: RoundWhereUniqueInput + } + + /** + * Round findUniqueOrThrow + */ + export type RoundFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter, which Round to fetch. + */ + where: RoundWhereUniqueInput + } + + /** + * Round findFirst + */ + export type RoundFindFirstArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter, which Round to fetch. + */ + where?: RoundWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rounds to fetch. + */ + orderBy?: RoundOrderByWithRelationInput | RoundOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Rounds. + */ + cursor?: RoundWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rounds from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rounds. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Rounds. + */ + distinct?: RoundScalarFieldEnum | RoundScalarFieldEnum[] + } + + /** + * Round findFirstOrThrow + */ + export type RoundFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter, which Round to fetch. + */ + where?: RoundWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rounds to fetch. + */ + orderBy?: RoundOrderByWithRelationInput | RoundOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Rounds. + */ + cursor?: RoundWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rounds from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rounds. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Rounds. + */ + distinct?: RoundScalarFieldEnum | RoundScalarFieldEnum[] + } + + /** + * Round findMany + */ + export type RoundFindManyArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter, which Rounds to fetch. + */ + where?: RoundWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rounds to fetch. + */ + orderBy?: RoundOrderByWithRelationInput | RoundOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Rounds. + */ + cursor?: RoundWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rounds from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rounds. + */ + skip?: number + distinct?: RoundScalarFieldEnum | RoundScalarFieldEnum[] + } + + /** + * Round create + */ + export type RoundCreateArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * The data needed to create a Round. + */ + data: XOR + } + + /** + * Round createMany + */ + export type RoundCreateManyArgs = { + /** + * The data used to create many Rounds. + */ + data: RoundCreateManyInput | RoundCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Round createManyAndReturn + */ + export type RoundCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * The data used to create many Rounds. + */ + data: RoundCreateManyInput | RoundCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Round update + */ + export type RoundUpdateArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * The data needed to update a Round. + */ + data: XOR + /** + * Choose, which Round to update. + */ + where: RoundWhereUniqueInput + } + + /** + * Round updateMany + */ + export type RoundUpdateManyArgs = { + /** + * The data used to update Rounds. + */ + data: XOR + /** + * Filter which Rounds to update + */ + where?: RoundWhereInput + /** + * Limit how many Rounds to update. + */ + limit?: number + } + + /** + * Round updateManyAndReturn + */ + export type RoundUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * The data used to update Rounds. + */ + data: XOR + /** + * Filter which Rounds to update + */ + where?: RoundWhereInput + /** + * Limit how many Rounds to update. + */ + limit?: number + } + + /** + * Round upsert + */ + export type RoundUpsertArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * The filter to search for the Round to update in case it exists. + */ + where: RoundWhereUniqueInput + /** + * In case the Round found by the `where` argument doesn't exist, create a new Round with this data. + */ + create: XOR + /** + * In case the Round was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Round delete + */ + export type RoundDeleteArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + /** + * Filter which Round to delete. + */ + where: RoundWhereUniqueInput + } + + /** + * Round deleteMany + */ + export type RoundDeleteManyArgs = { + /** + * Filter which Rounds to delete + */ + where?: RoundWhereInput + /** + * Limit how many Rounds to delete. + */ + limit?: number + } + + /** + * Round.matches + */ + export type Round$matchesArgs = { + /** + * Select specific fields to fetch from the Match + */ + select?: MatchSelect | null + /** + * Omit specific fields from the Match + */ + omit?: MatchOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchInclude | null + where?: MatchWhereInput + orderBy?: MatchOrderByWithRelationInput | MatchOrderByWithRelationInput[] + cursor?: MatchWhereUniqueInput + take?: number + skip?: number + distinct?: MatchScalarFieldEnum | MatchScalarFieldEnum[] + } + + /** + * Round without action + */ + export type RoundDefaultArgs = { + /** + * Select specific fields to fetch from the Round + */ + select?: RoundSelect | null + /** + * Omit specific fields from the Round + */ + omit?: RoundOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: RoundInclude | null + } + + + /** + * Model Gameweek + */ + + export type AggregateGameweek = { + _count: GameweekCountAggregateOutputType | null + _avg: GameweekAvgAggregateOutputType | null + _sum: GameweekSumAggregateOutputType | null + _min: GameweekMinAggregateOutputType | null + _max: GameweekMaxAggregateOutputType | null + } + + export type GameweekAvgAggregateOutputType = { + number: number | null + } + + export type GameweekSumAggregateOutputType = { + number: number | null + } + + export type GameweekMinAggregateOutputType = { + id: string | null + number: number | null + name: string | null + isActive: boolean | null + deadline: Date | null + createdAt: Date | null + } + + export type GameweekMaxAggregateOutputType = { + id: string | null + number: number | null + name: string | null + isActive: boolean | null + deadline: Date | null + createdAt: Date | null + } + + export type GameweekCountAggregateOutputType = { + id: number + number: number + name: number + isActive: number + deadline: number + createdAt: number + _all: number + } + + + export type GameweekAvgAggregateInputType = { + number?: true + } + + export type GameweekSumAggregateInputType = { + number?: true + } + + export type GameweekMinAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + } + + export type GameweekMaxAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + } + + export type GameweekCountAggregateInputType = { + id?: true + number?: true + name?: true + isActive?: true + deadline?: true + createdAt?: true + _all?: true + } + + export type GameweekAggregateArgs = { + /** + * Filter which Gameweek to aggregate. + */ + where?: GameweekWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Gameweeks to fetch. + */ + orderBy?: GameweekOrderByWithRelationInput | GameweekOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: GameweekWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Gameweeks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Gameweeks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Gameweeks + **/ + _count?: true | GameweekCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GameweekAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GameweekSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GameweekMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GameweekMaxAggregateInputType + } + + export type GetGameweekAggregateType = { + [P in keyof T & keyof AggregateGameweek]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type GameweekGroupByArgs = { + where?: GameweekWhereInput + orderBy?: GameweekOrderByWithAggregationInput | GameweekOrderByWithAggregationInput[] + by: GameweekScalarFieldEnum[] | GameweekScalarFieldEnum + having?: GameweekScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GameweekCountAggregateInputType | true + _avg?: GameweekAvgAggregateInputType + _sum?: GameweekSumAggregateInputType + _min?: GameweekMinAggregateInputType + _max?: GameweekMaxAggregateInputType + } + + export type GameweekGroupByOutputType = { + id: string + number: number + name: string + isActive: boolean + deadline: Date + createdAt: Date + _count: GameweekCountAggregateOutputType | null + _avg: GameweekAvgAggregateOutputType | null + _sum: GameweekSumAggregateOutputType | null + _min: GameweekMinAggregateOutputType | null + _max: GameweekMaxAggregateOutputType | null + } + + type GetGameweekGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof GameweekGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type GameweekSelect = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + }, ExtArgs["result"]["gameweek"]> + + export type GameweekSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + }, ExtArgs["result"]["gameweek"]> + + export type GameweekSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + }, ExtArgs["result"]["gameweek"]> + + export type GameweekSelectScalar = { + id?: boolean + number?: boolean + name?: boolean + isActive?: boolean + deadline?: boolean + createdAt?: boolean + } + + export type GameweekOmit = $Extensions.GetOmit<"id" | "number" | "name" | "isActive" | "deadline" | "createdAt", ExtArgs["result"]["gameweek"]> + + export type $GameweekPayload = { + name: "Gameweek" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + number: number + name: string + isActive: boolean + deadline: Date + createdAt: Date + }, ExtArgs["result"]["gameweek"]> + composites: {} + } + + type GameweekGetPayload = $Result.GetResult + + type GameweekCountArgs = + Omit & { + select?: GameweekCountAggregateInputType | true + } + + export interface GameweekDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Gameweek'], meta: { name: 'Gameweek' } } + /** + * Find zero or one Gameweek that matches the filter. + * @param {GameweekFindUniqueArgs} args - Arguments to find a Gameweek + * @example + * // Get one Gameweek + * const gameweek = await prisma.gameweek.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Gameweek that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GameweekFindUniqueOrThrowArgs} args - Arguments to find a Gameweek + * @example + * // Get one Gameweek + * const gameweek = await prisma.gameweek.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Gameweek that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekFindFirstArgs} args - Arguments to find a Gameweek + * @example + * // Get one Gameweek + * const gameweek = await prisma.gameweek.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Gameweek that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekFindFirstOrThrowArgs} args - Arguments to find a Gameweek + * @example + * // Get one Gameweek + * const gameweek = await prisma.gameweek.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Gameweeks that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Gameweeks + * const gameweeks = await prisma.gameweek.findMany() + * + * // Get first 10 Gameweeks + * const gameweeks = await prisma.gameweek.findMany({ take: 10 }) + * + * // Only select the `id` + * const gameweekWithIdOnly = await prisma.gameweek.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Gameweek. + * @param {GameweekCreateArgs} args - Arguments to create a Gameweek. + * @example + * // Create one Gameweek + * const Gameweek = await prisma.gameweek.create({ + * data: { + * // ... data to create a Gameweek + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Gameweeks. + * @param {GameweekCreateManyArgs} args - Arguments to create many Gameweeks. + * @example + * // Create many Gameweeks + * const gameweek = await prisma.gameweek.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Gameweeks and returns the data saved in the database. + * @param {GameweekCreateManyAndReturnArgs} args - Arguments to create many Gameweeks. + * @example + * // Create many Gameweeks + * const gameweek = await prisma.gameweek.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Gameweeks and only return the `id` + * const gameweekWithIdOnly = await prisma.gameweek.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Gameweek. + * @param {GameweekDeleteArgs} args - Arguments to delete one Gameweek. + * @example + * // Delete one Gameweek + * const Gameweek = await prisma.gameweek.delete({ + * where: { + * // ... filter to delete one Gameweek + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Gameweek. + * @param {GameweekUpdateArgs} args - Arguments to update one Gameweek. + * @example + * // Update one Gameweek + * const gameweek = await prisma.gameweek.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Gameweeks. + * @param {GameweekDeleteManyArgs} args - Arguments to filter Gameweeks to delete. + * @example + * // Delete a few Gameweeks + * const { count } = await prisma.gameweek.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Gameweeks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Gameweeks + * const gameweek = await prisma.gameweek.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Gameweeks and returns the data updated in the database. + * @param {GameweekUpdateManyAndReturnArgs} args - Arguments to update many Gameweeks. + * @example + * // Update many Gameweeks + * const gameweek = await prisma.gameweek.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Gameweeks and only return the `id` + * const gameweekWithIdOnly = await prisma.gameweek.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Gameweek. + * @param {GameweekUpsertArgs} args - Arguments to update or create a Gameweek. + * @example + * // Update or create a Gameweek + * const gameweek = await prisma.gameweek.upsert({ + * create: { + * // ... data to create a Gameweek + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Gameweek we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__GameweekClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Gameweeks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekCountArgs} args - Arguments to filter Gameweeks to count. + * @example + * // Count the number of Gameweeks + * const count = await prisma.gameweek.count({ + * where: { + * // ... the filter for the Gameweeks we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Gameweek. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Gameweek. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameweekGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends GameweekGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: GameweekGroupByArgs['orderBy'] } + : { orderBy?: GameweekGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGameweekGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Gameweek model + */ + readonly fields: GameweekFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Gameweek. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__GameweekClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Gameweek model + */ + interface GameweekFieldRefs { + readonly id: FieldRef<"Gameweek", 'String'> + readonly number: FieldRef<"Gameweek", 'Int'> + readonly name: FieldRef<"Gameweek", 'String'> + readonly isActive: FieldRef<"Gameweek", 'Boolean'> + readonly deadline: FieldRef<"Gameweek", 'DateTime'> + readonly createdAt: FieldRef<"Gameweek", 'DateTime'> + } + + + // Custom InputTypes + /** + * Gameweek findUnique + */ + export type GameweekFindUniqueArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter, which Gameweek to fetch. + */ + where: GameweekWhereUniqueInput + } + + /** + * Gameweek findUniqueOrThrow + */ + export type GameweekFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter, which Gameweek to fetch. + */ + where: GameweekWhereUniqueInput + } + + /** + * Gameweek findFirst + */ + export type GameweekFindFirstArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter, which Gameweek to fetch. + */ + where?: GameweekWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Gameweeks to fetch. + */ + orderBy?: GameweekOrderByWithRelationInput | GameweekOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Gameweeks. + */ + cursor?: GameweekWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Gameweeks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Gameweeks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Gameweeks. + */ + distinct?: GameweekScalarFieldEnum | GameweekScalarFieldEnum[] + } + + /** + * Gameweek findFirstOrThrow + */ + export type GameweekFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter, which Gameweek to fetch. + */ + where?: GameweekWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Gameweeks to fetch. + */ + orderBy?: GameweekOrderByWithRelationInput | GameweekOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Gameweeks. + */ + cursor?: GameweekWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Gameweeks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Gameweeks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Gameweeks. + */ + distinct?: GameweekScalarFieldEnum | GameweekScalarFieldEnum[] + } + + /** + * Gameweek findMany + */ + export type GameweekFindManyArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter, which Gameweeks to fetch. + */ + where?: GameweekWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Gameweeks to fetch. + */ + orderBy?: GameweekOrderByWithRelationInput | GameweekOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Gameweeks. + */ + cursor?: GameweekWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Gameweeks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Gameweeks. + */ + skip?: number + distinct?: GameweekScalarFieldEnum | GameweekScalarFieldEnum[] + } + + /** + * Gameweek create + */ + export type GameweekCreateArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * The data needed to create a Gameweek. + */ + data: XOR + } + + /** + * Gameweek createMany + */ + export type GameweekCreateManyArgs = { + /** + * The data used to create many Gameweeks. + */ + data: GameweekCreateManyInput | GameweekCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Gameweek createManyAndReturn + */ + export type GameweekCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * The data used to create many Gameweeks. + */ + data: GameweekCreateManyInput | GameweekCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Gameweek update + */ + export type GameweekUpdateArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * The data needed to update a Gameweek. + */ + data: XOR + /** + * Choose, which Gameweek to update. + */ + where: GameweekWhereUniqueInput + } + + /** + * Gameweek updateMany + */ + export type GameweekUpdateManyArgs = { + /** + * The data used to update Gameweeks. + */ + data: XOR + /** + * Filter which Gameweeks to update + */ + where?: GameweekWhereInput + /** + * Limit how many Gameweeks to update. + */ + limit?: number + } + + /** + * Gameweek updateManyAndReturn + */ + export type GameweekUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * The data used to update Gameweeks. + */ + data: XOR + /** + * Filter which Gameweeks to update + */ + where?: GameweekWhereInput + /** + * Limit how many Gameweeks to update. + */ + limit?: number + } + + /** + * Gameweek upsert + */ + export type GameweekUpsertArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * The filter to search for the Gameweek to update in case it exists. + */ + where: GameweekWhereUniqueInput + /** + * In case the Gameweek found by the `where` argument doesn't exist, create a new Gameweek with this data. + */ + create: XOR + /** + * In case the Gameweek was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Gameweek delete + */ + export type GameweekDeleteArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + /** + * Filter which Gameweek to delete. + */ + where: GameweekWhereUniqueInput + } + + /** + * Gameweek deleteMany + */ + export type GameweekDeleteManyArgs = { + /** + * Filter which Gameweeks to delete + */ + where?: GameweekWhereInput + /** + * Limit how many Gameweeks to delete. + */ + limit?: number + } + + /** + * Gameweek without action + */ + export type GameweekDefaultArgs = { + /** + * Select specific fields to fetch from the Gameweek + */ + select?: GameweekSelect | null + /** + * Omit specific fields from the Gameweek + */ + omit?: GameweekOmit | null + } + + + /** + * Model MatchEvent + */ + + export type AggregateMatchEvent = { + _count: MatchEventCountAggregateOutputType | null + _avg: MatchEventAvgAggregateOutputType | null + _sum: MatchEventSumAggregateOutputType | null + _min: MatchEventMinAggregateOutputType | null + _max: MatchEventMaxAggregateOutputType | null + } + + export type MatchEventAvgAggregateOutputType = { + minute: number | null + } + + export type MatchEventSumAggregateOutputType = { + minute: number | null + } + + export type MatchEventMinAggregateOutputType = { + id: string | null + matchId: string | null + playerId: string | null + type: $Enums.EventType | null + minute: number | null + extraInfo: string | null + createdAt: Date | null + } + + export type MatchEventMaxAggregateOutputType = { + id: string | null + matchId: string | null + playerId: string | null + type: $Enums.EventType | null + minute: number | null + extraInfo: string | null + createdAt: Date | null + } + + export type MatchEventCountAggregateOutputType = { + id: number + matchId: number + playerId: number + type: number + minute: number + extraInfo: number + createdAt: number + _all: number + } + + + export type MatchEventAvgAggregateInputType = { + minute?: true + } + + export type MatchEventSumAggregateInputType = { + minute?: true + } + + export type MatchEventMinAggregateInputType = { + id?: true + matchId?: true + playerId?: true + type?: true + minute?: true + extraInfo?: true + createdAt?: true + } + + export type MatchEventMaxAggregateInputType = { + id?: true + matchId?: true + playerId?: true + type?: true + minute?: true + extraInfo?: true + createdAt?: true + } + + export type MatchEventCountAggregateInputType = { + id?: true + matchId?: true + playerId?: true + type?: true + minute?: true + extraInfo?: true + createdAt?: true + _all?: true + } + + export type MatchEventAggregateArgs = { + /** + * Filter which MatchEvent to aggregate. + */ + where?: MatchEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchEvents to fetch. + */ + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MatchEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned MatchEvents + **/ + _count?: true | MatchEventCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: MatchEventAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: MatchEventSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MatchEventMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MatchEventMaxAggregateInputType + } + + export type GetMatchEventAggregateType = { + [P in keyof T & keyof AggregateMatchEvent]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MatchEventGroupByArgs = { + where?: MatchEventWhereInput + orderBy?: MatchEventOrderByWithAggregationInput | MatchEventOrderByWithAggregationInput[] + by: MatchEventScalarFieldEnum[] | MatchEventScalarFieldEnum + having?: MatchEventScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MatchEventCountAggregateInputType | true + _avg?: MatchEventAvgAggregateInputType + _sum?: MatchEventSumAggregateInputType + _min?: MatchEventMinAggregateInputType + _max?: MatchEventMaxAggregateInputType + } + + export type MatchEventGroupByOutputType = { + id: string + matchId: string + playerId: string + type: $Enums.EventType + minute: number | null + extraInfo: string | null + createdAt: Date + _count: MatchEventCountAggregateOutputType | null + _avg: MatchEventAvgAggregateOutputType | null + _sum: MatchEventSumAggregateOutputType | null + _min: MatchEventMinAggregateOutputType | null + _max: MatchEventMaxAggregateOutputType | null + } + + type GetMatchEventGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MatchEventGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MatchEventSelect = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + playerId?: boolean + type?: boolean + minute?: boolean + extraInfo?: boolean + createdAt?: boolean + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + }, ExtArgs["result"]["matchEvent"]> + + export type MatchEventSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + playerId?: boolean + type?: boolean + minute?: boolean + extraInfo?: boolean + createdAt?: boolean + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + }, ExtArgs["result"]["matchEvent"]> + + export type MatchEventSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + playerId?: boolean + type?: boolean + minute?: boolean + extraInfo?: boolean + createdAt?: boolean + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + }, ExtArgs["result"]["matchEvent"]> + + export type MatchEventSelectScalar = { + id?: boolean + matchId?: boolean + playerId?: boolean + type?: boolean + minute?: boolean + extraInfo?: boolean + createdAt?: boolean + } + + export type MatchEventOmit = $Extensions.GetOmit<"id" | "matchId" | "playerId" | "type" | "minute" | "extraInfo" | "createdAt", ExtArgs["result"]["matchEvent"]> + export type MatchEventInclude = { + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + } + export type MatchEventIncludeCreateManyAndReturn = { + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + } + export type MatchEventIncludeUpdateManyAndReturn = { + match?: boolean | MatchDefaultArgs + player?: boolean | PlayerDefaultArgs + } + + export type $MatchEventPayload = { + name: "MatchEvent" + objects: { + match: Prisma.$MatchPayload + player: Prisma.$PlayerPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + matchId: string + playerId: string + type: $Enums.EventType + minute: number | null + extraInfo: string | null + createdAt: Date + }, ExtArgs["result"]["matchEvent"]> + composites: {} + } + + type MatchEventGetPayload = $Result.GetResult + + type MatchEventCountArgs = + Omit & { + select?: MatchEventCountAggregateInputType | true + } + + export interface MatchEventDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MatchEvent'], meta: { name: 'MatchEvent' } } + /** + * Find zero or one MatchEvent that matches the filter. + * @param {MatchEventFindUniqueArgs} args - Arguments to find a MatchEvent + * @example + * // Get one MatchEvent + * const matchEvent = await prisma.matchEvent.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one MatchEvent that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MatchEventFindUniqueOrThrowArgs} args - Arguments to find a MatchEvent + * @example + * // Get one MatchEvent + * const matchEvent = await prisma.matchEvent.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchEvent that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventFindFirstArgs} args - Arguments to find a MatchEvent + * @example + * // Get one MatchEvent + * const matchEvent = await prisma.matchEvent.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchEvent that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventFindFirstOrThrowArgs} args - Arguments to find a MatchEvent + * @example + * // Get one MatchEvent + * const matchEvent = await prisma.matchEvent.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more MatchEvents that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all MatchEvents + * const matchEvents = await prisma.matchEvent.findMany() + * + * // Get first 10 MatchEvents + * const matchEvents = await prisma.matchEvent.findMany({ take: 10 }) + * + * // Only select the `id` + * const matchEventWithIdOnly = await prisma.matchEvent.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a MatchEvent. + * @param {MatchEventCreateArgs} args - Arguments to create a MatchEvent. + * @example + * // Create one MatchEvent + * const MatchEvent = await prisma.matchEvent.create({ + * data: { + * // ... data to create a MatchEvent + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many MatchEvents. + * @param {MatchEventCreateManyArgs} args - Arguments to create many MatchEvents. + * @example + * // Create many MatchEvents + * const matchEvent = await prisma.matchEvent.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many MatchEvents and returns the data saved in the database. + * @param {MatchEventCreateManyAndReturnArgs} args - Arguments to create many MatchEvents. + * @example + * // Create many MatchEvents + * const matchEvent = await prisma.matchEvent.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many MatchEvents and only return the `id` + * const matchEventWithIdOnly = await prisma.matchEvent.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a MatchEvent. + * @param {MatchEventDeleteArgs} args - Arguments to delete one MatchEvent. + * @example + * // Delete one MatchEvent + * const MatchEvent = await prisma.matchEvent.delete({ + * where: { + * // ... filter to delete one MatchEvent + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one MatchEvent. + * @param {MatchEventUpdateArgs} args - Arguments to update one MatchEvent. + * @example + * // Update one MatchEvent + * const matchEvent = await prisma.matchEvent.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more MatchEvents. + * @param {MatchEventDeleteManyArgs} args - Arguments to filter MatchEvents to delete. + * @example + * // Delete a few MatchEvents + * const { count } = await prisma.matchEvent.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many MatchEvents + * const matchEvent = await prisma.matchEvent.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchEvents and returns the data updated in the database. + * @param {MatchEventUpdateManyAndReturnArgs} args - Arguments to update many MatchEvents. + * @example + * // Update many MatchEvents + * const matchEvent = await prisma.matchEvent.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more MatchEvents and only return the `id` + * const matchEventWithIdOnly = await prisma.matchEvent.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one MatchEvent. + * @param {MatchEventUpsertArgs} args - Arguments to update or create a MatchEvent. + * @example + * // Update or create a MatchEvent + * const matchEvent = await prisma.matchEvent.upsert({ + * create: { + * // ... data to create a MatchEvent + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the MatchEvent we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MatchEventClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of MatchEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventCountArgs} args - Arguments to filter MatchEvents to count. + * @example + * // Count the number of MatchEvents + * const count = await prisma.matchEvent.count({ + * where: { + * // ... the filter for the MatchEvents we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a MatchEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by MatchEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchEventGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MatchEventGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MatchEventGroupByArgs['orderBy'] } + : { orderBy?: MatchEventGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMatchEventGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the MatchEvent model + */ + readonly fields: MatchEventFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for MatchEvent. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MatchEventClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + match = {}>(args?: Subset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + player = {}>(args?: Subset>): Prisma__PlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the MatchEvent model + */ + interface MatchEventFieldRefs { + readonly id: FieldRef<"MatchEvent", 'String'> + readonly matchId: FieldRef<"MatchEvent", 'String'> + readonly playerId: FieldRef<"MatchEvent", 'String'> + readonly type: FieldRef<"MatchEvent", 'EventType'> + readonly minute: FieldRef<"MatchEvent", 'Int'> + readonly extraInfo: FieldRef<"MatchEvent", 'String'> + readonly createdAt: FieldRef<"MatchEvent", 'DateTime'> + } + + + // Custom InputTypes + /** + * MatchEvent findUnique + */ + export type MatchEventFindUniqueArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter, which MatchEvent to fetch. + */ + where: MatchEventWhereUniqueInput + } + + /** + * MatchEvent findUniqueOrThrow + */ + export type MatchEventFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter, which MatchEvent to fetch. + */ + where: MatchEventWhereUniqueInput + } + + /** + * MatchEvent findFirst + */ + export type MatchEventFindFirstArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter, which MatchEvent to fetch. + */ + where?: MatchEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchEvents to fetch. + */ + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchEvents. + */ + cursor?: MatchEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchEvents. + */ + distinct?: MatchEventScalarFieldEnum | MatchEventScalarFieldEnum[] + } + + /** + * MatchEvent findFirstOrThrow + */ + export type MatchEventFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter, which MatchEvent to fetch. + */ + where?: MatchEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchEvents to fetch. + */ + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchEvents. + */ + cursor?: MatchEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchEvents. + */ + distinct?: MatchEventScalarFieldEnum | MatchEventScalarFieldEnum[] + } + + /** + * MatchEvent findMany + */ + export type MatchEventFindManyArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter, which MatchEvents to fetch. + */ + where?: MatchEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchEvents to fetch. + */ + orderBy?: MatchEventOrderByWithRelationInput | MatchEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing MatchEvents. + */ + cursor?: MatchEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchEvents from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchEvents. + */ + skip?: number + distinct?: MatchEventScalarFieldEnum | MatchEventScalarFieldEnum[] + } + + /** + * MatchEvent create + */ + export type MatchEventCreateArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * The data needed to create a MatchEvent. + */ + data: XOR + } + + /** + * MatchEvent createMany + */ + export type MatchEventCreateManyArgs = { + /** + * The data used to create many MatchEvents. + */ + data: MatchEventCreateManyInput | MatchEventCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * MatchEvent createManyAndReturn + */ + export type MatchEventCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelectCreateManyAndReturn | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * The data used to create many MatchEvents. + */ + data: MatchEventCreateManyInput | MatchEventCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventIncludeCreateManyAndReturn | null + } + + /** + * MatchEvent update + */ + export type MatchEventUpdateArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * The data needed to update a MatchEvent. + */ + data: XOR + /** + * Choose, which MatchEvent to update. + */ + where: MatchEventWhereUniqueInput + } + + /** + * MatchEvent updateMany + */ + export type MatchEventUpdateManyArgs = { + /** + * The data used to update MatchEvents. + */ + data: XOR + /** + * Filter which MatchEvents to update + */ + where?: MatchEventWhereInput + /** + * Limit how many MatchEvents to update. + */ + limit?: number + } + + /** + * MatchEvent updateManyAndReturn + */ + export type MatchEventUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * The data used to update MatchEvents. + */ + data: XOR + /** + * Filter which MatchEvents to update + */ + where?: MatchEventWhereInput + /** + * Limit how many MatchEvents to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventIncludeUpdateManyAndReturn | null + } + + /** + * MatchEvent upsert + */ + export type MatchEventUpsertArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * The filter to search for the MatchEvent to update in case it exists. + */ + where: MatchEventWhereUniqueInput + /** + * In case the MatchEvent found by the `where` argument doesn't exist, create a new MatchEvent with this data. + */ + create: XOR + /** + * In case the MatchEvent was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * MatchEvent delete + */ + export type MatchEventDeleteArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + /** + * Filter which MatchEvent to delete. + */ + where: MatchEventWhereUniqueInput + } + + /** + * MatchEvent deleteMany + */ + export type MatchEventDeleteManyArgs = { + /** + * Filter which MatchEvents to delete + */ + where?: MatchEventWhereInput + /** + * Limit how many MatchEvents to delete. + */ + limit?: number + } + + /** + * MatchEvent without action + */ + export type MatchEventDefaultArgs = { + /** + * Select specific fields to fetch from the MatchEvent + */ + select?: MatchEventSelect | null + /** + * Omit specific fields from the MatchEvent + */ + omit?: MatchEventOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchEventInclude | null + } + + + /** + * Model MatchLineup + */ + + export type AggregateMatchLineup = { + _count: MatchLineupCountAggregateOutputType | null + _min: MatchLineupMinAggregateOutputType | null + _max: MatchLineupMaxAggregateOutputType | null + } + + export type MatchLineupMinAggregateOutputType = { + id: string | null + matchId: string | null + countryId: string | null + formation: string | null + } + + export type MatchLineupMaxAggregateOutputType = { + id: string | null + matchId: string | null + countryId: string | null + formation: string | null + } + + export type MatchLineupCountAggregateOutputType = { + id: number + matchId: number + countryId: number + formation: number + playerIds: number + _all: number + } + + + export type MatchLineupMinAggregateInputType = { + id?: true + matchId?: true + countryId?: true + formation?: true + } + + export type MatchLineupMaxAggregateInputType = { + id?: true + matchId?: true + countryId?: true + formation?: true + } + + export type MatchLineupCountAggregateInputType = { + id?: true + matchId?: true + countryId?: true + formation?: true + playerIds?: true + _all?: true + } + + export type MatchLineupAggregateArgs = { + /** + * Filter which MatchLineup to aggregate. + */ + where?: MatchLineupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchLineups to fetch. + */ + orderBy?: MatchLineupOrderByWithRelationInput | MatchLineupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MatchLineupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchLineups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchLineups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned MatchLineups + **/ + _count?: true | MatchLineupCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MatchLineupMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MatchLineupMaxAggregateInputType + } + + export type GetMatchLineupAggregateType = { + [P in keyof T & keyof AggregateMatchLineup]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MatchLineupGroupByArgs = { + where?: MatchLineupWhereInput + orderBy?: MatchLineupOrderByWithAggregationInput | MatchLineupOrderByWithAggregationInput[] + by: MatchLineupScalarFieldEnum[] | MatchLineupScalarFieldEnum + having?: MatchLineupScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MatchLineupCountAggregateInputType | true + _min?: MatchLineupMinAggregateInputType + _max?: MatchLineupMaxAggregateInputType + } + + export type MatchLineupGroupByOutputType = { + id: string + matchId: string + countryId: string + formation: string + playerIds: string[] + _count: MatchLineupCountAggregateOutputType | null + _min: MatchLineupMinAggregateOutputType | null + _max: MatchLineupMaxAggregateOutputType | null + } + + type GetMatchLineupGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MatchLineupGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MatchLineupSelect = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + countryId?: boolean + formation?: boolean + playerIds?: boolean + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["matchLineup"]> + + export type MatchLineupSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + countryId?: boolean + formation?: boolean + playerIds?: boolean + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["matchLineup"]> + + export type MatchLineupSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + matchId?: boolean + countryId?: boolean + formation?: boolean + playerIds?: boolean + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["matchLineup"]> + + export type MatchLineupSelectScalar = { + id?: boolean + matchId?: boolean + countryId?: boolean + formation?: boolean + playerIds?: boolean + } + + export type MatchLineupOmit = $Extensions.GetOmit<"id" | "matchId" | "countryId" | "formation" | "playerIds", ExtArgs["result"]["matchLineup"]> + export type MatchLineupInclude = { + match?: boolean | MatchDefaultArgs + } + export type MatchLineupIncludeCreateManyAndReturn = { + match?: boolean | MatchDefaultArgs + } + export type MatchLineupIncludeUpdateManyAndReturn = { + match?: boolean | MatchDefaultArgs + } + + export type $MatchLineupPayload = { + name: "MatchLineup" + objects: { + match: Prisma.$MatchPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + matchId: string + countryId: string + formation: string + playerIds: string[] + }, ExtArgs["result"]["matchLineup"]> + composites: {} + } + + type MatchLineupGetPayload = $Result.GetResult + + type MatchLineupCountArgs = + Omit & { + select?: MatchLineupCountAggregateInputType | true + } + + export interface MatchLineupDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['MatchLineup'], meta: { name: 'MatchLineup' } } + /** + * Find zero or one MatchLineup that matches the filter. + * @param {MatchLineupFindUniqueArgs} args - Arguments to find a MatchLineup + * @example + * // Get one MatchLineup + * const matchLineup = await prisma.matchLineup.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one MatchLineup that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MatchLineupFindUniqueOrThrowArgs} args - Arguments to find a MatchLineup + * @example + * // Get one MatchLineup + * const matchLineup = await prisma.matchLineup.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchLineup that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupFindFirstArgs} args - Arguments to find a MatchLineup + * @example + * // Get one MatchLineup + * const matchLineup = await prisma.matchLineup.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first MatchLineup that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupFindFirstOrThrowArgs} args - Arguments to find a MatchLineup + * @example + * // Get one MatchLineup + * const matchLineup = await prisma.matchLineup.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more MatchLineups that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all MatchLineups + * const matchLineups = await prisma.matchLineup.findMany() + * + * // Get first 10 MatchLineups + * const matchLineups = await prisma.matchLineup.findMany({ take: 10 }) + * + * // Only select the `id` + * const matchLineupWithIdOnly = await prisma.matchLineup.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a MatchLineup. + * @param {MatchLineupCreateArgs} args - Arguments to create a MatchLineup. + * @example + * // Create one MatchLineup + * const MatchLineup = await prisma.matchLineup.create({ + * data: { + * // ... data to create a MatchLineup + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many MatchLineups. + * @param {MatchLineupCreateManyArgs} args - Arguments to create many MatchLineups. + * @example + * // Create many MatchLineups + * const matchLineup = await prisma.matchLineup.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many MatchLineups and returns the data saved in the database. + * @param {MatchLineupCreateManyAndReturnArgs} args - Arguments to create many MatchLineups. + * @example + * // Create many MatchLineups + * const matchLineup = await prisma.matchLineup.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many MatchLineups and only return the `id` + * const matchLineupWithIdOnly = await prisma.matchLineup.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a MatchLineup. + * @param {MatchLineupDeleteArgs} args - Arguments to delete one MatchLineup. + * @example + * // Delete one MatchLineup + * const MatchLineup = await prisma.matchLineup.delete({ + * where: { + * // ... filter to delete one MatchLineup + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one MatchLineup. + * @param {MatchLineupUpdateArgs} args - Arguments to update one MatchLineup. + * @example + * // Update one MatchLineup + * const matchLineup = await prisma.matchLineup.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more MatchLineups. + * @param {MatchLineupDeleteManyArgs} args - Arguments to filter MatchLineups to delete. + * @example + * // Delete a few MatchLineups + * const { count } = await prisma.matchLineup.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchLineups. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many MatchLineups + * const matchLineup = await prisma.matchLineup.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more MatchLineups and returns the data updated in the database. + * @param {MatchLineupUpdateManyAndReturnArgs} args - Arguments to update many MatchLineups. + * @example + * // Update many MatchLineups + * const matchLineup = await prisma.matchLineup.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more MatchLineups and only return the `id` + * const matchLineupWithIdOnly = await prisma.matchLineup.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one MatchLineup. + * @param {MatchLineupUpsertArgs} args - Arguments to update or create a MatchLineup. + * @example + * // Update or create a MatchLineup + * const matchLineup = await prisma.matchLineup.upsert({ + * create: { + * // ... data to create a MatchLineup + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the MatchLineup we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MatchLineupClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of MatchLineups. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupCountArgs} args - Arguments to filter MatchLineups to count. + * @example + * // Count the number of MatchLineups + * const count = await prisma.matchLineup.count({ + * where: { + * // ... the filter for the MatchLineups we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a MatchLineup. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by MatchLineup. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MatchLineupGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends MatchLineupGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MatchLineupGroupByArgs['orderBy'] } + : { orderBy?: MatchLineupGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMatchLineupGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the MatchLineup model + */ + readonly fields: MatchLineupFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for MatchLineup. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MatchLineupClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + match = {}>(args?: Subset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the MatchLineup model + */ + interface MatchLineupFieldRefs { + readonly id: FieldRef<"MatchLineup", 'String'> + readonly matchId: FieldRef<"MatchLineup", 'String'> + readonly countryId: FieldRef<"MatchLineup", 'String'> + readonly formation: FieldRef<"MatchLineup", 'String'> + readonly playerIds: FieldRef<"MatchLineup", 'String[]'> + } + + + // Custom InputTypes + /** + * MatchLineup findUnique + */ + export type MatchLineupFindUniqueArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter, which MatchLineup to fetch. + */ + where: MatchLineupWhereUniqueInput + } + + /** + * MatchLineup findUniqueOrThrow + */ + export type MatchLineupFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter, which MatchLineup to fetch. + */ + where: MatchLineupWhereUniqueInput + } + + /** + * MatchLineup findFirst + */ + export type MatchLineupFindFirstArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter, which MatchLineup to fetch. + */ + where?: MatchLineupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchLineups to fetch. + */ + orderBy?: MatchLineupOrderByWithRelationInput | MatchLineupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchLineups. + */ + cursor?: MatchLineupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchLineups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchLineups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchLineups. + */ + distinct?: MatchLineupScalarFieldEnum | MatchLineupScalarFieldEnum[] + } + + /** + * MatchLineup findFirstOrThrow + */ + export type MatchLineupFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter, which MatchLineup to fetch. + */ + where?: MatchLineupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchLineups to fetch. + */ + orderBy?: MatchLineupOrderByWithRelationInput | MatchLineupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for MatchLineups. + */ + cursor?: MatchLineupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchLineups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchLineups. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of MatchLineups. + */ + distinct?: MatchLineupScalarFieldEnum | MatchLineupScalarFieldEnum[] + } + + /** + * MatchLineup findMany + */ + export type MatchLineupFindManyArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter, which MatchLineups to fetch. + */ + where?: MatchLineupWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of MatchLineups to fetch. + */ + orderBy?: MatchLineupOrderByWithRelationInput | MatchLineupOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing MatchLineups. + */ + cursor?: MatchLineupWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` MatchLineups from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` MatchLineups. + */ + skip?: number + distinct?: MatchLineupScalarFieldEnum | MatchLineupScalarFieldEnum[] + } + + /** + * MatchLineup create + */ + export type MatchLineupCreateArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * The data needed to create a MatchLineup. + */ + data: XOR + } + + /** + * MatchLineup createMany + */ + export type MatchLineupCreateManyArgs = { + /** + * The data used to create many MatchLineups. + */ + data: MatchLineupCreateManyInput | MatchLineupCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * MatchLineup createManyAndReturn + */ + export type MatchLineupCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelectCreateManyAndReturn | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * The data used to create many MatchLineups. + */ + data: MatchLineupCreateManyInput | MatchLineupCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupIncludeCreateManyAndReturn | null + } + + /** + * MatchLineup update + */ + export type MatchLineupUpdateArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * The data needed to update a MatchLineup. + */ + data: XOR + /** + * Choose, which MatchLineup to update. + */ + where: MatchLineupWhereUniqueInput + } + + /** + * MatchLineup updateMany + */ + export type MatchLineupUpdateManyArgs = { + /** + * The data used to update MatchLineups. + */ + data: XOR + /** + * Filter which MatchLineups to update + */ + where?: MatchLineupWhereInput + /** + * Limit how many MatchLineups to update. + */ + limit?: number + } + + /** + * MatchLineup updateManyAndReturn + */ + export type MatchLineupUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * The data used to update MatchLineups. + */ + data: XOR + /** + * Filter which MatchLineups to update + */ + where?: MatchLineupWhereInput + /** + * Limit how many MatchLineups to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupIncludeUpdateManyAndReturn | null + } + + /** + * MatchLineup upsert + */ + export type MatchLineupUpsertArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * The filter to search for the MatchLineup to update in case it exists. + */ + where: MatchLineupWhereUniqueInput + /** + * In case the MatchLineup found by the `where` argument doesn't exist, create a new MatchLineup with this data. + */ + create: XOR + /** + * In case the MatchLineup was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * MatchLineup delete + */ + export type MatchLineupDeleteArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + /** + * Filter which MatchLineup to delete. + */ + where: MatchLineupWhereUniqueInput + } + + /** + * MatchLineup deleteMany + */ + export type MatchLineupDeleteManyArgs = { + /** + * Filter which MatchLineups to delete + */ + where?: MatchLineupWhereInput + /** + * Limit how many MatchLineups to delete. + */ + limit?: number + } + + /** + * MatchLineup without action + */ + export type MatchLineupDefaultArgs = { + /** + * Select specific fields to fetch from the MatchLineup + */ + select?: MatchLineupSelect | null + /** + * Omit specific fields from the MatchLineup + */ + omit?: MatchLineupOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MatchLineupInclude | null + } + + + /** + * Model PlayerMatchStat + */ + + export type AggregatePlayerMatchStat = { + _count: PlayerMatchStatCountAggregateOutputType | null + _avg: PlayerMatchStatAvgAggregateOutputType | null + _sum: PlayerMatchStatSumAggregateOutputType | null + _min: PlayerMatchStatMinAggregateOutputType | null + _max: PlayerMatchStatMaxAggregateOutputType | null + } + + export type PlayerMatchStatAvgAggregateOutputType = { + goals: number | null + assists: number | null + yellowCards: number | null + redCards: number | null + minutesPlayed: number | null + penaltySaved: number | null + penaltyMissed: number | null + ownGoals: number | null + extraTimeBonus: number | null + points: number | null + } + + export type PlayerMatchStatSumAggregateOutputType = { + goals: number | null + assists: number | null + yellowCards: number | null + redCards: number | null + minutesPlayed: number | null + penaltySaved: number | null + penaltyMissed: number | null + ownGoals: number | null + extraTimeBonus: number | null + points: number | null + } + + export type PlayerMatchStatMinAggregateOutputType = { + id: string | null + playerId: string | null + matchId: string | null + goals: number | null + assists: number | null + yellowCards: number | null + redCards: number | null + minutesPlayed: number | null + cleanSheet: boolean | null + penaltySaved: number | null + penaltyMissed: number | null + ownGoals: number | null + isMotm: boolean | null + extraTimeBonus: number | null + points: number | null + } + + export type PlayerMatchStatMaxAggregateOutputType = { + id: string | null + playerId: string | null + matchId: string | null + goals: number | null + assists: number | null + yellowCards: number | null + redCards: number | null + minutesPlayed: number | null + cleanSheet: boolean | null + penaltySaved: number | null + penaltyMissed: number | null + ownGoals: number | null + isMotm: boolean | null + extraTimeBonus: number | null + points: number | null + } + + export type PlayerMatchStatCountAggregateOutputType = { + id: number + playerId: number + matchId: number + goals: number + assists: number + yellowCards: number + redCards: number + minutesPlayed: number + cleanSheet: number + penaltySaved: number + penaltyMissed: number + ownGoals: number + isMotm: number + extraTimeBonus: number + points: number + _all: number + } + + + export type PlayerMatchStatAvgAggregateInputType = { + goals?: true + assists?: true + yellowCards?: true + redCards?: true + minutesPlayed?: true + penaltySaved?: true + penaltyMissed?: true + ownGoals?: true + extraTimeBonus?: true + points?: true + } + + export type PlayerMatchStatSumAggregateInputType = { + goals?: true + assists?: true + yellowCards?: true + redCards?: true + minutesPlayed?: true + penaltySaved?: true + penaltyMissed?: true + ownGoals?: true + extraTimeBonus?: true + points?: true + } + + export type PlayerMatchStatMinAggregateInputType = { + id?: true + playerId?: true + matchId?: true + goals?: true + assists?: true + yellowCards?: true + redCards?: true + minutesPlayed?: true + cleanSheet?: true + penaltySaved?: true + penaltyMissed?: true + ownGoals?: true + isMotm?: true + extraTimeBonus?: true + points?: true + } + + export type PlayerMatchStatMaxAggregateInputType = { + id?: true + playerId?: true + matchId?: true + goals?: true + assists?: true + yellowCards?: true + redCards?: true + minutesPlayed?: true + cleanSheet?: true + penaltySaved?: true + penaltyMissed?: true + ownGoals?: true + isMotm?: true + extraTimeBonus?: true + points?: true + } + + export type PlayerMatchStatCountAggregateInputType = { + id?: true + playerId?: true + matchId?: true + goals?: true + assists?: true + yellowCards?: true + redCards?: true + minutesPlayed?: true + cleanSheet?: true + penaltySaved?: true + penaltyMissed?: true + ownGoals?: true + isMotm?: true + extraTimeBonus?: true + points?: true + _all?: true + } + + export type PlayerMatchStatAggregateArgs = { + /** + * Filter which PlayerMatchStat to aggregate. + */ + where?: PlayerMatchStatWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PlayerMatchStats to fetch. + */ + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PlayerMatchStatWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PlayerMatchStats from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` PlayerMatchStats. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned PlayerMatchStats + **/ + _count?: true | PlayerMatchStatCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PlayerMatchStatAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PlayerMatchStatSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PlayerMatchStatMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PlayerMatchStatMaxAggregateInputType + } + + export type GetPlayerMatchStatAggregateType = { + [P in keyof T & keyof AggregatePlayerMatchStat]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PlayerMatchStatGroupByArgs = { + where?: PlayerMatchStatWhereInput + orderBy?: PlayerMatchStatOrderByWithAggregationInput | PlayerMatchStatOrderByWithAggregationInput[] + by: PlayerMatchStatScalarFieldEnum[] | PlayerMatchStatScalarFieldEnum + having?: PlayerMatchStatScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PlayerMatchStatCountAggregateInputType | true + _avg?: PlayerMatchStatAvgAggregateInputType + _sum?: PlayerMatchStatSumAggregateInputType + _min?: PlayerMatchStatMinAggregateInputType + _max?: PlayerMatchStatMaxAggregateInputType + } + + export type PlayerMatchStatGroupByOutputType = { + id: string + playerId: string + matchId: string + goals: number + assists: number + yellowCards: number + redCards: number + minutesPlayed: number + cleanSheet: boolean + penaltySaved: number + penaltyMissed: number + ownGoals: number + isMotm: boolean + extraTimeBonus: number + points: number + _count: PlayerMatchStatCountAggregateOutputType | null + _avg: PlayerMatchStatAvgAggregateOutputType | null + _sum: PlayerMatchStatSumAggregateOutputType | null + _min: PlayerMatchStatMinAggregateOutputType | null + _max: PlayerMatchStatMaxAggregateOutputType | null + } + + type GetPlayerMatchStatGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PlayerMatchStatGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PlayerMatchStatSelect = $Extensions.GetSelect<{ + id?: boolean + playerId?: boolean + matchId?: boolean + goals?: boolean + assists?: boolean + yellowCards?: boolean + redCards?: boolean + minutesPlayed?: boolean + cleanSheet?: boolean + penaltySaved?: boolean + penaltyMissed?: boolean + ownGoals?: boolean + isMotm?: boolean + extraTimeBonus?: boolean + points?: boolean + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["playerMatchStat"]> + + export type PlayerMatchStatSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + playerId?: boolean + matchId?: boolean + goals?: boolean + assists?: boolean + yellowCards?: boolean + redCards?: boolean + minutesPlayed?: boolean + cleanSheet?: boolean + penaltySaved?: boolean + penaltyMissed?: boolean + ownGoals?: boolean + isMotm?: boolean + extraTimeBonus?: boolean + points?: boolean + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["playerMatchStat"]> + + export type PlayerMatchStatSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + playerId?: boolean + matchId?: boolean + goals?: boolean + assists?: boolean + yellowCards?: boolean + redCards?: boolean + minutesPlayed?: boolean + cleanSheet?: boolean + penaltySaved?: boolean + penaltyMissed?: boolean + ownGoals?: boolean + isMotm?: boolean + extraTimeBonus?: boolean + points?: boolean + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + }, ExtArgs["result"]["playerMatchStat"]> + + export type PlayerMatchStatSelectScalar = { + id?: boolean + playerId?: boolean + matchId?: boolean + goals?: boolean + assists?: boolean + yellowCards?: boolean + redCards?: boolean + minutesPlayed?: boolean + cleanSheet?: boolean + penaltySaved?: boolean + penaltyMissed?: boolean + ownGoals?: boolean + isMotm?: boolean + extraTimeBonus?: boolean + points?: boolean + } + + export type PlayerMatchStatOmit = $Extensions.GetOmit<"id" | "playerId" | "matchId" | "goals" | "assists" | "yellowCards" | "redCards" | "minutesPlayed" | "cleanSheet" | "penaltySaved" | "penaltyMissed" | "ownGoals" | "isMotm" | "extraTimeBonus" | "points", ExtArgs["result"]["playerMatchStat"]> + export type PlayerMatchStatInclude = { + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + } + export type PlayerMatchStatIncludeCreateManyAndReturn = { + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + } + export type PlayerMatchStatIncludeUpdateManyAndReturn = { + player?: boolean | PlayerDefaultArgs + match?: boolean | MatchDefaultArgs + } + + export type $PlayerMatchStatPayload = { + name: "PlayerMatchStat" + objects: { + player: Prisma.$PlayerPayload + match: Prisma.$MatchPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + playerId: string + matchId: string + goals: number + assists: number + yellowCards: number + redCards: number + minutesPlayed: number + cleanSheet: boolean + penaltySaved: number + penaltyMissed: number + ownGoals: number + isMotm: boolean + extraTimeBonus: number + points: number + }, ExtArgs["result"]["playerMatchStat"]> + composites: {} + } + + type PlayerMatchStatGetPayload = $Result.GetResult + + type PlayerMatchStatCountArgs = + Omit & { + select?: PlayerMatchStatCountAggregateInputType | true + } + + export interface PlayerMatchStatDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['PlayerMatchStat'], meta: { name: 'PlayerMatchStat' } } + /** + * Find zero or one PlayerMatchStat that matches the filter. + * @param {PlayerMatchStatFindUniqueArgs} args - Arguments to find a PlayerMatchStat + * @example + * // Get one PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one PlayerMatchStat that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PlayerMatchStatFindUniqueOrThrowArgs} args - Arguments to find a PlayerMatchStat + * @example + * // Get one PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first PlayerMatchStat that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatFindFirstArgs} args - Arguments to find a PlayerMatchStat + * @example + * // Get one PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first PlayerMatchStat that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatFindFirstOrThrowArgs} args - Arguments to find a PlayerMatchStat + * @example + * // Get one PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more PlayerMatchStats that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all PlayerMatchStats + * const playerMatchStats = await prisma.playerMatchStat.findMany() + * + * // Get first 10 PlayerMatchStats + * const playerMatchStats = await prisma.playerMatchStat.findMany({ take: 10 }) + * + * // Only select the `id` + * const playerMatchStatWithIdOnly = await prisma.playerMatchStat.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a PlayerMatchStat. + * @param {PlayerMatchStatCreateArgs} args - Arguments to create a PlayerMatchStat. + * @example + * // Create one PlayerMatchStat + * const PlayerMatchStat = await prisma.playerMatchStat.create({ + * data: { + * // ... data to create a PlayerMatchStat + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many PlayerMatchStats. + * @param {PlayerMatchStatCreateManyArgs} args - Arguments to create many PlayerMatchStats. + * @example + * // Create many PlayerMatchStats + * const playerMatchStat = await prisma.playerMatchStat.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many PlayerMatchStats and returns the data saved in the database. + * @param {PlayerMatchStatCreateManyAndReturnArgs} args - Arguments to create many PlayerMatchStats. + * @example + * // Create many PlayerMatchStats + * const playerMatchStat = await prisma.playerMatchStat.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many PlayerMatchStats and only return the `id` + * const playerMatchStatWithIdOnly = await prisma.playerMatchStat.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a PlayerMatchStat. + * @param {PlayerMatchStatDeleteArgs} args - Arguments to delete one PlayerMatchStat. + * @example + * // Delete one PlayerMatchStat + * const PlayerMatchStat = await prisma.playerMatchStat.delete({ + * where: { + * // ... filter to delete one PlayerMatchStat + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one PlayerMatchStat. + * @param {PlayerMatchStatUpdateArgs} args - Arguments to update one PlayerMatchStat. + * @example + * // Update one PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more PlayerMatchStats. + * @param {PlayerMatchStatDeleteManyArgs} args - Arguments to filter PlayerMatchStats to delete. + * @example + * // Delete a few PlayerMatchStats + * const { count } = await prisma.playerMatchStat.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more PlayerMatchStats. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many PlayerMatchStats + * const playerMatchStat = await prisma.playerMatchStat.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more PlayerMatchStats and returns the data updated in the database. + * @param {PlayerMatchStatUpdateManyAndReturnArgs} args - Arguments to update many PlayerMatchStats. + * @example + * // Update many PlayerMatchStats + * const playerMatchStat = await prisma.playerMatchStat.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more PlayerMatchStats and only return the `id` + * const playerMatchStatWithIdOnly = await prisma.playerMatchStat.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one PlayerMatchStat. + * @param {PlayerMatchStatUpsertArgs} args - Arguments to update or create a PlayerMatchStat. + * @example + * // Update or create a PlayerMatchStat + * const playerMatchStat = await prisma.playerMatchStat.upsert({ + * create: { + * // ... data to create a PlayerMatchStat + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the PlayerMatchStat we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PlayerMatchStatClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of PlayerMatchStats. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatCountArgs} args - Arguments to filter PlayerMatchStats to count. + * @example + * // Count the number of PlayerMatchStats + * const count = await prisma.playerMatchStat.count({ + * where: { + * // ... the filter for the PlayerMatchStats we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a PlayerMatchStat. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by PlayerMatchStat. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerMatchStatGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PlayerMatchStatGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PlayerMatchStatGroupByArgs['orderBy'] } + : { orderBy?: PlayerMatchStatGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPlayerMatchStatGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the PlayerMatchStat model + */ + readonly fields: PlayerMatchStatFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for PlayerMatchStat. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PlayerMatchStatClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + player = {}>(args?: Subset>): Prisma__PlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + match = {}>(args?: Subset>): Prisma__MatchClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the PlayerMatchStat model + */ + interface PlayerMatchStatFieldRefs { + readonly id: FieldRef<"PlayerMatchStat", 'String'> + readonly playerId: FieldRef<"PlayerMatchStat", 'String'> + readonly matchId: FieldRef<"PlayerMatchStat", 'String'> + readonly goals: FieldRef<"PlayerMatchStat", 'Int'> + readonly assists: FieldRef<"PlayerMatchStat", 'Int'> + readonly yellowCards: FieldRef<"PlayerMatchStat", 'Int'> + readonly redCards: FieldRef<"PlayerMatchStat", 'Int'> + readonly minutesPlayed: FieldRef<"PlayerMatchStat", 'Int'> + readonly cleanSheet: FieldRef<"PlayerMatchStat", 'Boolean'> + readonly penaltySaved: FieldRef<"PlayerMatchStat", 'Int'> + readonly penaltyMissed: FieldRef<"PlayerMatchStat", 'Int'> + readonly ownGoals: FieldRef<"PlayerMatchStat", 'Int'> + readonly isMotm: FieldRef<"PlayerMatchStat", 'Boolean'> + readonly extraTimeBonus: FieldRef<"PlayerMatchStat", 'Int'> + readonly points: FieldRef<"PlayerMatchStat", 'Int'> + } + + + // Custom InputTypes + /** + * PlayerMatchStat findUnique + */ + export type PlayerMatchStatFindUniqueArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter, which PlayerMatchStat to fetch. + */ + where: PlayerMatchStatWhereUniqueInput + } + + /** + * PlayerMatchStat findUniqueOrThrow + */ + export type PlayerMatchStatFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter, which PlayerMatchStat to fetch. + */ + where: PlayerMatchStatWhereUniqueInput + } + + /** + * PlayerMatchStat findFirst + */ + export type PlayerMatchStatFindFirstArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter, which PlayerMatchStat to fetch. + */ + where?: PlayerMatchStatWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PlayerMatchStats to fetch. + */ + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PlayerMatchStats. + */ + cursor?: PlayerMatchStatWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PlayerMatchStats from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` PlayerMatchStats. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PlayerMatchStats. + */ + distinct?: PlayerMatchStatScalarFieldEnum | PlayerMatchStatScalarFieldEnum[] + } + + /** + * PlayerMatchStat findFirstOrThrow + */ + export type PlayerMatchStatFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter, which PlayerMatchStat to fetch. + */ + where?: PlayerMatchStatWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PlayerMatchStats to fetch. + */ + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PlayerMatchStats. + */ + cursor?: PlayerMatchStatWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PlayerMatchStats from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` PlayerMatchStats. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PlayerMatchStats. + */ + distinct?: PlayerMatchStatScalarFieldEnum | PlayerMatchStatScalarFieldEnum[] + } + + /** + * PlayerMatchStat findMany + */ + export type PlayerMatchStatFindManyArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter, which PlayerMatchStats to fetch. + */ + where?: PlayerMatchStatWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PlayerMatchStats to fetch. + */ + orderBy?: PlayerMatchStatOrderByWithRelationInput | PlayerMatchStatOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing PlayerMatchStats. + */ + cursor?: PlayerMatchStatWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PlayerMatchStats from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` PlayerMatchStats. + */ + skip?: number + distinct?: PlayerMatchStatScalarFieldEnum | PlayerMatchStatScalarFieldEnum[] + } + + /** + * PlayerMatchStat create + */ + export type PlayerMatchStatCreateArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * The data needed to create a PlayerMatchStat. + */ + data: XOR + } + + /** + * PlayerMatchStat createMany + */ + export type PlayerMatchStatCreateManyArgs = { + /** + * The data used to create many PlayerMatchStats. + */ + data: PlayerMatchStatCreateManyInput | PlayerMatchStatCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * PlayerMatchStat createManyAndReturn + */ + export type PlayerMatchStatCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelectCreateManyAndReturn | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * The data used to create many PlayerMatchStats. + */ + data: PlayerMatchStatCreateManyInput | PlayerMatchStatCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatIncludeCreateManyAndReturn | null + } + + /** + * PlayerMatchStat update + */ + export type PlayerMatchStatUpdateArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * The data needed to update a PlayerMatchStat. + */ + data: XOR + /** + * Choose, which PlayerMatchStat to update. + */ + where: PlayerMatchStatWhereUniqueInput + } + + /** + * PlayerMatchStat updateMany + */ + export type PlayerMatchStatUpdateManyArgs = { + /** + * The data used to update PlayerMatchStats. + */ + data: XOR + /** + * Filter which PlayerMatchStats to update + */ + where?: PlayerMatchStatWhereInput + /** + * Limit how many PlayerMatchStats to update. + */ + limit?: number + } + + /** + * PlayerMatchStat updateManyAndReturn + */ + export type PlayerMatchStatUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * The data used to update PlayerMatchStats. + */ + data: XOR + /** + * Filter which PlayerMatchStats to update + */ + where?: PlayerMatchStatWhereInput + /** + * Limit how many PlayerMatchStats to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatIncludeUpdateManyAndReturn | null + } + + /** + * PlayerMatchStat upsert + */ + export type PlayerMatchStatUpsertArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * The filter to search for the PlayerMatchStat to update in case it exists. + */ + where: PlayerMatchStatWhereUniqueInput + /** + * In case the PlayerMatchStat found by the `where` argument doesn't exist, create a new PlayerMatchStat with this data. + */ + create: XOR + /** + * In case the PlayerMatchStat was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * PlayerMatchStat delete + */ + export type PlayerMatchStatDeleteArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + /** + * Filter which PlayerMatchStat to delete. + */ + where: PlayerMatchStatWhereUniqueInput + } + + /** + * PlayerMatchStat deleteMany + */ + export type PlayerMatchStatDeleteManyArgs = { + /** + * Filter which PlayerMatchStats to delete + */ + where?: PlayerMatchStatWhereInput + /** + * Limit how many PlayerMatchStats to delete. + */ + limit?: number + } + + /** + * PlayerMatchStat without action + */ + export type PlayerMatchStatDefaultArgs = { + /** + * Select specific fields to fetch from the PlayerMatchStat + */ + select?: PlayerMatchStatSelect | null + /** + * Omit specific fields from the PlayerMatchStat + */ + omit?: PlayerMatchStatOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PlayerMatchStatInclude | null + } + + + /** + * Model ScoringRule + */ + + export type AggregateScoringRule = { + _count: ScoringRuleCountAggregateOutputType | null + _avg: ScoringRuleAvgAggregateOutputType | null + _sum: ScoringRuleSumAggregateOutputType | null + _min: ScoringRuleMinAggregateOutputType | null + _max: ScoringRuleMaxAggregateOutputType | null + } + + export type ScoringRuleAvgAggregateOutputType = { + points: number | null + } + + export type ScoringRuleSumAggregateOutputType = { + points: number | null + } + + export type ScoringRuleMinAggregateOutputType = { + id: string | null + position: $Enums.Position | null + eventType: $Enums.EventType | null + points: number | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ScoringRuleMaxAggregateOutputType = { + id: string | null + position: $Enums.Position | null + eventType: $Enums.EventType | null + points: number | null + updatedAt: Date | null + updatedBy: string | null + } + + export type ScoringRuleCountAggregateOutputType = { + id: number + position: number + eventType: number + points: number + updatedAt: number + updatedBy: number + _all: number + } + + + export type ScoringRuleAvgAggregateInputType = { + points?: true + } + + export type ScoringRuleSumAggregateInputType = { + points?: true + } + + export type ScoringRuleMinAggregateInputType = { + id?: true + position?: true + eventType?: true + points?: true + updatedAt?: true + updatedBy?: true + } + + export type ScoringRuleMaxAggregateInputType = { + id?: true + position?: true + eventType?: true + points?: true + updatedAt?: true + updatedBy?: true + } + + export type ScoringRuleCountAggregateInputType = { + id?: true + position?: true + eventType?: true + points?: true + updatedAt?: true + updatedBy?: true + _all?: true + } + + export type ScoringRuleAggregateArgs = { + /** + * Filter which ScoringRule to aggregate. + */ + where?: ScoringRuleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScoringRules to fetch. + */ + orderBy?: ScoringRuleOrderByWithRelationInput | ScoringRuleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ScoringRuleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScoringRules from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ScoringRules. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ScoringRules + **/ + _count?: true | ScoringRuleCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ScoringRuleAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ScoringRuleSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ScoringRuleMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ScoringRuleMaxAggregateInputType + } + + export type GetScoringRuleAggregateType = { + [P in keyof T & keyof AggregateScoringRule]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ScoringRuleGroupByArgs = { + where?: ScoringRuleWhereInput + orderBy?: ScoringRuleOrderByWithAggregationInput | ScoringRuleOrderByWithAggregationInput[] + by: ScoringRuleScalarFieldEnum[] | ScoringRuleScalarFieldEnum + having?: ScoringRuleScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ScoringRuleCountAggregateInputType | true + _avg?: ScoringRuleAvgAggregateInputType + _sum?: ScoringRuleSumAggregateInputType + _min?: ScoringRuleMinAggregateInputType + _max?: ScoringRuleMaxAggregateInputType + } + + export type ScoringRuleGroupByOutputType = { + id: string + position: $Enums.Position + eventType: $Enums.EventType + points: number + updatedAt: Date + updatedBy: string | null + _count: ScoringRuleCountAggregateOutputType | null + _avg: ScoringRuleAvgAggregateOutputType | null + _sum: ScoringRuleSumAggregateOutputType | null + _min: ScoringRuleMinAggregateOutputType | null + _max: ScoringRuleMaxAggregateOutputType | null + } + + type GetScoringRuleGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ScoringRuleGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ScoringRuleSelect = $Extensions.GetSelect<{ + id?: boolean + position?: boolean + eventType?: boolean + points?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["scoringRule"]> + + export type ScoringRuleSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + position?: boolean + eventType?: boolean + points?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["scoringRule"]> + + export type ScoringRuleSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + position?: boolean + eventType?: boolean + points?: boolean + updatedAt?: boolean + updatedBy?: boolean + }, ExtArgs["result"]["scoringRule"]> + + export type ScoringRuleSelectScalar = { + id?: boolean + position?: boolean + eventType?: boolean + points?: boolean + updatedAt?: boolean + updatedBy?: boolean + } + + export type ScoringRuleOmit = $Extensions.GetOmit<"id" | "position" | "eventType" | "points" | "updatedAt" | "updatedBy", ExtArgs["result"]["scoringRule"]> + + export type $ScoringRulePayload = { + name: "ScoringRule" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + position: $Enums.Position + eventType: $Enums.EventType + points: number + updatedAt: Date + updatedBy: string | null + }, ExtArgs["result"]["scoringRule"]> + composites: {} + } + + type ScoringRuleGetPayload = $Result.GetResult + + type ScoringRuleCountArgs = + Omit & { + select?: ScoringRuleCountAggregateInputType | true + } + + export interface ScoringRuleDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ScoringRule'], meta: { name: 'ScoringRule' } } + /** + * Find zero or one ScoringRule that matches the filter. + * @param {ScoringRuleFindUniqueArgs} args - Arguments to find a ScoringRule + * @example + * // Get one ScoringRule + * const scoringRule = await prisma.scoringRule.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ScoringRule that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ScoringRuleFindUniqueOrThrowArgs} args - Arguments to find a ScoringRule + * @example + * // Get one ScoringRule + * const scoringRule = await prisma.scoringRule.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ScoringRule that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleFindFirstArgs} args - Arguments to find a ScoringRule + * @example + * // Get one ScoringRule + * const scoringRule = await prisma.scoringRule.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ScoringRule that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleFindFirstOrThrowArgs} args - Arguments to find a ScoringRule + * @example + * // Get one ScoringRule + * const scoringRule = await prisma.scoringRule.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ScoringRules that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ScoringRules + * const scoringRules = await prisma.scoringRule.findMany() + * + * // Get first 10 ScoringRules + * const scoringRules = await prisma.scoringRule.findMany({ take: 10 }) + * + * // Only select the `id` + * const scoringRuleWithIdOnly = await prisma.scoringRule.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ScoringRule. + * @param {ScoringRuleCreateArgs} args - Arguments to create a ScoringRule. + * @example + * // Create one ScoringRule + * const ScoringRule = await prisma.scoringRule.create({ + * data: { + * // ... data to create a ScoringRule + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ScoringRules. + * @param {ScoringRuleCreateManyArgs} args - Arguments to create many ScoringRules. + * @example + * // Create many ScoringRules + * const scoringRule = await prisma.scoringRule.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ScoringRules and returns the data saved in the database. + * @param {ScoringRuleCreateManyAndReturnArgs} args - Arguments to create many ScoringRules. + * @example + * // Create many ScoringRules + * const scoringRule = await prisma.scoringRule.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ScoringRules and only return the `id` + * const scoringRuleWithIdOnly = await prisma.scoringRule.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a ScoringRule. + * @param {ScoringRuleDeleteArgs} args - Arguments to delete one ScoringRule. + * @example + * // Delete one ScoringRule + * const ScoringRule = await prisma.scoringRule.delete({ + * where: { + * // ... filter to delete one ScoringRule + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ScoringRule. + * @param {ScoringRuleUpdateArgs} args - Arguments to update one ScoringRule. + * @example + * // Update one ScoringRule + * const scoringRule = await prisma.scoringRule.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ScoringRules. + * @param {ScoringRuleDeleteManyArgs} args - Arguments to filter ScoringRules to delete. + * @example + * // Delete a few ScoringRules + * const { count } = await prisma.scoringRule.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ScoringRules. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ScoringRules + * const scoringRule = await prisma.scoringRule.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ScoringRules and returns the data updated in the database. + * @param {ScoringRuleUpdateManyAndReturnArgs} args - Arguments to update many ScoringRules. + * @example + * // Update many ScoringRules + * const scoringRule = await prisma.scoringRule.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more ScoringRules and only return the `id` + * const scoringRuleWithIdOnly = await prisma.scoringRule.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one ScoringRule. + * @param {ScoringRuleUpsertArgs} args - Arguments to update or create a ScoringRule. + * @example + * // Update or create a ScoringRule + * const scoringRule = await prisma.scoringRule.upsert({ + * create: { + * // ... data to create a ScoringRule + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ScoringRule we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ScoringRuleClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ScoringRules. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleCountArgs} args - Arguments to filter ScoringRules to count. + * @example + * // Count the number of ScoringRules + * const count = await prisma.scoringRule.count({ + * where: { + * // ... the filter for the ScoringRules we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ScoringRule. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ScoringRule. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScoringRuleGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ScoringRuleGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ScoringRuleGroupByArgs['orderBy'] } + : { orderBy?: ScoringRuleGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetScoringRuleGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ScoringRule model + */ + readonly fields: ScoringRuleFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ScoringRule. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ScoringRuleClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ScoringRule model + */ + interface ScoringRuleFieldRefs { + readonly id: FieldRef<"ScoringRule", 'String'> + readonly position: FieldRef<"ScoringRule", 'Position'> + readonly eventType: FieldRef<"ScoringRule", 'EventType'> + readonly points: FieldRef<"ScoringRule", 'Int'> + readonly updatedAt: FieldRef<"ScoringRule", 'DateTime'> + readonly updatedBy: FieldRef<"ScoringRule", 'String'> + } + + + // Custom InputTypes + /** + * ScoringRule findUnique + */ + export type ScoringRuleFindUniqueArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter, which ScoringRule to fetch. + */ + where: ScoringRuleWhereUniqueInput + } + + /** + * ScoringRule findUniqueOrThrow + */ + export type ScoringRuleFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter, which ScoringRule to fetch. + */ + where: ScoringRuleWhereUniqueInput + } + + /** + * ScoringRule findFirst + */ + export type ScoringRuleFindFirstArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter, which ScoringRule to fetch. + */ + where?: ScoringRuleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScoringRules to fetch. + */ + orderBy?: ScoringRuleOrderByWithRelationInput | ScoringRuleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ScoringRules. + */ + cursor?: ScoringRuleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScoringRules from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ScoringRules. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ScoringRules. + */ + distinct?: ScoringRuleScalarFieldEnum | ScoringRuleScalarFieldEnum[] + } + + /** + * ScoringRule findFirstOrThrow + */ + export type ScoringRuleFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter, which ScoringRule to fetch. + */ + where?: ScoringRuleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScoringRules to fetch. + */ + orderBy?: ScoringRuleOrderByWithRelationInput | ScoringRuleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ScoringRules. + */ + cursor?: ScoringRuleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScoringRules from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ScoringRules. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ScoringRules. + */ + distinct?: ScoringRuleScalarFieldEnum | ScoringRuleScalarFieldEnum[] + } + + /** + * ScoringRule findMany + */ + export type ScoringRuleFindManyArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter, which ScoringRules to fetch. + */ + where?: ScoringRuleWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScoringRules to fetch. + */ + orderBy?: ScoringRuleOrderByWithRelationInput | ScoringRuleOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ScoringRules. + */ + cursor?: ScoringRuleWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScoringRules from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ScoringRules. + */ + skip?: number + distinct?: ScoringRuleScalarFieldEnum | ScoringRuleScalarFieldEnum[] + } + + /** + * ScoringRule create + */ + export type ScoringRuleCreateArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * The data needed to create a ScoringRule. + */ + data: XOR + } + + /** + * ScoringRule createMany + */ + export type ScoringRuleCreateManyArgs = { + /** + * The data used to create many ScoringRules. + */ + data: ScoringRuleCreateManyInput | ScoringRuleCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ScoringRule createManyAndReturn + */ + export type ScoringRuleCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelectCreateManyAndReturn | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * The data used to create many ScoringRules. + */ + data: ScoringRuleCreateManyInput | ScoringRuleCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ScoringRule update + */ + export type ScoringRuleUpdateArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * The data needed to update a ScoringRule. + */ + data: XOR + /** + * Choose, which ScoringRule to update. + */ + where: ScoringRuleWhereUniqueInput + } + + /** + * ScoringRule updateMany + */ + export type ScoringRuleUpdateManyArgs = { + /** + * The data used to update ScoringRules. + */ + data: XOR + /** + * Filter which ScoringRules to update + */ + where?: ScoringRuleWhereInput + /** + * Limit how many ScoringRules to update. + */ + limit?: number + } + + /** + * ScoringRule updateManyAndReturn + */ + export type ScoringRuleUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * The data used to update ScoringRules. + */ + data: XOR + /** + * Filter which ScoringRules to update + */ + where?: ScoringRuleWhereInput + /** + * Limit how many ScoringRules to update. + */ + limit?: number + } + + /** + * ScoringRule upsert + */ + export type ScoringRuleUpsertArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * The filter to search for the ScoringRule to update in case it exists. + */ + where: ScoringRuleWhereUniqueInput + /** + * In case the ScoringRule found by the `where` argument doesn't exist, create a new ScoringRule with this data. + */ + create: XOR + /** + * In case the ScoringRule was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ScoringRule delete + */ + export type ScoringRuleDeleteArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + /** + * Filter which ScoringRule to delete. + */ + where: ScoringRuleWhereUniqueInput + } + + /** + * ScoringRule deleteMany + */ + export type ScoringRuleDeleteManyArgs = { + /** + * Filter which ScoringRules to delete + */ + where?: ScoringRuleWhereInput + /** + * Limit how many ScoringRules to delete. + */ + limit?: number + } + + /** + * ScoringRule without action + */ + export type ScoringRuleDefaultArgs = { + /** + * Select specific fields to fetch from the ScoringRule + */ + select?: ScoringRuleSelect | null + /** + * Omit specific fields from the ScoringRule + */ + omit?: ScoringRuleOmit | null + } + + + /** + * Model User + */ + + export type AggregateUser = { + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + export type UserMinAggregateOutputType = { + id: string | null + name: string | null + email: string | null + phone: string | null + password: string | null + role: $Enums.Role | null + createdAt: Date | null + } + + export type UserMaxAggregateOutputType = { + id: string | null + name: string | null + email: string | null + phone: string | null + password: string | null + role: $Enums.Role | null + createdAt: Date | null + } + + export type UserCountAggregateOutputType = { + id: number + name: number + email: number + phone: number + password: number + role: number + createdAt: number + _all: number + } + + + export type UserMinAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + password?: true + role?: true + createdAt?: true + } + + export type UserMaxAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + password?: true + role?: true + createdAt?: true + } + + export type UserCountAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + password?: true + role?: true + createdAt?: true + _all?: true + } + + export type UserAggregateArgs = { + /** + * Filter which User to aggregate. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Users + **/ + _count?: true | UserCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserMaxAggregateInputType + } + + export type GetUserAggregateType = { + [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type UserGroupByArgs = { + where?: UserWhereInput + orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] + by: UserScalarFieldEnum[] | UserScalarFieldEnum + having?: UserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserCountAggregateInputType | true + _min?: UserMinAggregateInputType + _max?: UserMaxAggregateInputType + } + + export type UserGroupByOutputType = { + id: string + name: string | null + email: string + phone: string | null + password: string + role: $Enums.Role + createdAt: Date + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + type GetUserGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type UserSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + password?: boolean + role?: boolean + createdAt?: boolean + team?: boolean | User$teamArgs + sessions?: boolean | User$sessionsArgs + payments?: boolean | User$paymentsArgs + quizSubmissions?: boolean | User$quizSubmissionsArgs + goldenCards?: boolean | User$goldenCardsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + }, ExtArgs["result"]["user"]> + + export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + password?: boolean + role?: boolean + createdAt?: boolean + }, ExtArgs["result"]["user"]> + + export type UserSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + password?: boolean + role?: boolean + createdAt?: boolean + }, ExtArgs["result"]["user"]> + + export type UserSelectScalar = { + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + password?: boolean + role?: boolean + createdAt?: boolean + } + + export type UserOmit = $Extensions.GetOmit<"id" | "name" | "email" | "phone" | "password" | "role" | "createdAt", ExtArgs["result"]["user"]> + export type UserInclude = { + team?: boolean | User$teamArgs + sessions?: boolean | User$sessionsArgs + payments?: boolean | User$paymentsArgs + quizSubmissions?: boolean | User$quizSubmissionsArgs + goldenCards?: boolean | User$goldenCardsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + } + export type UserIncludeCreateManyAndReturn = {} + export type UserIncludeUpdateManyAndReturn = {} + + export type $UserPayload = { + name: "User" + objects: { + team: Prisma.$TeamPayload | null + sessions: Prisma.$SessionPayload[] + payments: Prisma.$PaymentPayload[] + quizSubmissions: Prisma.$QuizSubmissionPayload[] + goldenCards: Prisma.$GoldenCardPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string | null + email: string + phone: string | null + password: string + role: $Enums.Role + createdAt: Date + }, ExtArgs["result"]["user"]> + composites: {} + } + + type UserGetPayload = $Result.GetResult + + type UserCountArgs = + Omit & { + select?: UserCountAggregateInputType | true + } + + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + /** + * Find zero or one User that matches the filter. + * @param {UserFindUniqueArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one User that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first User that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first User that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Users that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Users + * const users = await prisma.user.findMany() + * + * // Get first 10 Users + * const users = await prisma.user.findMany({ take: 10 }) + * + * // Only select the `id` + * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a User. + * @param {UserCreateArgs} args - Arguments to create a User. + * @example + * // Create one User + * const User = await prisma.user.create({ + * data: { + * // ... data to create a User + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Users. + * @param {UserCreateManyArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Users and returns the data saved in the database. + * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Users and only return the `id` + * const userWithIdOnly = await prisma.user.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a User. + * @param {UserDeleteArgs} args - Arguments to delete one User. + * @example + * // Delete one User + * const User = await prisma.user.delete({ + * where: { + * // ... filter to delete one User + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one User. + * @param {UserUpdateArgs} args - Arguments to update one User. + * @example + * // Update one User + * const user = await prisma.user.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Users. + * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. + * @example + * // Delete a few Users + * const { count } = await prisma.user.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Users + * const user = await prisma.user.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Users and returns the data updated in the database. + * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users. + * @example + * // Update many Users + * const user = await prisma.user.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Users and only return the `id` + * const userWithIdOnly = await prisma.user.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one User. + * @param {UserUpsertArgs} args - Arguments to update or create a User. + * @example + * // Update or create a User + * const user = await prisma.user.upsert({ + * create: { + * // ... data to create a User + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the User we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCountArgs} args - Arguments to filter Users to count. + * @example + * // Count the number of Users + * const count = await prisma.user.count({ + * where: { + * // ... the filter for the Users we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends UserGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: UserGroupByArgs['orderBy'] } + : { orderBy?: UserGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the User model + */ + readonly fields: UserFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for User. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__UserClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + team = {}>(args?: Subset>): Prisma__TeamClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + payments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + quizSubmissions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + goldenCards = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the User model + */ + interface UserFieldRefs { + readonly id: FieldRef<"User", 'String'> + readonly name: FieldRef<"User", 'String'> + readonly email: FieldRef<"User", 'String'> + readonly phone: FieldRef<"User", 'String'> + readonly password: FieldRef<"User", 'String'> + readonly role: FieldRef<"User", 'Role'> + readonly createdAt: FieldRef<"User", 'DateTime'> + } + + + // Custom InputTypes + /** + * User findUnique + */ + export type UserFindUniqueArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findUniqueOrThrow + */ + export type UserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findFirst + */ + export type UserFindFirstArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findFirstOrThrow + */ + export type UserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findMany + */ + export type UserFindManyArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which Users to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User create + */ + export type UserCreateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to create a User. + */ + data: XOR + } + + /** + * User createMany + */ + export type UserCreateManyArgs = { + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User createManyAndReturn + */ + export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectCreateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User update + */ + export type UserUpdateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to update a User. + */ + data: XOR + /** + * Choose, which User to update. + */ + where: UserWhereUniqueInput + } + + /** + * User updateMany + */ + export type UserUpdateManyArgs = { + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number + } + + /** + * User updateManyAndReturn + */ + export type UserUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number + } + + /** + * User upsert + */ + export type UserUpsertArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The filter to search for the User to update in case it exists. + */ + where: UserWhereUniqueInput + /** + * In case the User found by the `where` argument doesn't exist, create a new User with this data. + */ + create: XOR + /** + * In case the User was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * User delete + */ + export type UserDeleteArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter which User to delete. + */ + where: UserWhereUniqueInput + } + + /** + * User deleteMany + */ + export type UserDeleteManyArgs = { + /** + * Filter which Users to delete + */ + where?: UserWhereInput + /** + * Limit how many Users to delete. + */ + limit?: number + } + + /** + * User.team + */ + export type User$teamArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + where?: TeamWhereInput + } + + /** + * User.sessions + */ + export type User$sessionsArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + where?: SessionWhereInput + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + cursor?: SessionWhereUniqueInput + take?: number + skip?: number + distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] + } + + /** + * User.payments + */ + export type User$paymentsArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + where?: PaymentWhereInput + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + cursor?: PaymentWhereUniqueInput + take?: number + skip?: number + distinct?: PaymentScalarFieldEnum | PaymentScalarFieldEnum[] + } + + /** + * User.quizSubmissions + */ + export type User$quizSubmissionsArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + where?: QuizSubmissionWhereInput + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + cursor?: QuizSubmissionWhereUniqueInput + take?: number + skip?: number + distinct?: QuizSubmissionScalarFieldEnum | QuizSubmissionScalarFieldEnum[] + } + + /** + * User.goldenCards + */ + export type User$goldenCardsArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + where?: GoldenCardWhereInput + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + cursor?: GoldenCardWhereUniqueInput + take?: number + skip?: number + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * User without action + */ + export type UserDefaultArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + } + + + /** + * Model LoginOtp + */ + + export type AggregateLoginOtp = { + _count: LoginOtpCountAggregateOutputType | null + _avg: LoginOtpAvgAggregateOutputType | null + _sum: LoginOtpSumAggregateOutputType | null + _min: LoginOtpMinAggregateOutputType | null + _max: LoginOtpMaxAggregateOutputType | null + } + + export type LoginOtpAvgAggregateOutputType = { + attempts: number | null + } + + export type LoginOtpSumAggregateOutputType = { + attempts: number | null + } + + export type LoginOtpMinAggregateOutputType = { + id: string | null + phone: string | null + codeHash: string | null + attempts: number | null + expiresAt: Date | null + consumedAt: Date | null + createdAt: Date | null + } + + export type LoginOtpMaxAggregateOutputType = { + id: string | null + phone: string | null + codeHash: string | null + attempts: number | null + expiresAt: Date | null + consumedAt: Date | null + createdAt: Date | null + } + + export type LoginOtpCountAggregateOutputType = { + id: number + phone: number + codeHash: number + attempts: number + expiresAt: number + consumedAt: number + createdAt: number + _all: number + } + + + export type LoginOtpAvgAggregateInputType = { + attempts?: true + } + + export type LoginOtpSumAggregateInputType = { + attempts?: true + } + + export type LoginOtpMinAggregateInputType = { + id?: true + phone?: true + codeHash?: true + attempts?: true + expiresAt?: true + consumedAt?: true + createdAt?: true + } + + export type LoginOtpMaxAggregateInputType = { + id?: true + phone?: true + codeHash?: true + attempts?: true + expiresAt?: true + consumedAt?: true + createdAt?: true + } + + export type LoginOtpCountAggregateInputType = { + id?: true + phone?: true + codeHash?: true + attempts?: true + expiresAt?: true + consumedAt?: true + createdAt?: true + _all?: true + } + + export type LoginOtpAggregateArgs = { + /** + * Filter which LoginOtp to aggregate. + */ + where?: LoginOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LoginOtps to fetch. + */ + orderBy?: LoginOtpOrderByWithRelationInput | LoginOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: LoginOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LoginOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` LoginOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned LoginOtps + **/ + _count?: true | LoginOtpCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: LoginOtpAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: LoginOtpSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: LoginOtpMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: LoginOtpMaxAggregateInputType + } + + export type GetLoginOtpAggregateType = { + [P in keyof T & keyof AggregateLoginOtp]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type LoginOtpGroupByArgs = { + where?: LoginOtpWhereInput + orderBy?: LoginOtpOrderByWithAggregationInput | LoginOtpOrderByWithAggregationInput[] + by: LoginOtpScalarFieldEnum[] | LoginOtpScalarFieldEnum + having?: LoginOtpScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: LoginOtpCountAggregateInputType | true + _avg?: LoginOtpAvgAggregateInputType + _sum?: LoginOtpSumAggregateInputType + _min?: LoginOtpMinAggregateInputType + _max?: LoginOtpMaxAggregateInputType + } + + export type LoginOtpGroupByOutputType = { + id: string + phone: string + codeHash: string + attempts: number + expiresAt: Date + consumedAt: Date | null + createdAt: Date + _count: LoginOtpCountAggregateOutputType | null + _avg: LoginOtpAvgAggregateOutputType | null + _sum: LoginOtpSumAggregateOutputType | null + _min: LoginOtpMinAggregateOutputType | null + _max: LoginOtpMaxAggregateOutputType | null + } + + type GetLoginOtpGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof LoginOtpGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type LoginOtpSelect = $Extensions.GetSelect<{ + id?: boolean + phone?: boolean + codeHash?: boolean + attempts?: boolean + expiresAt?: boolean + consumedAt?: boolean + createdAt?: boolean + }, ExtArgs["result"]["loginOtp"]> + + export type LoginOtpSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + phone?: boolean + codeHash?: boolean + attempts?: boolean + expiresAt?: boolean + consumedAt?: boolean + createdAt?: boolean + }, ExtArgs["result"]["loginOtp"]> + + export type LoginOtpSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + phone?: boolean + codeHash?: boolean + attempts?: boolean + expiresAt?: boolean + consumedAt?: boolean + createdAt?: boolean + }, ExtArgs["result"]["loginOtp"]> + + export type LoginOtpSelectScalar = { + id?: boolean + phone?: boolean + codeHash?: boolean + attempts?: boolean + expiresAt?: boolean + consumedAt?: boolean + createdAt?: boolean + } + + export type LoginOtpOmit = $Extensions.GetOmit<"id" | "phone" | "codeHash" | "attempts" | "expiresAt" | "consumedAt" | "createdAt", ExtArgs["result"]["loginOtp"]> + + export type $LoginOtpPayload = { + name: "LoginOtp" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + phone: string + codeHash: string + attempts: number + expiresAt: Date + consumedAt: Date | null + createdAt: Date + }, ExtArgs["result"]["loginOtp"]> + composites: {} + } + + type LoginOtpGetPayload = $Result.GetResult + + type LoginOtpCountArgs = + Omit & { + select?: LoginOtpCountAggregateInputType | true + } + + export interface LoginOtpDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['LoginOtp'], meta: { name: 'LoginOtp' } } + /** + * Find zero or one LoginOtp that matches the filter. + * @param {LoginOtpFindUniqueArgs} args - Arguments to find a LoginOtp + * @example + * // Get one LoginOtp + * const loginOtp = await prisma.loginOtp.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one LoginOtp that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {LoginOtpFindUniqueOrThrowArgs} args - Arguments to find a LoginOtp + * @example + * // Get one LoginOtp + * const loginOtp = await prisma.loginOtp.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first LoginOtp that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpFindFirstArgs} args - Arguments to find a LoginOtp + * @example + * // Get one LoginOtp + * const loginOtp = await prisma.loginOtp.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first LoginOtp that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpFindFirstOrThrowArgs} args - Arguments to find a LoginOtp + * @example + * // Get one LoginOtp + * const loginOtp = await prisma.loginOtp.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more LoginOtps that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all LoginOtps + * const loginOtps = await prisma.loginOtp.findMany() + * + * // Get first 10 LoginOtps + * const loginOtps = await prisma.loginOtp.findMany({ take: 10 }) + * + * // Only select the `id` + * const loginOtpWithIdOnly = await prisma.loginOtp.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a LoginOtp. + * @param {LoginOtpCreateArgs} args - Arguments to create a LoginOtp. + * @example + * // Create one LoginOtp + * const LoginOtp = await prisma.loginOtp.create({ + * data: { + * // ... data to create a LoginOtp + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many LoginOtps. + * @param {LoginOtpCreateManyArgs} args - Arguments to create many LoginOtps. + * @example + * // Create many LoginOtps + * const loginOtp = await prisma.loginOtp.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many LoginOtps and returns the data saved in the database. + * @param {LoginOtpCreateManyAndReturnArgs} args - Arguments to create many LoginOtps. + * @example + * // Create many LoginOtps + * const loginOtp = await prisma.loginOtp.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many LoginOtps and only return the `id` + * const loginOtpWithIdOnly = await prisma.loginOtp.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a LoginOtp. + * @param {LoginOtpDeleteArgs} args - Arguments to delete one LoginOtp. + * @example + * // Delete one LoginOtp + * const LoginOtp = await prisma.loginOtp.delete({ + * where: { + * // ... filter to delete one LoginOtp + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one LoginOtp. + * @param {LoginOtpUpdateArgs} args - Arguments to update one LoginOtp. + * @example + * // Update one LoginOtp + * const loginOtp = await prisma.loginOtp.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more LoginOtps. + * @param {LoginOtpDeleteManyArgs} args - Arguments to filter LoginOtps to delete. + * @example + * // Delete a few LoginOtps + * const { count } = await prisma.loginOtp.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more LoginOtps. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many LoginOtps + * const loginOtp = await prisma.loginOtp.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more LoginOtps and returns the data updated in the database. + * @param {LoginOtpUpdateManyAndReturnArgs} args - Arguments to update many LoginOtps. + * @example + * // Update many LoginOtps + * const loginOtp = await prisma.loginOtp.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more LoginOtps and only return the `id` + * const loginOtpWithIdOnly = await prisma.loginOtp.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one LoginOtp. + * @param {LoginOtpUpsertArgs} args - Arguments to update or create a LoginOtp. + * @example + * // Update or create a LoginOtp + * const loginOtp = await prisma.loginOtp.upsert({ + * create: { + * // ... data to create a LoginOtp + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the LoginOtp we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__LoginOtpClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of LoginOtps. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpCountArgs} args - Arguments to filter LoginOtps to count. + * @example + * // Count the number of LoginOtps + * const count = await prisma.loginOtp.count({ + * where: { + * // ... the filter for the LoginOtps we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a LoginOtp. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by LoginOtp. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LoginOtpGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends LoginOtpGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: LoginOtpGroupByArgs['orderBy'] } + : { orderBy?: LoginOtpGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetLoginOtpGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the LoginOtp model + */ + readonly fields: LoginOtpFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for LoginOtp. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__LoginOtpClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the LoginOtp model + */ + interface LoginOtpFieldRefs { + readonly id: FieldRef<"LoginOtp", 'String'> + readonly phone: FieldRef<"LoginOtp", 'String'> + readonly codeHash: FieldRef<"LoginOtp", 'String'> + readonly attempts: FieldRef<"LoginOtp", 'Int'> + readonly expiresAt: FieldRef<"LoginOtp", 'DateTime'> + readonly consumedAt: FieldRef<"LoginOtp", 'DateTime'> + readonly createdAt: FieldRef<"LoginOtp", 'DateTime'> + } + + + // Custom InputTypes + /** + * LoginOtp findUnique + */ + export type LoginOtpFindUniqueArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter, which LoginOtp to fetch. + */ + where: LoginOtpWhereUniqueInput + } + + /** + * LoginOtp findUniqueOrThrow + */ + export type LoginOtpFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter, which LoginOtp to fetch. + */ + where: LoginOtpWhereUniqueInput + } + + /** + * LoginOtp findFirst + */ + export type LoginOtpFindFirstArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter, which LoginOtp to fetch. + */ + where?: LoginOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LoginOtps to fetch. + */ + orderBy?: LoginOtpOrderByWithRelationInput | LoginOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for LoginOtps. + */ + cursor?: LoginOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LoginOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` LoginOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of LoginOtps. + */ + distinct?: LoginOtpScalarFieldEnum | LoginOtpScalarFieldEnum[] + } + + /** + * LoginOtp findFirstOrThrow + */ + export type LoginOtpFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter, which LoginOtp to fetch. + */ + where?: LoginOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LoginOtps to fetch. + */ + orderBy?: LoginOtpOrderByWithRelationInput | LoginOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for LoginOtps. + */ + cursor?: LoginOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LoginOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` LoginOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of LoginOtps. + */ + distinct?: LoginOtpScalarFieldEnum | LoginOtpScalarFieldEnum[] + } + + /** + * LoginOtp findMany + */ + export type LoginOtpFindManyArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter, which LoginOtps to fetch. + */ + where?: LoginOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LoginOtps to fetch. + */ + orderBy?: LoginOtpOrderByWithRelationInput | LoginOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing LoginOtps. + */ + cursor?: LoginOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LoginOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` LoginOtps. + */ + skip?: number + distinct?: LoginOtpScalarFieldEnum | LoginOtpScalarFieldEnum[] + } + + /** + * LoginOtp create + */ + export type LoginOtpCreateArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * The data needed to create a LoginOtp. + */ + data: XOR + } + + /** + * LoginOtp createMany + */ + export type LoginOtpCreateManyArgs = { + /** + * The data used to create many LoginOtps. + */ + data: LoginOtpCreateManyInput | LoginOtpCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * LoginOtp createManyAndReturn + */ + export type LoginOtpCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelectCreateManyAndReturn | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * The data used to create many LoginOtps. + */ + data: LoginOtpCreateManyInput | LoginOtpCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * LoginOtp update + */ + export type LoginOtpUpdateArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * The data needed to update a LoginOtp. + */ + data: XOR + /** + * Choose, which LoginOtp to update. + */ + where: LoginOtpWhereUniqueInput + } + + /** + * LoginOtp updateMany + */ + export type LoginOtpUpdateManyArgs = { + /** + * The data used to update LoginOtps. + */ + data: XOR + /** + * Filter which LoginOtps to update + */ + where?: LoginOtpWhereInput + /** + * Limit how many LoginOtps to update. + */ + limit?: number + } + + /** + * LoginOtp updateManyAndReturn + */ + export type LoginOtpUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * The data used to update LoginOtps. + */ + data: XOR + /** + * Filter which LoginOtps to update + */ + where?: LoginOtpWhereInput + /** + * Limit how many LoginOtps to update. + */ + limit?: number + } + + /** + * LoginOtp upsert + */ + export type LoginOtpUpsertArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * The filter to search for the LoginOtp to update in case it exists. + */ + where: LoginOtpWhereUniqueInput + /** + * In case the LoginOtp found by the `where` argument doesn't exist, create a new LoginOtp with this data. + */ + create: XOR + /** + * In case the LoginOtp was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * LoginOtp delete + */ + export type LoginOtpDeleteArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + /** + * Filter which LoginOtp to delete. + */ + where: LoginOtpWhereUniqueInput + } + + /** + * LoginOtp deleteMany + */ + export type LoginOtpDeleteManyArgs = { + /** + * Filter which LoginOtps to delete + */ + where?: LoginOtpWhereInput + /** + * Limit how many LoginOtps to delete. + */ + limit?: number + } + + /** + * LoginOtp without action + */ + export type LoginOtpDefaultArgs = { + /** + * Select specific fields to fetch from the LoginOtp + */ + select?: LoginOtpSelect | null + /** + * Omit specific fields from the LoginOtp + */ + omit?: LoginOtpOmit | null + } + + + /** + * Model FantasyNews + */ + + export type AggregateFantasyNews = { + _count: FantasyNewsCountAggregateOutputType | null + _min: FantasyNewsMinAggregateOutputType | null + _max: FantasyNewsMaxAggregateOutputType | null + } + + export type FantasyNewsMinAggregateOutputType = { + id: string | null + icon: string | null + title: string | null + description: string | null + newsTime: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type FantasyNewsMaxAggregateOutputType = { + id: string | null + icon: string | null + title: string | null + description: string | null + newsTime: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type FantasyNewsCountAggregateOutputType = { + id: number + icon: number + title: number + description: number + newsTime: number + createdAt: number + updatedAt: number + _all: number + } + + + export type FantasyNewsMinAggregateInputType = { + id?: true + icon?: true + title?: true + description?: true + newsTime?: true + createdAt?: true + updatedAt?: true + } + + export type FantasyNewsMaxAggregateInputType = { + id?: true + icon?: true + title?: true + description?: true + newsTime?: true + createdAt?: true + updatedAt?: true + } + + export type FantasyNewsCountAggregateInputType = { + id?: true + icon?: true + title?: true + description?: true + newsTime?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type FantasyNewsAggregateArgs = { + /** + * Filter which FantasyNews to aggregate. + */ + where?: FantasyNewsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of FantasyNews to fetch. + */ + orderBy?: FantasyNewsOrderByWithRelationInput | FantasyNewsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: FantasyNewsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` FantasyNews from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` FantasyNews. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned FantasyNews + **/ + _count?: true | FantasyNewsCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: FantasyNewsMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: FantasyNewsMaxAggregateInputType + } + + export type GetFantasyNewsAggregateType = { + [P in keyof T & keyof AggregateFantasyNews]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type FantasyNewsGroupByArgs = { + where?: FantasyNewsWhereInput + orderBy?: FantasyNewsOrderByWithAggregationInput | FantasyNewsOrderByWithAggregationInput[] + by: FantasyNewsScalarFieldEnum[] | FantasyNewsScalarFieldEnum + having?: FantasyNewsScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: FantasyNewsCountAggregateInputType | true + _min?: FantasyNewsMinAggregateInputType + _max?: FantasyNewsMaxAggregateInputType + } + + export type FantasyNewsGroupByOutputType = { + id: string + icon: string + title: string + description: string + newsTime: Date + createdAt: Date + updatedAt: Date + _count: FantasyNewsCountAggregateOutputType | null + _min: FantasyNewsMinAggregateOutputType | null + _max: FantasyNewsMaxAggregateOutputType | null + } + + type GetFantasyNewsGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof FantasyNewsGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type FantasyNewsSelect = $Extensions.GetSelect<{ + id?: boolean + icon?: boolean + title?: boolean + description?: boolean + newsTime?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["fantasyNews"]> + + export type FantasyNewsSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + icon?: boolean + title?: boolean + description?: boolean + newsTime?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["fantasyNews"]> + + export type FantasyNewsSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + icon?: boolean + title?: boolean + description?: boolean + newsTime?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["fantasyNews"]> + + export type FantasyNewsSelectScalar = { + id?: boolean + icon?: boolean + title?: boolean + description?: boolean + newsTime?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type FantasyNewsOmit = $Extensions.GetOmit<"id" | "icon" | "title" | "description" | "newsTime" | "createdAt" | "updatedAt", ExtArgs["result"]["fantasyNews"]> + + export type $FantasyNewsPayload = { + name: "FantasyNews" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + icon: string + title: string + description: string + newsTime: Date + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["fantasyNews"]> + composites: {} + } + + type FantasyNewsGetPayload = $Result.GetResult + + type FantasyNewsCountArgs = + Omit & { + select?: FantasyNewsCountAggregateInputType | true + } + + export interface FantasyNewsDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['FantasyNews'], meta: { name: 'FantasyNews' } } + /** + * Find zero or one FantasyNews that matches the filter. + * @param {FantasyNewsFindUniqueArgs} args - Arguments to find a FantasyNews + * @example + * // Get one FantasyNews + * const fantasyNews = await prisma.fantasyNews.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one FantasyNews that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {FantasyNewsFindUniqueOrThrowArgs} args - Arguments to find a FantasyNews + * @example + * // Get one FantasyNews + * const fantasyNews = await prisma.fantasyNews.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first FantasyNews that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsFindFirstArgs} args - Arguments to find a FantasyNews + * @example + * // Get one FantasyNews + * const fantasyNews = await prisma.fantasyNews.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first FantasyNews that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsFindFirstOrThrowArgs} args - Arguments to find a FantasyNews + * @example + * // Get one FantasyNews + * const fantasyNews = await prisma.fantasyNews.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more FantasyNews that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all FantasyNews + * const fantasyNews = await prisma.fantasyNews.findMany() + * + * // Get first 10 FantasyNews + * const fantasyNews = await prisma.fantasyNews.findMany({ take: 10 }) + * + * // Only select the `id` + * const fantasyNewsWithIdOnly = await prisma.fantasyNews.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a FantasyNews. + * @param {FantasyNewsCreateArgs} args - Arguments to create a FantasyNews. + * @example + * // Create one FantasyNews + * const FantasyNews = await prisma.fantasyNews.create({ + * data: { + * // ... data to create a FantasyNews + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many FantasyNews. + * @param {FantasyNewsCreateManyArgs} args - Arguments to create many FantasyNews. + * @example + * // Create many FantasyNews + * const fantasyNews = await prisma.fantasyNews.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many FantasyNews and returns the data saved in the database. + * @param {FantasyNewsCreateManyAndReturnArgs} args - Arguments to create many FantasyNews. + * @example + * // Create many FantasyNews + * const fantasyNews = await prisma.fantasyNews.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many FantasyNews and only return the `id` + * const fantasyNewsWithIdOnly = await prisma.fantasyNews.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a FantasyNews. + * @param {FantasyNewsDeleteArgs} args - Arguments to delete one FantasyNews. + * @example + * // Delete one FantasyNews + * const FantasyNews = await prisma.fantasyNews.delete({ + * where: { + * // ... filter to delete one FantasyNews + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one FantasyNews. + * @param {FantasyNewsUpdateArgs} args - Arguments to update one FantasyNews. + * @example + * // Update one FantasyNews + * const fantasyNews = await prisma.fantasyNews.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more FantasyNews. + * @param {FantasyNewsDeleteManyArgs} args - Arguments to filter FantasyNews to delete. + * @example + * // Delete a few FantasyNews + * const { count } = await prisma.fantasyNews.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more FantasyNews. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many FantasyNews + * const fantasyNews = await prisma.fantasyNews.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more FantasyNews and returns the data updated in the database. + * @param {FantasyNewsUpdateManyAndReturnArgs} args - Arguments to update many FantasyNews. + * @example + * // Update many FantasyNews + * const fantasyNews = await prisma.fantasyNews.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more FantasyNews and only return the `id` + * const fantasyNewsWithIdOnly = await prisma.fantasyNews.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one FantasyNews. + * @param {FantasyNewsUpsertArgs} args - Arguments to update or create a FantasyNews. + * @example + * // Update or create a FantasyNews + * const fantasyNews = await prisma.fantasyNews.upsert({ + * create: { + * // ... data to create a FantasyNews + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the FantasyNews we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__FantasyNewsClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of FantasyNews. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsCountArgs} args - Arguments to filter FantasyNews to count. + * @example + * // Count the number of FantasyNews + * const count = await prisma.fantasyNews.count({ + * where: { + * // ... the filter for the FantasyNews we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a FantasyNews. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by FantasyNews. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {FantasyNewsGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends FantasyNewsGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: FantasyNewsGroupByArgs['orderBy'] } + : { orderBy?: FantasyNewsGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetFantasyNewsGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the FantasyNews model + */ + readonly fields: FantasyNewsFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for FantasyNews. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__FantasyNewsClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the FantasyNews model + */ + interface FantasyNewsFieldRefs { + readonly id: FieldRef<"FantasyNews", 'String'> + readonly icon: FieldRef<"FantasyNews", 'String'> + readonly title: FieldRef<"FantasyNews", 'String'> + readonly description: FieldRef<"FantasyNews", 'String'> + readonly newsTime: FieldRef<"FantasyNews", 'DateTime'> + readonly createdAt: FieldRef<"FantasyNews", 'DateTime'> + readonly updatedAt: FieldRef<"FantasyNews", 'DateTime'> + } + + + // Custom InputTypes + /** + * FantasyNews findUnique + */ + export type FantasyNewsFindUniqueArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter, which FantasyNews to fetch. + */ + where: FantasyNewsWhereUniqueInput + } + + /** + * FantasyNews findUniqueOrThrow + */ + export type FantasyNewsFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter, which FantasyNews to fetch. + */ + where: FantasyNewsWhereUniqueInput + } + + /** + * FantasyNews findFirst + */ + export type FantasyNewsFindFirstArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter, which FantasyNews to fetch. + */ + where?: FantasyNewsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of FantasyNews to fetch. + */ + orderBy?: FantasyNewsOrderByWithRelationInput | FantasyNewsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for FantasyNews. + */ + cursor?: FantasyNewsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` FantasyNews from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` FantasyNews. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of FantasyNews. + */ + distinct?: FantasyNewsScalarFieldEnum | FantasyNewsScalarFieldEnum[] + } + + /** + * FantasyNews findFirstOrThrow + */ + export type FantasyNewsFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter, which FantasyNews to fetch. + */ + where?: FantasyNewsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of FantasyNews to fetch. + */ + orderBy?: FantasyNewsOrderByWithRelationInput | FantasyNewsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for FantasyNews. + */ + cursor?: FantasyNewsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` FantasyNews from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` FantasyNews. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of FantasyNews. + */ + distinct?: FantasyNewsScalarFieldEnum | FantasyNewsScalarFieldEnum[] + } + + /** + * FantasyNews findMany + */ + export type FantasyNewsFindManyArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter, which FantasyNews to fetch. + */ + where?: FantasyNewsWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of FantasyNews to fetch. + */ + orderBy?: FantasyNewsOrderByWithRelationInput | FantasyNewsOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing FantasyNews. + */ + cursor?: FantasyNewsWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` FantasyNews from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` FantasyNews. + */ + skip?: number + distinct?: FantasyNewsScalarFieldEnum | FantasyNewsScalarFieldEnum[] + } + + /** + * FantasyNews create + */ + export type FantasyNewsCreateArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * The data needed to create a FantasyNews. + */ + data: XOR + } + + /** + * FantasyNews createMany + */ + export type FantasyNewsCreateManyArgs = { + /** + * The data used to create many FantasyNews. + */ + data: FantasyNewsCreateManyInput | FantasyNewsCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * FantasyNews createManyAndReturn + */ + export type FantasyNewsCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelectCreateManyAndReturn | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * The data used to create many FantasyNews. + */ + data: FantasyNewsCreateManyInput | FantasyNewsCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * FantasyNews update + */ + export type FantasyNewsUpdateArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * The data needed to update a FantasyNews. + */ + data: XOR + /** + * Choose, which FantasyNews to update. + */ + where: FantasyNewsWhereUniqueInput + } + + /** + * FantasyNews updateMany + */ + export type FantasyNewsUpdateManyArgs = { + /** + * The data used to update FantasyNews. + */ + data: XOR + /** + * Filter which FantasyNews to update + */ + where?: FantasyNewsWhereInput + /** + * Limit how many FantasyNews to update. + */ + limit?: number + } + + /** + * FantasyNews updateManyAndReturn + */ + export type FantasyNewsUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * The data used to update FantasyNews. + */ + data: XOR + /** + * Filter which FantasyNews to update + */ + where?: FantasyNewsWhereInput + /** + * Limit how many FantasyNews to update. + */ + limit?: number + } + + /** + * FantasyNews upsert + */ + export type FantasyNewsUpsertArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * The filter to search for the FantasyNews to update in case it exists. + */ + where: FantasyNewsWhereUniqueInput + /** + * In case the FantasyNews found by the `where` argument doesn't exist, create a new FantasyNews with this data. + */ + create: XOR + /** + * In case the FantasyNews was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * FantasyNews delete + */ + export type FantasyNewsDeleteArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + /** + * Filter which FantasyNews to delete. + */ + where: FantasyNewsWhereUniqueInput + } + + /** + * FantasyNews deleteMany + */ + export type FantasyNewsDeleteManyArgs = { + /** + * Filter which FantasyNews to delete + */ + where?: FantasyNewsWhereInput + /** + * Limit how many FantasyNews to delete. + */ + limit?: number + } + + /** + * FantasyNews without action + */ + export type FantasyNewsDefaultArgs = { + /** + * Select specific fields to fetch from the FantasyNews + */ + select?: FantasyNewsSelect | null + /** + * Omit specific fields from the FantasyNews + */ + omit?: FantasyNewsOmit | null + } + + + /** + * Model DailyQuiz + */ + + export type AggregateDailyQuiz = { + _count: DailyQuizCountAggregateOutputType | null + _avg: DailyQuizAvgAggregateOutputType | null + _sum: DailyQuizSumAggregateOutputType | null + _min: DailyQuizMinAggregateOutputType | null + _max: DailyQuizMaxAggregateOutputType | null + } + + export type DailyQuizAvgAggregateOutputType = { + goldWinnersCount: number | null + silverWinnersCount: number | null + bronzeWinnersCount: number | null + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + } + + export type DailyQuizSumAggregateOutputType = { + goldWinnersCount: number | null + silverWinnersCount: number | null + bronzeWinnersCount: number | null + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + } + + export type DailyQuizMinAggregateOutputType = { + id: string | null + date: Date | null + windowStart: Date | null + windowEnd: Date | null + goldWinnersCount: number | null + silverWinnersCount: number | null + bronzeWinnersCount: number | null + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + isProcessed: boolean | null + createdAt: Date | null + } + + export type DailyQuizMaxAggregateOutputType = { + id: string | null + date: Date | null + windowStart: Date | null + windowEnd: Date | null + goldWinnersCount: number | null + silverWinnersCount: number | null + bronzeWinnersCount: number | null + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + isProcessed: boolean | null + createdAt: Date | null + } + + export type DailyQuizCountAggregateOutputType = { + id: number + date: number + windowStart: number + windowEnd: number + goldWinnersCount: number + silverWinnersCount: number + bronzeWinnersCount: number + goldMinCorrect: number + silverMinCorrect: number + bronzeMinCorrect: number + isProcessed: number + createdAt: number + _all: number + } + + + export type DailyQuizAvgAggregateInputType = { + goldWinnersCount?: true + silverWinnersCount?: true + bronzeWinnersCount?: true + goldMinCorrect?: true + silverMinCorrect?: true + bronzeMinCorrect?: true + } + + export type DailyQuizSumAggregateInputType = { + goldWinnersCount?: true + silverWinnersCount?: true + bronzeWinnersCount?: true + goldMinCorrect?: true + silverMinCorrect?: true + bronzeMinCorrect?: true + } + + export type DailyQuizMinAggregateInputType = { + id?: true + date?: true + windowStart?: true + windowEnd?: true + goldWinnersCount?: true + silverWinnersCount?: true + bronzeWinnersCount?: true + goldMinCorrect?: true + silverMinCorrect?: true + bronzeMinCorrect?: true + isProcessed?: true + createdAt?: true + } + + export type DailyQuizMaxAggregateInputType = { + id?: true + date?: true + windowStart?: true + windowEnd?: true + goldWinnersCount?: true + silverWinnersCount?: true + bronzeWinnersCount?: true + goldMinCorrect?: true + silverMinCorrect?: true + bronzeMinCorrect?: true + isProcessed?: true + createdAt?: true + } + + export type DailyQuizCountAggregateInputType = { + id?: true + date?: true + windowStart?: true + windowEnd?: true + goldWinnersCount?: true + silverWinnersCount?: true + bronzeWinnersCount?: true + goldMinCorrect?: true + silverMinCorrect?: true + bronzeMinCorrect?: true + isProcessed?: true + createdAt?: true + _all?: true + } + + export type DailyQuizAggregateArgs = { + /** + * Filter which DailyQuiz to aggregate. + */ + where?: DailyQuizWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DailyQuizs to fetch. + */ + orderBy?: DailyQuizOrderByWithRelationInput | DailyQuizOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: DailyQuizWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DailyQuizs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DailyQuizs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned DailyQuizs + **/ + _count?: true | DailyQuizCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: DailyQuizAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: DailyQuizSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: DailyQuizMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: DailyQuizMaxAggregateInputType + } + + export type GetDailyQuizAggregateType = { + [P in keyof T & keyof AggregateDailyQuiz]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type DailyQuizGroupByArgs = { + where?: DailyQuizWhereInput + orderBy?: DailyQuizOrderByWithAggregationInput | DailyQuizOrderByWithAggregationInput[] + by: DailyQuizScalarFieldEnum[] | DailyQuizScalarFieldEnum + having?: DailyQuizScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: DailyQuizCountAggregateInputType | true + _avg?: DailyQuizAvgAggregateInputType + _sum?: DailyQuizSumAggregateInputType + _min?: DailyQuizMinAggregateInputType + _max?: DailyQuizMaxAggregateInputType + } + + export type DailyQuizGroupByOutputType = { + id: string + date: Date + windowStart: Date + windowEnd: Date + goldWinnersCount: number + silverWinnersCount: number + bronzeWinnersCount: number + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + isProcessed: boolean + createdAt: Date + _count: DailyQuizCountAggregateOutputType | null + _avg: DailyQuizAvgAggregateOutputType | null + _sum: DailyQuizSumAggregateOutputType | null + _min: DailyQuizMinAggregateOutputType | null + _max: DailyQuizMaxAggregateOutputType | null + } + + type GetDailyQuizGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof DailyQuizGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type DailyQuizSelect = $Extensions.GetSelect<{ + id?: boolean + date?: boolean + windowStart?: boolean + windowEnd?: boolean + goldWinnersCount?: boolean + silverWinnersCount?: boolean + bronzeWinnersCount?: boolean + goldMinCorrect?: boolean + silverMinCorrect?: boolean + bronzeMinCorrect?: boolean + isProcessed?: boolean + createdAt?: boolean + questions?: boolean | DailyQuiz$questionsArgs + submissions?: boolean | DailyQuiz$submissionsArgs + awardedCards?: boolean | DailyQuiz$awardedCardsArgs + _count?: boolean | DailyQuizCountOutputTypeDefaultArgs + }, ExtArgs["result"]["dailyQuiz"]> + + export type DailyQuizSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + date?: boolean + windowStart?: boolean + windowEnd?: boolean + goldWinnersCount?: boolean + silverWinnersCount?: boolean + bronzeWinnersCount?: boolean + goldMinCorrect?: boolean + silverMinCorrect?: boolean + bronzeMinCorrect?: boolean + isProcessed?: boolean + createdAt?: boolean + }, ExtArgs["result"]["dailyQuiz"]> + + export type DailyQuizSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + date?: boolean + windowStart?: boolean + windowEnd?: boolean + goldWinnersCount?: boolean + silverWinnersCount?: boolean + bronzeWinnersCount?: boolean + goldMinCorrect?: boolean + silverMinCorrect?: boolean + bronzeMinCorrect?: boolean + isProcessed?: boolean + createdAt?: boolean + }, ExtArgs["result"]["dailyQuiz"]> + + export type DailyQuizSelectScalar = { + id?: boolean + date?: boolean + windowStart?: boolean + windowEnd?: boolean + goldWinnersCount?: boolean + silverWinnersCount?: boolean + bronzeWinnersCount?: boolean + goldMinCorrect?: boolean + silverMinCorrect?: boolean + bronzeMinCorrect?: boolean + isProcessed?: boolean + createdAt?: boolean + } + + export type DailyQuizOmit = $Extensions.GetOmit<"id" | "date" | "windowStart" | "windowEnd" | "goldWinnersCount" | "silverWinnersCount" | "bronzeWinnersCount" | "goldMinCorrect" | "silverMinCorrect" | "bronzeMinCorrect" | "isProcessed" | "createdAt", ExtArgs["result"]["dailyQuiz"]> + export type DailyQuizInclude = { + questions?: boolean | DailyQuiz$questionsArgs + submissions?: boolean | DailyQuiz$submissionsArgs + awardedCards?: boolean | DailyQuiz$awardedCardsArgs + _count?: boolean | DailyQuizCountOutputTypeDefaultArgs + } + export type DailyQuizIncludeCreateManyAndReturn = {} + export type DailyQuizIncludeUpdateManyAndReturn = {} + + export type $DailyQuizPayload = { + name: "DailyQuiz" + objects: { + questions: Prisma.$QuizQuestionPayload[] + submissions: Prisma.$QuizSubmissionPayload[] + awardedCards: Prisma.$GoldenCardPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + date: Date + windowStart: Date + windowEnd: Date + goldWinnersCount: number + silverWinnersCount: number + bronzeWinnersCount: number + goldMinCorrect: number | null + silverMinCorrect: number | null + bronzeMinCorrect: number | null + isProcessed: boolean + createdAt: Date + }, ExtArgs["result"]["dailyQuiz"]> + composites: {} + } + + type DailyQuizGetPayload = $Result.GetResult + + type DailyQuizCountArgs = + Omit & { + select?: DailyQuizCountAggregateInputType | true + } + + export interface DailyQuizDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['DailyQuiz'], meta: { name: 'DailyQuiz' } } + /** + * Find zero or one DailyQuiz that matches the filter. + * @param {DailyQuizFindUniqueArgs} args - Arguments to find a DailyQuiz + * @example + * // Get one DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one DailyQuiz that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {DailyQuizFindUniqueOrThrowArgs} args - Arguments to find a DailyQuiz + * @example + * // Get one DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first DailyQuiz that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizFindFirstArgs} args - Arguments to find a DailyQuiz + * @example + * // Get one DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first DailyQuiz that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizFindFirstOrThrowArgs} args - Arguments to find a DailyQuiz + * @example + * // Get one DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more DailyQuizs that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all DailyQuizs + * const dailyQuizs = await prisma.dailyQuiz.findMany() + * + * // Get first 10 DailyQuizs + * const dailyQuizs = await prisma.dailyQuiz.findMany({ take: 10 }) + * + * // Only select the `id` + * const dailyQuizWithIdOnly = await prisma.dailyQuiz.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a DailyQuiz. + * @param {DailyQuizCreateArgs} args - Arguments to create a DailyQuiz. + * @example + * // Create one DailyQuiz + * const DailyQuiz = await prisma.dailyQuiz.create({ + * data: { + * // ... data to create a DailyQuiz + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many DailyQuizs. + * @param {DailyQuizCreateManyArgs} args - Arguments to create many DailyQuizs. + * @example + * // Create many DailyQuizs + * const dailyQuiz = await prisma.dailyQuiz.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many DailyQuizs and returns the data saved in the database. + * @param {DailyQuizCreateManyAndReturnArgs} args - Arguments to create many DailyQuizs. + * @example + * // Create many DailyQuizs + * const dailyQuiz = await prisma.dailyQuiz.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many DailyQuizs and only return the `id` + * const dailyQuizWithIdOnly = await prisma.dailyQuiz.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a DailyQuiz. + * @param {DailyQuizDeleteArgs} args - Arguments to delete one DailyQuiz. + * @example + * // Delete one DailyQuiz + * const DailyQuiz = await prisma.dailyQuiz.delete({ + * where: { + * // ... filter to delete one DailyQuiz + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one DailyQuiz. + * @param {DailyQuizUpdateArgs} args - Arguments to update one DailyQuiz. + * @example + * // Update one DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more DailyQuizs. + * @param {DailyQuizDeleteManyArgs} args - Arguments to filter DailyQuizs to delete. + * @example + * // Delete a few DailyQuizs + * const { count } = await prisma.dailyQuiz.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more DailyQuizs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many DailyQuizs + * const dailyQuiz = await prisma.dailyQuiz.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more DailyQuizs and returns the data updated in the database. + * @param {DailyQuizUpdateManyAndReturnArgs} args - Arguments to update many DailyQuizs. + * @example + * // Update many DailyQuizs + * const dailyQuiz = await prisma.dailyQuiz.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more DailyQuizs and only return the `id` + * const dailyQuizWithIdOnly = await prisma.dailyQuiz.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one DailyQuiz. + * @param {DailyQuizUpsertArgs} args - Arguments to update or create a DailyQuiz. + * @example + * // Update or create a DailyQuiz + * const dailyQuiz = await prisma.dailyQuiz.upsert({ + * create: { + * // ... data to create a DailyQuiz + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the DailyQuiz we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__DailyQuizClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of DailyQuizs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizCountArgs} args - Arguments to filter DailyQuizs to count. + * @example + * // Count the number of DailyQuizs + * const count = await prisma.dailyQuiz.count({ + * where: { + * // ... the filter for the DailyQuizs we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a DailyQuiz. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by DailyQuiz. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {DailyQuizGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends DailyQuizGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: DailyQuizGroupByArgs['orderBy'] } + : { orderBy?: DailyQuizGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetDailyQuizGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the DailyQuiz model + */ + readonly fields: DailyQuizFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for DailyQuiz. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__DailyQuizClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + questions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + submissions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + awardedCards = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the DailyQuiz model + */ + interface DailyQuizFieldRefs { + readonly id: FieldRef<"DailyQuiz", 'String'> + readonly date: FieldRef<"DailyQuiz", 'DateTime'> + readonly windowStart: FieldRef<"DailyQuiz", 'DateTime'> + readonly windowEnd: FieldRef<"DailyQuiz", 'DateTime'> + readonly goldWinnersCount: FieldRef<"DailyQuiz", 'Int'> + readonly silverWinnersCount: FieldRef<"DailyQuiz", 'Int'> + readonly bronzeWinnersCount: FieldRef<"DailyQuiz", 'Int'> + readonly goldMinCorrect: FieldRef<"DailyQuiz", 'Int'> + readonly silverMinCorrect: FieldRef<"DailyQuiz", 'Int'> + readonly bronzeMinCorrect: FieldRef<"DailyQuiz", 'Int'> + readonly isProcessed: FieldRef<"DailyQuiz", 'Boolean'> + readonly createdAt: FieldRef<"DailyQuiz", 'DateTime'> + } + + + // Custom InputTypes + /** + * DailyQuiz findUnique + */ + export type DailyQuizFindUniqueArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter, which DailyQuiz to fetch. + */ + where: DailyQuizWhereUniqueInput + } + + /** + * DailyQuiz findUniqueOrThrow + */ + export type DailyQuizFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter, which DailyQuiz to fetch. + */ + where: DailyQuizWhereUniqueInput + } + + /** + * DailyQuiz findFirst + */ + export type DailyQuizFindFirstArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter, which DailyQuiz to fetch. + */ + where?: DailyQuizWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DailyQuizs to fetch. + */ + orderBy?: DailyQuizOrderByWithRelationInput | DailyQuizOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for DailyQuizs. + */ + cursor?: DailyQuizWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DailyQuizs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DailyQuizs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of DailyQuizs. + */ + distinct?: DailyQuizScalarFieldEnum | DailyQuizScalarFieldEnum[] + } + + /** + * DailyQuiz findFirstOrThrow + */ + export type DailyQuizFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter, which DailyQuiz to fetch. + */ + where?: DailyQuizWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DailyQuizs to fetch. + */ + orderBy?: DailyQuizOrderByWithRelationInput | DailyQuizOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for DailyQuizs. + */ + cursor?: DailyQuizWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DailyQuizs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DailyQuizs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of DailyQuizs. + */ + distinct?: DailyQuizScalarFieldEnum | DailyQuizScalarFieldEnum[] + } + + /** + * DailyQuiz findMany + */ + export type DailyQuizFindManyArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter, which DailyQuizs to fetch. + */ + where?: DailyQuizWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of DailyQuizs to fetch. + */ + orderBy?: DailyQuizOrderByWithRelationInput | DailyQuizOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing DailyQuizs. + */ + cursor?: DailyQuizWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` DailyQuizs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` DailyQuizs. + */ + skip?: number + distinct?: DailyQuizScalarFieldEnum | DailyQuizScalarFieldEnum[] + } + + /** + * DailyQuiz create + */ + export type DailyQuizCreateArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * The data needed to create a DailyQuiz. + */ + data: XOR + } + + /** + * DailyQuiz createMany + */ + export type DailyQuizCreateManyArgs = { + /** + * The data used to create many DailyQuizs. + */ + data: DailyQuizCreateManyInput | DailyQuizCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * DailyQuiz createManyAndReturn + */ + export type DailyQuizCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelectCreateManyAndReturn | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * The data used to create many DailyQuizs. + */ + data: DailyQuizCreateManyInput | DailyQuizCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * DailyQuiz update + */ + export type DailyQuizUpdateArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * The data needed to update a DailyQuiz. + */ + data: XOR + /** + * Choose, which DailyQuiz to update. + */ + where: DailyQuizWhereUniqueInput + } + + /** + * DailyQuiz updateMany + */ + export type DailyQuizUpdateManyArgs = { + /** + * The data used to update DailyQuizs. + */ + data: XOR + /** + * Filter which DailyQuizs to update + */ + where?: DailyQuizWhereInput + /** + * Limit how many DailyQuizs to update. + */ + limit?: number + } + + /** + * DailyQuiz updateManyAndReturn + */ + export type DailyQuizUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * The data used to update DailyQuizs. + */ + data: XOR + /** + * Filter which DailyQuizs to update + */ + where?: DailyQuizWhereInput + /** + * Limit how many DailyQuizs to update. + */ + limit?: number + } + + /** + * DailyQuiz upsert + */ + export type DailyQuizUpsertArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * The filter to search for the DailyQuiz to update in case it exists. + */ + where: DailyQuizWhereUniqueInput + /** + * In case the DailyQuiz found by the `where` argument doesn't exist, create a new DailyQuiz with this data. + */ + create: XOR + /** + * In case the DailyQuiz was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * DailyQuiz delete + */ + export type DailyQuizDeleteArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + /** + * Filter which DailyQuiz to delete. + */ + where: DailyQuizWhereUniqueInput + } + + /** + * DailyQuiz deleteMany + */ + export type DailyQuizDeleteManyArgs = { + /** + * Filter which DailyQuizs to delete + */ + where?: DailyQuizWhereInput + /** + * Limit how many DailyQuizs to delete. + */ + limit?: number + } + + /** + * DailyQuiz.questions + */ + export type DailyQuiz$questionsArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + where?: QuizQuestionWhereInput + orderBy?: QuizQuestionOrderByWithRelationInput | QuizQuestionOrderByWithRelationInput[] + cursor?: QuizQuestionWhereUniqueInput + take?: number + skip?: number + distinct?: QuizQuestionScalarFieldEnum | QuizQuestionScalarFieldEnum[] + } + + /** + * DailyQuiz.submissions + */ + export type DailyQuiz$submissionsArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + where?: QuizSubmissionWhereInput + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + cursor?: QuizSubmissionWhereUniqueInput + take?: number + skip?: number + distinct?: QuizSubmissionScalarFieldEnum | QuizSubmissionScalarFieldEnum[] + } + + /** + * DailyQuiz.awardedCards + */ + export type DailyQuiz$awardedCardsArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + where?: GoldenCardWhereInput + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + cursor?: GoldenCardWhereUniqueInput + take?: number + skip?: number + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * DailyQuiz without action + */ + export type DailyQuizDefaultArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + } + + + /** + * Model QuizQuestion + */ + + export type AggregateQuizQuestion = { + _count: QuizQuestionCountAggregateOutputType | null + _avg: QuizQuestionAvgAggregateOutputType | null + _sum: QuizQuestionSumAggregateOutputType | null + _min: QuizQuestionMinAggregateOutputType | null + _max: QuizQuestionMaxAggregateOutputType | null + } + + export type QuizQuestionAvgAggregateOutputType = { + correctAnswer: number | null + order: number | null + } + + export type QuizQuestionSumAggregateOutputType = { + correctAnswer: number | null + order: number | null + } + + export type QuizQuestionMinAggregateOutputType = { + id: string | null + quizId: string | null + questionText: string | null + correctAnswer: number | null + order: number | null + } + + export type QuizQuestionMaxAggregateOutputType = { + id: string | null + quizId: string | null + questionText: string | null + correctAnswer: number | null + order: number | null + } + + export type QuizQuestionCountAggregateOutputType = { + id: number + quizId: number + questionText: number + options: number + correctAnswer: number + order: number + _all: number + } + + + export type QuizQuestionAvgAggregateInputType = { + correctAnswer?: true + order?: true + } + + export type QuizQuestionSumAggregateInputType = { + correctAnswer?: true + order?: true + } + + export type QuizQuestionMinAggregateInputType = { + id?: true + quizId?: true + questionText?: true + correctAnswer?: true + order?: true + } + + export type QuizQuestionMaxAggregateInputType = { + id?: true + quizId?: true + questionText?: true + correctAnswer?: true + order?: true + } + + export type QuizQuestionCountAggregateInputType = { + id?: true + quizId?: true + questionText?: true + options?: true + correctAnswer?: true + order?: true + _all?: true + } + + export type QuizQuestionAggregateArgs = { + /** + * Filter which QuizQuestion to aggregate. + */ + where?: QuizQuestionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizQuestions to fetch. + */ + orderBy?: QuizQuestionOrderByWithRelationInput | QuizQuestionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: QuizQuestionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizQuestions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizQuestions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned QuizQuestions + **/ + _count?: true | QuizQuestionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: QuizQuestionAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: QuizQuestionSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: QuizQuestionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: QuizQuestionMaxAggregateInputType + } + + export type GetQuizQuestionAggregateType = { + [P in keyof T & keyof AggregateQuizQuestion]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type QuizQuestionGroupByArgs = { + where?: QuizQuestionWhereInput + orderBy?: QuizQuestionOrderByWithAggregationInput | QuizQuestionOrderByWithAggregationInput[] + by: QuizQuestionScalarFieldEnum[] | QuizQuestionScalarFieldEnum + having?: QuizQuestionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: QuizQuestionCountAggregateInputType | true + _avg?: QuizQuestionAvgAggregateInputType + _sum?: QuizQuestionSumAggregateInputType + _min?: QuizQuestionMinAggregateInputType + _max?: QuizQuestionMaxAggregateInputType + } + + export type QuizQuestionGroupByOutputType = { + id: string + quizId: string + questionText: string + options: string[] + correctAnswer: number + order: number + _count: QuizQuestionCountAggregateOutputType | null + _avg: QuizQuestionAvgAggregateOutputType | null + _sum: QuizQuestionSumAggregateOutputType | null + _min: QuizQuestionMinAggregateOutputType | null + _max: QuizQuestionMaxAggregateOutputType | null + } + + type GetQuizQuestionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof QuizQuestionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type QuizQuestionSelect = $Extensions.GetSelect<{ + id?: boolean + quizId?: boolean + questionText?: boolean + options?: boolean + correctAnswer?: boolean + order?: boolean + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizQuestion"]> + + export type QuizQuestionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + quizId?: boolean + questionText?: boolean + options?: boolean + correctAnswer?: boolean + order?: boolean + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizQuestion"]> + + export type QuizQuestionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + quizId?: boolean + questionText?: boolean + options?: boolean + correctAnswer?: boolean + order?: boolean + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizQuestion"]> + + export type QuizQuestionSelectScalar = { + id?: boolean + quizId?: boolean + questionText?: boolean + options?: boolean + correctAnswer?: boolean + order?: boolean + } + + export type QuizQuestionOmit = $Extensions.GetOmit<"id" | "quizId" | "questionText" | "options" | "correctAnswer" | "order", ExtArgs["result"]["quizQuestion"]> + export type QuizQuestionInclude = { + quiz?: boolean | DailyQuizDefaultArgs + } + export type QuizQuestionIncludeCreateManyAndReturn = { + quiz?: boolean | DailyQuizDefaultArgs + } + export type QuizQuestionIncludeUpdateManyAndReturn = { + quiz?: boolean | DailyQuizDefaultArgs + } + + export type $QuizQuestionPayload = { + name: "QuizQuestion" + objects: { + quiz: Prisma.$DailyQuizPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + quizId: string + questionText: string + options: string[] + correctAnswer: number + order: number + }, ExtArgs["result"]["quizQuestion"]> + composites: {} + } + + type QuizQuestionGetPayload = $Result.GetResult + + type QuizQuestionCountArgs = + Omit & { + select?: QuizQuestionCountAggregateInputType | true + } + + export interface QuizQuestionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['QuizQuestion'], meta: { name: 'QuizQuestion' } } + /** + * Find zero or one QuizQuestion that matches the filter. + * @param {QuizQuestionFindUniqueArgs} args - Arguments to find a QuizQuestion + * @example + * // Get one QuizQuestion + * const quizQuestion = await prisma.quizQuestion.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one QuizQuestion that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {QuizQuestionFindUniqueOrThrowArgs} args - Arguments to find a QuizQuestion + * @example + * // Get one QuizQuestion + * const quizQuestion = await prisma.quizQuestion.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first QuizQuestion that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionFindFirstArgs} args - Arguments to find a QuizQuestion + * @example + * // Get one QuizQuestion + * const quizQuestion = await prisma.quizQuestion.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first QuizQuestion that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionFindFirstOrThrowArgs} args - Arguments to find a QuizQuestion + * @example + * // Get one QuizQuestion + * const quizQuestion = await prisma.quizQuestion.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more QuizQuestions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all QuizQuestions + * const quizQuestions = await prisma.quizQuestion.findMany() + * + * // Get first 10 QuizQuestions + * const quizQuestions = await prisma.quizQuestion.findMany({ take: 10 }) + * + * // Only select the `id` + * const quizQuestionWithIdOnly = await prisma.quizQuestion.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a QuizQuestion. + * @param {QuizQuestionCreateArgs} args - Arguments to create a QuizQuestion. + * @example + * // Create one QuizQuestion + * const QuizQuestion = await prisma.quizQuestion.create({ + * data: { + * // ... data to create a QuizQuestion + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many QuizQuestions. + * @param {QuizQuestionCreateManyArgs} args - Arguments to create many QuizQuestions. + * @example + * // Create many QuizQuestions + * const quizQuestion = await prisma.quizQuestion.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many QuizQuestions and returns the data saved in the database. + * @param {QuizQuestionCreateManyAndReturnArgs} args - Arguments to create many QuizQuestions. + * @example + * // Create many QuizQuestions + * const quizQuestion = await prisma.quizQuestion.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many QuizQuestions and only return the `id` + * const quizQuestionWithIdOnly = await prisma.quizQuestion.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a QuizQuestion. + * @param {QuizQuestionDeleteArgs} args - Arguments to delete one QuizQuestion. + * @example + * // Delete one QuizQuestion + * const QuizQuestion = await prisma.quizQuestion.delete({ + * where: { + * // ... filter to delete one QuizQuestion + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one QuizQuestion. + * @param {QuizQuestionUpdateArgs} args - Arguments to update one QuizQuestion. + * @example + * // Update one QuizQuestion + * const quizQuestion = await prisma.quizQuestion.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more QuizQuestions. + * @param {QuizQuestionDeleteManyArgs} args - Arguments to filter QuizQuestions to delete. + * @example + * // Delete a few QuizQuestions + * const { count } = await prisma.quizQuestion.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more QuizQuestions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many QuizQuestions + * const quizQuestion = await prisma.quizQuestion.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more QuizQuestions and returns the data updated in the database. + * @param {QuizQuestionUpdateManyAndReturnArgs} args - Arguments to update many QuizQuestions. + * @example + * // Update many QuizQuestions + * const quizQuestion = await prisma.quizQuestion.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more QuizQuestions and only return the `id` + * const quizQuestionWithIdOnly = await prisma.quizQuestion.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one QuizQuestion. + * @param {QuizQuestionUpsertArgs} args - Arguments to update or create a QuizQuestion. + * @example + * // Update or create a QuizQuestion + * const quizQuestion = await prisma.quizQuestion.upsert({ + * create: { + * // ... data to create a QuizQuestion + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the QuizQuestion we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__QuizQuestionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of QuizQuestions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionCountArgs} args - Arguments to filter QuizQuestions to count. + * @example + * // Count the number of QuizQuestions + * const count = await prisma.quizQuestion.count({ + * where: { + * // ... the filter for the QuizQuestions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a QuizQuestion. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by QuizQuestion. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizQuestionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends QuizQuestionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: QuizQuestionGroupByArgs['orderBy'] } + : { orderBy?: QuizQuestionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetQuizQuestionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the QuizQuestion model + */ + readonly fields: QuizQuestionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for QuizQuestion. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__QuizQuestionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + quiz = {}>(args?: Subset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the QuizQuestion model + */ + interface QuizQuestionFieldRefs { + readonly id: FieldRef<"QuizQuestion", 'String'> + readonly quizId: FieldRef<"QuizQuestion", 'String'> + readonly questionText: FieldRef<"QuizQuestion", 'String'> + readonly options: FieldRef<"QuizQuestion", 'String[]'> + readonly correctAnswer: FieldRef<"QuizQuestion", 'Int'> + readonly order: FieldRef<"QuizQuestion", 'Int'> + } + + + // Custom InputTypes + /** + * QuizQuestion findUnique + */ + export type QuizQuestionFindUniqueArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter, which QuizQuestion to fetch. + */ + where: QuizQuestionWhereUniqueInput + } + + /** + * QuizQuestion findUniqueOrThrow + */ + export type QuizQuestionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter, which QuizQuestion to fetch. + */ + where: QuizQuestionWhereUniqueInput + } + + /** + * QuizQuestion findFirst + */ + export type QuizQuestionFindFirstArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter, which QuizQuestion to fetch. + */ + where?: QuizQuestionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizQuestions to fetch. + */ + orderBy?: QuizQuestionOrderByWithRelationInput | QuizQuestionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for QuizQuestions. + */ + cursor?: QuizQuestionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizQuestions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizQuestions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of QuizQuestions. + */ + distinct?: QuizQuestionScalarFieldEnum | QuizQuestionScalarFieldEnum[] + } + + /** + * QuizQuestion findFirstOrThrow + */ + export type QuizQuestionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter, which QuizQuestion to fetch. + */ + where?: QuizQuestionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizQuestions to fetch. + */ + orderBy?: QuizQuestionOrderByWithRelationInput | QuizQuestionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for QuizQuestions. + */ + cursor?: QuizQuestionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizQuestions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizQuestions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of QuizQuestions. + */ + distinct?: QuizQuestionScalarFieldEnum | QuizQuestionScalarFieldEnum[] + } + + /** + * QuizQuestion findMany + */ + export type QuizQuestionFindManyArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter, which QuizQuestions to fetch. + */ + where?: QuizQuestionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizQuestions to fetch. + */ + orderBy?: QuizQuestionOrderByWithRelationInput | QuizQuestionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing QuizQuestions. + */ + cursor?: QuizQuestionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizQuestions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizQuestions. + */ + skip?: number + distinct?: QuizQuestionScalarFieldEnum | QuizQuestionScalarFieldEnum[] + } + + /** + * QuizQuestion create + */ + export type QuizQuestionCreateArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * The data needed to create a QuizQuestion. + */ + data: XOR + } + + /** + * QuizQuestion createMany + */ + export type QuizQuestionCreateManyArgs = { + /** + * The data used to create many QuizQuestions. + */ + data: QuizQuestionCreateManyInput | QuizQuestionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * QuizQuestion createManyAndReturn + */ + export type QuizQuestionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * The data used to create many QuizQuestions. + */ + data: QuizQuestionCreateManyInput | QuizQuestionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionIncludeCreateManyAndReturn | null + } + + /** + * QuizQuestion update + */ + export type QuizQuestionUpdateArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * The data needed to update a QuizQuestion. + */ + data: XOR + /** + * Choose, which QuizQuestion to update. + */ + where: QuizQuestionWhereUniqueInput + } + + /** + * QuizQuestion updateMany + */ + export type QuizQuestionUpdateManyArgs = { + /** + * The data used to update QuizQuestions. + */ + data: XOR + /** + * Filter which QuizQuestions to update + */ + where?: QuizQuestionWhereInput + /** + * Limit how many QuizQuestions to update. + */ + limit?: number + } + + /** + * QuizQuestion updateManyAndReturn + */ + export type QuizQuestionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * The data used to update QuizQuestions. + */ + data: XOR + /** + * Filter which QuizQuestions to update + */ + where?: QuizQuestionWhereInput + /** + * Limit how many QuizQuestions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionIncludeUpdateManyAndReturn | null + } + + /** + * QuizQuestion upsert + */ + export type QuizQuestionUpsertArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * The filter to search for the QuizQuestion to update in case it exists. + */ + where: QuizQuestionWhereUniqueInput + /** + * In case the QuizQuestion found by the `where` argument doesn't exist, create a new QuizQuestion with this data. + */ + create: XOR + /** + * In case the QuizQuestion was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * QuizQuestion delete + */ + export type QuizQuestionDeleteArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + /** + * Filter which QuizQuestion to delete. + */ + where: QuizQuestionWhereUniqueInput + } + + /** + * QuizQuestion deleteMany + */ + export type QuizQuestionDeleteManyArgs = { + /** + * Filter which QuizQuestions to delete + */ + where?: QuizQuestionWhereInput + /** + * Limit how many QuizQuestions to delete. + */ + limit?: number + } + + /** + * QuizQuestion without action + */ + export type QuizQuestionDefaultArgs = { + /** + * Select specific fields to fetch from the QuizQuestion + */ + select?: QuizQuestionSelect | null + /** + * Omit specific fields from the QuizQuestion + */ + omit?: QuizQuestionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizQuestionInclude | null + } + + + /** + * Model QuizSubmission + */ + + export type AggregateQuizSubmission = { + _count: QuizSubmissionCountAggregateOutputType | null + _avg: QuizSubmissionAvgAggregateOutputType | null + _sum: QuizSubmissionSumAggregateOutputType | null + _min: QuizSubmissionMinAggregateOutputType | null + _max: QuizSubmissionMaxAggregateOutputType | null + } + + export type QuizSubmissionAvgAggregateOutputType = { + answers: number | null + correctAnswers: number | null + score: number | null + } + + export type QuizSubmissionSumAggregateOutputType = { + answers: number[] + correctAnswers: number | null + score: number | null + } + + export type QuizSubmissionMinAggregateOutputType = { + id: string | null + userId: string | null + quizId: string | null + correctAnswers: number | null + score: number | null + submittedAt: Date | null + } + + export type QuizSubmissionMaxAggregateOutputType = { + id: string | null + userId: string | null + quizId: string | null + correctAnswers: number | null + score: number | null + submittedAt: Date | null + } + + export type QuizSubmissionCountAggregateOutputType = { + id: number + userId: number + quizId: number + answers: number + correctAnswers: number + score: number + submittedAt: number + _all: number + } + + + export type QuizSubmissionAvgAggregateInputType = { + answers?: true + correctAnswers?: true + score?: true + } + + export type QuizSubmissionSumAggregateInputType = { + answers?: true + correctAnswers?: true + score?: true + } + + export type QuizSubmissionMinAggregateInputType = { + id?: true + userId?: true + quizId?: true + correctAnswers?: true + score?: true + submittedAt?: true + } + + export type QuizSubmissionMaxAggregateInputType = { + id?: true + userId?: true + quizId?: true + correctAnswers?: true + score?: true + submittedAt?: true + } + + export type QuizSubmissionCountAggregateInputType = { + id?: true + userId?: true + quizId?: true + answers?: true + correctAnswers?: true + score?: true + submittedAt?: true + _all?: true + } + + export type QuizSubmissionAggregateArgs = { + /** + * Filter which QuizSubmission to aggregate. + */ + where?: QuizSubmissionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizSubmissions to fetch. + */ + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: QuizSubmissionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizSubmissions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizSubmissions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned QuizSubmissions + **/ + _count?: true | QuizSubmissionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: QuizSubmissionAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: QuizSubmissionSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: QuizSubmissionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: QuizSubmissionMaxAggregateInputType + } + + export type GetQuizSubmissionAggregateType = { + [P in keyof T & keyof AggregateQuizSubmission]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type QuizSubmissionGroupByArgs = { + where?: QuizSubmissionWhereInput + orderBy?: QuizSubmissionOrderByWithAggregationInput | QuizSubmissionOrderByWithAggregationInput[] + by: QuizSubmissionScalarFieldEnum[] | QuizSubmissionScalarFieldEnum + having?: QuizSubmissionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: QuizSubmissionCountAggregateInputType | true + _avg?: QuizSubmissionAvgAggregateInputType + _sum?: QuizSubmissionSumAggregateInputType + _min?: QuizSubmissionMinAggregateInputType + _max?: QuizSubmissionMaxAggregateInputType + } + + export type QuizSubmissionGroupByOutputType = { + id: string + userId: string + quizId: string + answers: number[] + correctAnswers: number + score: number + submittedAt: Date + _count: QuizSubmissionCountAggregateOutputType | null + _avg: QuizSubmissionAvgAggregateOutputType | null + _sum: QuizSubmissionSumAggregateOutputType | null + _min: QuizSubmissionMinAggregateOutputType | null + _max: QuizSubmissionMaxAggregateOutputType | null + } + + type GetQuizSubmissionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof QuizSubmissionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type QuizSubmissionSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + answers?: boolean + correctAnswers?: boolean + score?: boolean + submittedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizSubmission"]> + + export type QuizSubmissionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + answers?: boolean + correctAnswers?: boolean + score?: boolean + submittedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizSubmission"]> + + export type QuizSubmissionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + answers?: boolean + correctAnswers?: boolean + score?: boolean + submittedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + }, ExtArgs["result"]["quizSubmission"]> + + export type QuizSubmissionSelectScalar = { + id?: boolean + userId?: boolean + quizId?: boolean + answers?: boolean + correctAnswers?: boolean + score?: boolean + submittedAt?: boolean + } + + export type QuizSubmissionOmit = $Extensions.GetOmit<"id" | "userId" | "quizId" | "answers" | "correctAnswers" | "score" | "submittedAt", ExtArgs["result"]["quizSubmission"]> + export type QuizSubmissionInclude = { + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + } + export type QuizSubmissionIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + } + export type QuizSubmissionIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + quiz?: boolean | DailyQuizDefaultArgs + } + + export type $QuizSubmissionPayload = { + name: "QuizSubmission" + objects: { + user: Prisma.$UserPayload + quiz: Prisma.$DailyQuizPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + quizId: string + answers: number[] + correctAnswers: number + score: number + submittedAt: Date + }, ExtArgs["result"]["quizSubmission"]> + composites: {} + } + + type QuizSubmissionGetPayload = $Result.GetResult + + type QuizSubmissionCountArgs = + Omit & { + select?: QuizSubmissionCountAggregateInputType | true + } + + export interface QuizSubmissionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['QuizSubmission'], meta: { name: 'QuizSubmission' } } + /** + * Find zero or one QuizSubmission that matches the filter. + * @param {QuizSubmissionFindUniqueArgs} args - Arguments to find a QuizSubmission + * @example + * // Get one QuizSubmission + * const quizSubmission = await prisma.quizSubmission.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one QuizSubmission that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {QuizSubmissionFindUniqueOrThrowArgs} args - Arguments to find a QuizSubmission + * @example + * // Get one QuizSubmission + * const quizSubmission = await prisma.quizSubmission.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first QuizSubmission that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionFindFirstArgs} args - Arguments to find a QuizSubmission + * @example + * // Get one QuizSubmission + * const quizSubmission = await prisma.quizSubmission.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first QuizSubmission that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionFindFirstOrThrowArgs} args - Arguments to find a QuizSubmission + * @example + * // Get one QuizSubmission + * const quizSubmission = await prisma.quizSubmission.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more QuizSubmissions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all QuizSubmissions + * const quizSubmissions = await prisma.quizSubmission.findMany() + * + * // Get first 10 QuizSubmissions + * const quizSubmissions = await prisma.quizSubmission.findMany({ take: 10 }) + * + * // Only select the `id` + * const quizSubmissionWithIdOnly = await prisma.quizSubmission.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a QuizSubmission. + * @param {QuizSubmissionCreateArgs} args - Arguments to create a QuizSubmission. + * @example + * // Create one QuizSubmission + * const QuizSubmission = await prisma.quizSubmission.create({ + * data: { + * // ... data to create a QuizSubmission + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many QuizSubmissions. + * @param {QuizSubmissionCreateManyArgs} args - Arguments to create many QuizSubmissions. + * @example + * // Create many QuizSubmissions + * const quizSubmission = await prisma.quizSubmission.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many QuizSubmissions and returns the data saved in the database. + * @param {QuizSubmissionCreateManyAndReturnArgs} args - Arguments to create many QuizSubmissions. + * @example + * // Create many QuizSubmissions + * const quizSubmission = await prisma.quizSubmission.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many QuizSubmissions and only return the `id` + * const quizSubmissionWithIdOnly = await prisma.quizSubmission.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a QuizSubmission. + * @param {QuizSubmissionDeleteArgs} args - Arguments to delete one QuizSubmission. + * @example + * // Delete one QuizSubmission + * const QuizSubmission = await prisma.quizSubmission.delete({ + * where: { + * // ... filter to delete one QuizSubmission + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one QuizSubmission. + * @param {QuizSubmissionUpdateArgs} args - Arguments to update one QuizSubmission. + * @example + * // Update one QuizSubmission + * const quizSubmission = await prisma.quizSubmission.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more QuizSubmissions. + * @param {QuizSubmissionDeleteManyArgs} args - Arguments to filter QuizSubmissions to delete. + * @example + * // Delete a few QuizSubmissions + * const { count } = await prisma.quizSubmission.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more QuizSubmissions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many QuizSubmissions + * const quizSubmission = await prisma.quizSubmission.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more QuizSubmissions and returns the data updated in the database. + * @param {QuizSubmissionUpdateManyAndReturnArgs} args - Arguments to update many QuizSubmissions. + * @example + * // Update many QuizSubmissions + * const quizSubmission = await prisma.quizSubmission.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more QuizSubmissions and only return the `id` + * const quizSubmissionWithIdOnly = await prisma.quizSubmission.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one QuizSubmission. + * @param {QuizSubmissionUpsertArgs} args - Arguments to update or create a QuizSubmission. + * @example + * // Update or create a QuizSubmission + * const quizSubmission = await prisma.quizSubmission.upsert({ + * create: { + * // ... data to create a QuizSubmission + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the QuizSubmission we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__QuizSubmissionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of QuizSubmissions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionCountArgs} args - Arguments to filter QuizSubmissions to count. + * @example + * // Count the number of QuizSubmissions + * const count = await prisma.quizSubmission.count({ + * where: { + * // ... the filter for the QuizSubmissions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a QuizSubmission. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by QuizSubmission. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {QuizSubmissionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends QuizSubmissionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: QuizSubmissionGroupByArgs['orderBy'] } + : { orderBy?: QuizSubmissionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetQuizSubmissionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the QuizSubmission model + */ + readonly fields: QuizSubmissionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for QuizSubmission. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__QuizSubmissionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + quiz = {}>(args?: Subset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the QuizSubmission model + */ + interface QuizSubmissionFieldRefs { + readonly id: FieldRef<"QuizSubmission", 'String'> + readonly userId: FieldRef<"QuizSubmission", 'String'> + readonly quizId: FieldRef<"QuizSubmission", 'String'> + readonly answers: FieldRef<"QuizSubmission", 'Int[]'> + readonly correctAnswers: FieldRef<"QuizSubmission", 'Int'> + readonly score: FieldRef<"QuizSubmission", 'Int'> + readonly submittedAt: FieldRef<"QuizSubmission", 'DateTime'> + } + + + // Custom InputTypes + /** + * QuizSubmission findUnique + */ + export type QuizSubmissionFindUniqueArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter, which QuizSubmission to fetch. + */ + where: QuizSubmissionWhereUniqueInput + } + + /** + * QuizSubmission findUniqueOrThrow + */ + export type QuizSubmissionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter, which QuizSubmission to fetch. + */ + where: QuizSubmissionWhereUniqueInput + } + + /** + * QuizSubmission findFirst + */ + export type QuizSubmissionFindFirstArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter, which QuizSubmission to fetch. + */ + where?: QuizSubmissionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizSubmissions to fetch. + */ + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for QuizSubmissions. + */ + cursor?: QuizSubmissionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizSubmissions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizSubmissions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of QuizSubmissions. + */ + distinct?: QuizSubmissionScalarFieldEnum | QuizSubmissionScalarFieldEnum[] + } + + /** + * QuizSubmission findFirstOrThrow + */ + export type QuizSubmissionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter, which QuizSubmission to fetch. + */ + where?: QuizSubmissionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizSubmissions to fetch. + */ + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for QuizSubmissions. + */ + cursor?: QuizSubmissionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizSubmissions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizSubmissions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of QuizSubmissions. + */ + distinct?: QuizSubmissionScalarFieldEnum | QuizSubmissionScalarFieldEnum[] + } + + /** + * QuizSubmission findMany + */ + export type QuizSubmissionFindManyArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter, which QuizSubmissions to fetch. + */ + where?: QuizSubmissionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of QuizSubmissions to fetch. + */ + orderBy?: QuizSubmissionOrderByWithRelationInput | QuizSubmissionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing QuizSubmissions. + */ + cursor?: QuizSubmissionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` QuizSubmissions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` QuizSubmissions. + */ + skip?: number + distinct?: QuizSubmissionScalarFieldEnum | QuizSubmissionScalarFieldEnum[] + } + + /** + * QuizSubmission create + */ + export type QuizSubmissionCreateArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * The data needed to create a QuizSubmission. + */ + data: XOR + } + + /** + * QuizSubmission createMany + */ + export type QuizSubmissionCreateManyArgs = { + /** + * The data used to create many QuizSubmissions. + */ + data: QuizSubmissionCreateManyInput | QuizSubmissionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * QuizSubmission createManyAndReturn + */ + export type QuizSubmissionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * The data used to create many QuizSubmissions. + */ + data: QuizSubmissionCreateManyInput | QuizSubmissionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionIncludeCreateManyAndReturn | null + } + + /** + * QuizSubmission update + */ + export type QuizSubmissionUpdateArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * The data needed to update a QuizSubmission. + */ + data: XOR + /** + * Choose, which QuizSubmission to update. + */ + where: QuizSubmissionWhereUniqueInput + } + + /** + * QuizSubmission updateMany + */ + export type QuizSubmissionUpdateManyArgs = { + /** + * The data used to update QuizSubmissions. + */ + data: XOR + /** + * Filter which QuizSubmissions to update + */ + where?: QuizSubmissionWhereInput + /** + * Limit how many QuizSubmissions to update. + */ + limit?: number + } + + /** + * QuizSubmission updateManyAndReturn + */ + export type QuizSubmissionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * The data used to update QuizSubmissions. + */ + data: XOR + /** + * Filter which QuizSubmissions to update + */ + where?: QuizSubmissionWhereInput + /** + * Limit how many QuizSubmissions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionIncludeUpdateManyAndReturn | null + } + + /** + * QuizSubmission upsert + */ + export type QuizSubmissionUpsertArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * The filter to search for the QuizSubmission to update in case it exists. + */ + where: QuizSubmissionWhereUniqueInput + /** + * In case the QuizSubmission found by the `where` argument doesn't exist, create a new QuizSubmission with this data. + */ + create: XOR + /** + * In case the QuizSubmission was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * QuizSubmission delete + */ + export type QuizSubmissionDeleteArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + /** + * Filter which QuizSubmission to delete. + */ + where: QuizSubmissionWhereUniqueInput + } + + /** + * QuizSubmission deleteMany + */ + export type QuizSubmissionDeleteManyArgs = { + /** + * Filter which QuizSubmissions to delete + */ + where?: QuizSubmissionWhereInput + /** + * Limit how many QuizSubmissions to delete. + */ + limit?: number + } + + /** + * QuizSubmission without action + */ + export type QuizSubmissionDefaultArgs = { + /** + * Select specific fields to fetch from the QuizSubmission + */ + select?: QuizSubmissionSelect | null + /** + * Omit specific fields from the QuizSubmission + */ + omit?: QuizSubmissionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: QuizSubmissionInclude | null + } + + + /** + * Model GoldenCard + */ + + export type AggregateGoldenCard = { + _count: GoldenCardCountAggregateOutputType | null + _min: GoldenCardMinAggregateOutputType | null + _max: GoldenCardMaxAggregateOutputType | null + } + + export type GoldenCardMinAggregateOutputType = { + id: string | null + userId: string | null + quizId: string | null + playerId: string | null + cardTier: $Enums.CardTier | null + status: $Enums.GoldenCardStatus | null + state: $Enums.SpecialCardState | null + acquiredDate: Date | null + openedAt: Date | null + } + + export type GoldenCardMaxAggregateOutputType = { + id: string | null + userId: string | null + quizId: string | null + playerId: string | null + cardTier: $Enums.CardTier | null + status: $Enums.GoldenCardStatus | null + state: $Enums.SpecialCardState | null + acquiredDate: Date | null + openedAt: Date | null + } + + export type GoldenCardCountAggregateOutputType = { + id: number + userId: number + quizId: number + playerId: number + cardTier: number + status: number + state: number + acquiredDate: number + openedAt: number + _all: number + } + + + export type GoldenCardMinAggregateInputType = { + id?: true + userId?: true + quizId?: true + playerId?: true + cardTier?: true + status?: true + state?: true + acquiredDate?: true + openedAt?: true + } + + export type GoldenCardMaxAggregateInputType = { + id?: true + userId?: true + quizId?: true + playerId?: true + cardTier?: true + status?: true + state?: true + acquiredDate?: true + openedAt?: true + } + + export type GoldenCardCountAggregateInputType = { + id?: true + userId?: true + quizId?: true + playerId?: true + cardTier?: true + status?: true + state?: true + acquiredDate?: true + openedAt?: true + _all?: true + } + + export type GoldenCardAggregateArgs = { + /** + * Filter which GoldenCard to aggregate. + */ + where?: GoldenCardWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldenCards to fetch. + */ + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: GoldenCardWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldenCards from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoldenCards. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned GoldenCards + **/ + _count?: true | GoldenCardCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GoldenCardMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GoldenCardMaxAggregateInputType + } + + export type GetGoldenCardAggregateType = { + [P in keyof T & keyof AggregateGoldenCard]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type GoldenCardGroupByArgs = { + where?: GoldenCardWhereInput + orderBy?: GoldenCardOrderByWithAggregationInput | GoldenCardOrderByWithAggregationInput[] + by: GoldenCardScalarFieldEnum[] | GoldenCardScalarFieldEnum + having?: GoldenCardScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GoldenCardCountAggregateInputType | true + _min?: GoldenCardMinAggregateInputType + _max?: GoldenCardMaxAggregateInputType + } + + export type GoldenCardGroupByOutputType = { + id: string + userId: string + quizId: string | null + playerId: string + cardTier: $Enums.CardTier + status: $Enums.GoldenCardStatus + state: $Enums.SpecialCardState + acquiredDate: Date + openedAt: Date | null + _count: GoldenCardCountAggregateOutputType | null + _min: GoldenCardMinAggregateOutputType | null + _max: GoldenCardMaxAggregateOutputType | null + } + + type GetGoldenCardGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof GoldenCardGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type GoldenCardSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + playerId?: boolean + cardTier?: boolean + status?: boolean + state?: boolean + acquiredDate?: boolean + openedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + teamPlayer?: boolean | GoldenCard$teamPlayerArgs + }, ExtArgs["result"]["goldenCard"]> + + export type GoldenCardSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + playerId?: boolean + cardTier?: boolean + status?: boolean + state?: boolean + acquiredDate?: boolean + openedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + }, ExtArgs["result"]["goldenCard"]> + + export type GoldenCardSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + quizId?: boolean + playerId?: boolean + cardTier?: boolean + status?: boolean + state?: boolean + acquiredDate?: boolean + openedAt?: boolean + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + }, ExtArgs["result"]["goldenCard"]> + + export type GoldenCardSelectScalar = { + id?: boolean + userId?: boolean + quizId?: boolean + playerId?: boolean + cardTier?: boolean + status?: boolean + state?: boolean + acquiredDate?: boolean + openedAt?: boolean + } + + export type GoldenCardOmit = $Extensions.GetOmit<"id" | "userId" | "quizId" | "playerId" | "cardTier" | "status" | "state" | "acquiredDate" | "openedAt", ExtArgs["result"]["goldenCard"]> + export type GoldenCardInclude = { + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + teamPlayer?: boolean | GoldenCard$teamPlayerArgs + } + export type GoldenCardIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + } + export type GoldenCardIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + quiz?: boolean | GoldenCard$quizArgs + player?: boolean | PlayerDefaultArgs + } + + export type $GoldenCardPayload = { + name: "GoldenCard" + objects: { + user: Prisma.$UserPayload + quiz: Prisma.$DailyQuizPayload | null + player: Prisma.$PlayerPayload + teamPlayer: Prisma.$TeamPlayerPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + quizId: string | null + playerId: string + cardTier: $Enums.CardTier + status: $Enums.GoldenCardStatus + state: $Enums.SpecialCardState + acquiredDate: Date + openedAt: Date | null + }, ExtArgs["result"]["goldenCard"]> + composites: {} + } + + type GoldenCardGetPayload = $Result.GetResult + + type GoldenCardCountArgs = + Omit & { + select?: GoldenCardCountAggregateInputType | true + } + + export interface GoldenCardDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['GoldenCard'], meta: { name: 'GoldenCard' } } + /** + * Find zero or one GoldenCard that matches the filter. + * @param {GoldenCardFindUniqueArgs} args - Arguments to find a GoldenCard + * @example + * // Get one GoldenCard + * const goldenCard = await prisma.goldenCard.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one GoldenCard that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GoldenCardFindUniqueOrThrowArgs} args - Arguments to find a GoldenCard + * @example + * // Get one GoldenCard + * const goldenCard = await prisma.goldenCard.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GoldenCard that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardFindFirstArgs} args - Arguments to find a GoldenCard + * @example + * // Get one GoldenCard + * const goldenCard = await prisma.goldenCard.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GoldenCard that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardFindFirstOrThrowArgs} args - Arguments to find a GoldenCard + * @example + * // Get one GoldenCard + * const goldenCard = await prisma.goldenCard.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more GoldenCards that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all GoldenCards + * const goldenCards = await prisma.goldenCard.findMany() + * + * // Get first 10 GoldenCards + * const goldenCards = await prisma.goldenCard.findMany({ take: 10 }) + * + * // Only select the `id` + * const goldenCardWithIdOnly = await prisma.goldenCard.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a GoldenCard. + * @param {GoldenCardCreateArgs} args - Arguments to create a GoldenCard. + * @example + * // Create one GoldenCard + * const GoldenCard = await prisma.goldenCard.create({ + * data: { + * // ... data to create a GoldenCard + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many GoldenCards. + * @param {GoldenCardCreateManyArgs} args - Arguments to create many GoldenCards. + * @example + * // Create many GoldenCards + * const goldenCard = await prisma.goldenCard.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many GoldenCards and returns the data saved in the database. + * @param {GoldenCardCreateManyAndReturnArgs} args - Arguments to create many GoldenCards. + * @example + * // Create many GoldenCards + * const goldenCard = await prisma.goldenCard.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many GoldenCards and only return the `id` + * const goldenCardWithIdOnly = await prisma.goldenCard.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a GoldenCard. + * @param {GoldenCardDeleteArgs} args - Arguments to delete one GoldenCard. + * @example + * // Delete one GoldenCard + * const GoldenCard = await prisma.goldenCard.delete({ + * where: { + * // ... filter to delete one GoldenCard + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one GoldenCard. + * @param {GoldenCardUpdateArgs} args - Arguments to update one GoldenCard. + * @example + * // Update one GoldenCard + * const goldenCard = await prisma.goldenCard.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more GoldenCards. + * @param {GoldenCardDeleteManyArgs} args - Arguments to filter GoldenCards to delete. + * @example + * // Delete a few GoldenCards + * const { count } = await prisma.goldenCard.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GoldenCards. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many GoldenCards + * const goldenCard = await prisma.goldenCard.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GoldenCards and returns the data updated in the database. + * @param {GoldenCardUpdateManyAndReturnArgs} args - Arguments to update many GoldenCards. + * @example + * // Update many GoldenCards + * const goldenCard = await prisma.goldenCard.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more GoldenCards and only return the `id` + * const goldenCardWithIdOnly = await prisma.goldenCard.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one GoldenCard. + * @param {GoldenCardUpsertArgs} args - Arguments to update or create a GoldenCard. + * @example + * // Update or create a GoldenCard + * const goldenCard = await prisma.goldenCard.upsert({ + * create: { + * // ... data to create a GoldenCard + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the GoldenCard we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__GoldenCardClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of GoldenCards. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardCountArgs} args - Arguments to filter GoldenCards to count. + * @example + * // Count the number of GoldenCards + * const count = await prisma.goldenCard.count({ + * where: { + * // ... the filter for the GoldenCards we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a GoldenCard. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by GoldenCard. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldenCardGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends GoldenCardGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: GoldenCardGroupByArgs['orderBy'] } + : { orderBy?: GoldenCardGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGoldenCardGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the GoldenCard model + */ + readonly fields: GoldenCardFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for GoldenCard. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__GoldenCardClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + quiz = {}>(args?: Subset>): Prisma__DailyQuizClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + player = {}>(args?: Subset>): Prisma__PlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + teamPlayer = {}>(args?: Subset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the GoldenCard model + */ + interface GoldenCardFieldRefs { + readonly id: FieldRef<"GoldenCard", 'String'> + readonly userId: FieldRef<"GoldenCard", 'String'> + readonly quizId: FieldRef<"GoldenCard", 'String'> + readonly playerId: FieldRef<"GoldenCard", 'String'> + readonly cardTier: FieldRef<"GoldenCard", 'CardTier'> + readonly status: FieldRef<"GoldenCard", 'GoldenCardStatus'> + readonly state: FieldRef<"GoldenCard", 'SpecialCardState'> + readonly acquiredDate: FieldRef<"GoldenCard", 'DateTime'> + readonly openedAt: FieldRef<"GoldenCard", 'DateTime'> + } + + + // Custom InputTypes + /** + * GoldenCard findUnique + */ + export type GoldenCardFindUniqueArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter, which GoldenCard to fetch. + */ + where: GoldenCardWhereUniqueInput + } + + /** + * GoldenCard findUniqueOrThrow + */ + export type GoldenCardFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter, which GoldenCard to fetch. + */ + where: GoldenCardWhereUniqueInput + } + + /** + * GoldenCard findFirst + */ + export type GoldenCardFindFirstArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter, which GoldenCard to fetch. + */ + where?: GoldenCardWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldenCards to fetch. + */ + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoldenCards. + */ + cursor?: GoldenCardWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldenCards from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoldenCards. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoldenCards. + */ + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * GoldenCard findFirstOrThrow + */ + export type GoldenCardFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter, which GoldenCard to fetch. + */ + where?: GoldenCardWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldenCards to fetch. + */ + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoldenCards. + */ + cursor?: GoldenCardWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldenCards from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoldenCards. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoldenCards. + */ + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * GoldenCard findMany + */ + export type GoldenCardFindManyArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter, which GoldenCards to fetch. + */ + where?: GoldenCardWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldenCards to fetch. + */ + orderBy?: GoldenCardOrderByWithRelationInput | GoldenCardOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing GoldenCards. + */ + cursor?: GoldenCardWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldenCards from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoldenCards. + */ + skip?: number + distinct?: GoldenCardScalarFieldEnum | GoldenCardScalarFieldEnum[] + } + + /** + * GoldenCard create + */ + export type GoldenCardCreateArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * The data needed to create a GoldenCard. + */ + data: XOR + } + + /** + * GoldenCard createMany + */ + export type GoldenCardCreateManyArgs = { + /** + * The data used to create many GoldenCards. + */ + data: GoldenCardCreateManyInput | GoldenCardCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * GoldenCard createManyAndReturn + */ + export type GoldenCardCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelectCreateManyAndReturn | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * The data used to create many GoldenCards. + */ + data: GoldenCardCreateManyInput | GoldenCardCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardIncludeCreateManyAndReturn | null + } + + /** + * GoldenCard update + */ + export type GoldenCardUpdateArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * The data needed to update a GoldenCard. + */ + data: XOR + /** + * Choose, which GoldenCard to update. + */ + where: GoldenCardWhereUniqueInput + } + + /** + * GoldenCard updateMany + */ + export type GoldenCardUpdateManyArgs = { + /** + * The data used to update GoldenCards. + */ + data: XOR + /** + * Filter which GoldenCards to update + */ + where?: GoldenCardWhereInput + /** + * Limit how many GoldenCards to update. + */ + limit?: number + } + + /** + * GoldenCard updateManyAndReturn + */ + export type GoldenCardUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * The data used to update GoldenCards. + */ + data: XOR + /** + * Filter which GoldenCards to update + */ + where?: GoldenCardWhereInput + /** + * Limit how many GoldenCards to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardIncludeUpdateManyAndReturn | null + } + + /** + * GoldenCard upsert + */ + export type GoldenCardUpsertArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * The filter to search for the GoldenCard to update in case it exists. + */ + where: GoldenCardWhereUniqueInput + /** + * In case the GoldenCard found by the `where` argument doesn't exist, create a new GoldenCard with this data. + */ + create: XOR + /** + * In case the GoldenCard was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * GoldenCard delete + */ + export type GoldenCardDeleteArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + /** + * Filter which GoldenCard to delete. + */ + where: GoldenCardWhereUniqueInput + } + + /** + * GoldenCard deleteMany + */ + export type GoldenCardDeleteManyArgs = { + /** + * Filter which GoldenCards to delete + */ + where?: GoldenCardWhereInput + /** + * Limit how many GoldenCards to delete. + */ + limit?: number + } + + /** + * GoldenCard.quiz + */ + export type GoldenCard$quizArgs = { + /** + * Select specific fields to fetch from the DailyQuiz + */ + select?: DailyQuizSelect | null + /** + * Omit specific fields from the DailyQuiz + */ + omit?: DailyQuizOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: DailyQuizInclude | null + where?: DailyQuizWhereInput + } + + /** + * GoldenCard.teamPlayer + */ + export type GoldenCard$teamPlayerArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + where?: TeamPlayerWhereInput + } + + /** + * GoldenCard without action + */ + export type GoldenCardDefaultArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + } + + + /** + * Model Session + */ + + export type AggregateSession = { + _count: SessionCountAggregateOutputType | null + _min: SessionMinAggregateOutputType | null + _max: SessionMaxAggregateOutputType | null + } + + export type SessionMinAggregateOutputType = { + id: string | null + sessionToken: string | null + userId: string | null + expires: Date | null + } + + export type SessionMaxAggregateOutputType = { + id: string | null + sessionToken: string | null + userId: string | null + expires: Date | null + } + + export type SessionCountAggregateOutputType = { + id: number + sessionToken: number + userId: number + expires: number + _all: number + } + + + export type SessionMinAggregateInputType = { + id?: true + sessionToken?: true + userId?: true + expires?: true + } + + export type SessionMaxAggregateInputType = { + id?: true + sessionToken?: true + userId?: true + expires?: true + } + + export type SessionCountAggregateInputType = { + id?: true + sessionToken?: true + userId?: true + expires?: true + _all?: true + } + + export type SessionAggregateArgs = { + /** + * Filter which Session to aggregate. + */ + where?: SessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Sessions to fetch. + */ + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: SessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Sessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Sessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Sessions + **/ + _count?: true | SessionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: SessionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: SessionMaxAggregateInputType + } + + export type GetSessionAggregateType = { + [P in keyof T & keyof AggregateSession]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type SessionGroupByArgs = { + where?: SessionWhereInput + orderBy?: SessionOrderByWithAggregationInput | SessionOrderByWithAggregationInput[] + by: SessionScalarFieldEnum[] | SessionScalarFieldEnum + having?: SessionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: SessionCountAggregateInputType | true + _min?: SessionMinAggregateInputType + _max?: SessionMaxAggregateInputType + } + + export type SessionGroupByOutputType = { + id: string + sessionToken: string + userId: string + expires: Date + _count: SessionCountAggregateOutputType | null + _min: SessionMinAggregateOutputType | null + _max: SessionMaxAggregateOutputType | null + } + + type GetSessionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type SessionSelect = $Extensions.GetSelect<{ + id?: boolean + sessionToken?: boolean + userId?: boolean + expires?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["session"]> + + export type SessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + sessionToken?: boolean + userId?: boolean + expires?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["session"]> + + export type SessionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + sessionToken?: boolean + userId?: boolean + expires?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["session"]> + + export type SessionSelectScalar = { + id?: boolean + sessionToken?: boolean + userId?: boolean + expires?: boolean + } + + export type SessionOmit = $Extensions.GetOmit<"id" | "sessionToken" | "userId" | "expires", ExtArgs["result"]["session"]> + export type SessionInclude = { + user?: boolean | UserDefaultArgs + } + export type SessionIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + export type SessionIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + + export type $SessionPayload = { + name: "Session" + objects: { + user: Prisma.$UserPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + sessionToken: string + userId: string + expires: Date + }, ExtArgs["result"]["session"]> + composites: {} + } + + type SessionGetPayload = $Result.GetResult + + type SessionCountArgs = + Omit & { + select?: SessionCountAggregateInputType | true + } + + export interface SessionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Session'], meta: { name: 'Session' } } + /** + * Find zero or one Session that matches the filter. + * @param {SessionFindUniqueArgs} args - Arguments to find a Session + * @example + * // Get one Session + * const session = await prisma.session.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Session that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session + * @example + * // Get one Session + * const session = await prisma.session.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Session that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionFindFirstArgs} args - Arguments to find a Session + * @example + * // Get one Session + * const session = await prisma.session.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Session that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionFindFirstOrThrowArgs} args - Arguments to find a Session + * @example + * // Get one Session + * const session = await prisma.session.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Sessions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Sessions + * const sessions = await prisma.session.findMany() + * + * // Get first 10 Sessions + * const sessions = await prisma.session.findMany({ take: 10 }) + * + * // Only select the `id` + * const sessionWithIdOnly = await prisma.session.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Session. + * @param {SessionCreateArgs} args - Arguments to create a Session. + * @example + * // Create one Session + * const Session = await prisma.session.create({ + * data: { + * // ... data to create a Session + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Sessions. + * @param {SessionCreateManyArgs} args - Arguments to create many Sessions. + * @example + * // Create many Sessions + * const session = await prisma.session.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Sessions and returns the data saved in the database. + * @param {SessionCreateManyAndReturnArgs} args - Arguments to create many Sessions. + * @example + * // Create many Sessions + * const session = await prisma.session.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Sessions and only return the `id` + * const sessionWithIdOnly = await prisma.session.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Session. + * @param {SessionDeleteArgs} args - Arguments to delete one Session. + * @example + * // Delete one Session + * const Session = await prisma.session.delete({ + * where: { + * // ... filter to delete one Session + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Session. + * @param {SessionUpdateArgs} args - Arguments to update one Session. + * @example + * // Update one Session + * const session = await prisma.session.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Sessions. + * @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete. + * @example + * // Delete a few Sessions + * const { count } = await prisma.session.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Sessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Sessions + * const session = await prisma.session.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Sessions and returns the data updated in the database. + * @param {SessionUpdateManyAndReturnArgs} args - Arguments to update many Sessions. + * @example + * // Update many Sessions + * const session = await prisma.session.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Sessions and only return the `id` + * const sessionWithIdOnly = await prisma.session.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Session. + * @param {SessionUpsertArgs} args - Arguments to update or create a Session. + * @example + * // Update or create a Session + * const session = await prisma.session.upsert({ + * create: { + * // ... data to create a Session + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Session we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Sessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionCountArgs} args - Arguments to filter Sessions to count. + * @example + * // Count the number of Sessions + * const count = await prisma.session.count({ + * where: { + * // ... the filter for the Sessions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Session. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Session. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SessionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends SessionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: SessionGroupByArgs['orderBy'] } + : { orderBy?: SessionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSessionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Session model + */ + readonly fields: SessionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Session. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__SessionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Session model + */ + interface SessionFieldRefs { + readonly id: FieldRef<"Session", 'String'> + readonly sessionToken: FieldRef<"Session", 'String'> + readonly userId: FieldRef<"Session", 'String'> + readonly expires: FieldRef<"Session", 'DateTime'> + } + + + // Custom InputTypes + /** + * Session findUnique + */ + export type SessionFindUniqueArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter, which Session to fetch. + */ + where: SessionWhereUniqueInput + } + + /** + * Session findUniqueOrThrow + */ + export type SessionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter, which Session to fetch. + */ + where: SessionWhereUniqueInput + } + + /** + * Session findFirst + */ + export type SessionFindFirstArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter, which Session to fetch. + */ + where?: SessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Sessions to fetch. + */ + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Sessions. + */ + cursor?: SessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Sessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Sessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Sessions. + */ + distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] + } + + /** + * Session findFirstOrThrow + */ + export type SessionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter, which Session to fetch. + */ + where?: SessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Sessions to fetch. + */ + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Sessions. + */ + cursor?: SessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Sessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Sessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Sessions. + */ + distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] + } + + /** + * Session findMany + */ + export type SessionFindManyArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter, which Sessions to fetch. + */ + where?: SessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Sessions to fetch. + */ + orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Sessions. + */ + cursor?: SessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Sessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Sessions. + */ + skip?: number + distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] + } + + /** + * Session create + */ + export type SessionCreateArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * The data needed to create a Session. + */ + data: XOR + } + + /** + * Session createMany + */ + export type SessionCreateManyArgs = { + /** + * The data used to create many Sessions. + */ + data: SessionCreateManyInput | SessionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Session createManyAndReturn + */ + export type SessionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * The data used to create many Sessions. + */ + data: SessionCreateManyInput | SessionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionIncludeCreateManyAndReturn | null + } + + /** + * Session update + */ + export type SessionUpdateArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * The data needed to update a Session. + */ + data: XOR + /** + * Choose, which Session to update. + */ + where: SessionWhereUniqueInput + } + + /** + * Session updateMany + */ + export type SessionUpdateManyArgs = { + /** + * The data used to update Sessions. + */ + data: XOR + /** + * Filter which Sessions to update + */ + where?: SessionWhereInput + /** + * Limit how many Sessions to update. + */ + limit?: number + } + + /** + * Session updateManyAndReturn + */ + export type SessionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * The data used to update Sessions. + */ + data: XOR + /** + * Filter which Sessions to update + */ + where?: SessionWhereInput + /** + * Limit how many Sessions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionIncludeUpdateManyAndReturn | null + } + + /** + * Session upsert + */ + export type SessionUpsertArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * The filter to search for the Session to update in case it exists. + */ + where: SessionWhereUniqueInput + /** + * In case the Session found by the `where` argument doesn't exist, create a new Session with this data. + */ + create: XOR + /** + * In case the Session was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Session delete + */ + export type SessionDeleteArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + /** + * Filter which Session to delete. + */ + where: SessionWhereUniqueInput + } + + /** + * Session deleteMany + */ + export type SessionDeleteManyArgs = { + /** + * Filter which Sessions to delete + */ + where?: SessionWhereInput + /** + * Limit how many Sessions to delete. + */ + limit?: number + } + + /** + * Session without action + */ + export type SessionDefaultArgs = { + /** + * Select specific fields to fetch from the Session + */ + select?: SessionSelect | null + /** + * Omit specific fields from the Session + */ + omit?: SessionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SessionInclude | null + } + + + /** + * Model Team + */ + + export type AggregateTeam = { + _count: TeamCountAggregateOutputType | null + _avg: TeamAvgAggregateOutputType | null + _sum: TeamSumAggregateOutputType | null + _min: TeamMinAggregateOutputType | null + _max: TeamMaxAggregateOutputType | null + } + + export type TeamAvgAggregateOutputType = { + budget: number | null + totalPoints: number | null + } + + export type TeamSumAggregateOutputType = { + budget: number | null + totalPoints: number | null + } + + export type TeamMinAggregateOutputType = { + id: string | null + name: string | null + userId: string | null + budget: number | null + totalPoints: number | null + formation: string | null + status: $Enums.TeamStatus | null + createdAt: Date | null + } + + export type TeamMaxAggregateOutputType = { + id: string | null + name: string | null + userId: string | null + budget: number | null + totalPoints: number | null + formation: string | null + status: $Enums.TeamStatus | null + createdAt: Date | null + } + + export type TeamCountAggregateOutputType = { + id: number + name: number + userId: number + budget: number + totalPoints: number + formation: number + status: number + createdAt: number + _all: number + } + + + export type TeamAvgAggregateInputType = { + budget?: true + totalPoints?: true + } + + export type TeamSumAggregateInputType = { + budget?: true + totalPoints?: true + } + + export type TeamMinAggregateInputType = { + id?: true + name?: true + userId?: true + budget?: true + totalPoints?: true + formation?: true + status?: true + createdAt?: true + } + + export type TeamMaxAggregateInputType = { + id?: true + name?: true + userId?: true + budget?: true + totalPoints?: true + formation?: true + status?: true + createdAt?: true + } + + export type TeamCountAggregateInputType = { + id?: true + name?: true + userId?: true + budget?: true + totalPoints?: true + formation?: true + status?: true + createdAt?: true + _all?: true + } + + export type TeamAggregateArgs = { + /** + * Filter which Team to aggregate. + */ + where?: TeamWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Teams to fetch. + */ + orderBy?: TeamOrderByWithRelationInput | TeamOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: TeamWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Teams from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Teams. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Teams + **/ + _count?: true | TeamCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: TeamAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: TeamSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: TeamMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: TeamMaxAggregateInputType + } + + export type GetTeamAggregateType = { + [P in keyof T & keyof AggregateTeam]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type TeamGroupByArgs = { + where?: TeamWhereInput + orderBy?: TeamOrderByWithAggregationInput | TeamOrderByWithAggregationInput[] + by: TeamScalarFieldEnum[] | TeamScalarFieldEnum + having?: TeamScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: TeamCountAggregateInputType | true + _avg?: TeamAvgAggregateInputType + _sum?: TeamSumAggregateInputType + _min?: TeamMinAggregateInputType + _max?: TeamMaxAggregateInputType + } + + export type TeamGroupByOutputType = { + id: string + name: string + userId: string + budget: number + totalPoints: number + formation: string + status: $Enums.TeamStatus + createdAt: Date + _count: TeamCountAggregateOutputType | null + _avg: TeamAvgAggregateOutputType | null + _sum: TeamSumAggregateOutputType | null + _min: TeamMinAggregateOutputType | null + _max: TeamMaxAggregateOutputType | null + } + + type GetTeamGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof TeamGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type TeamSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + userId?: boolean + budget?: boolean + totalPoints?: boolean + formation?: boolean + status?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + players?: boolean | Team$playersArgs + _count?: boolean | TeamCountOutputTypeDefaultArgs + }, ExtArgs["result"]["team"]> + + export type TeamSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + userId?: boolean + budget?: boolean + totalPoints?: boolean + formation?: boolean + status?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["team"]> + + export type TeamSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + userId?: boolean + budget?: boolean + totalPoints?: boolean + formation?: boolean + status?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + }, ExtArgs["result"]["team"]> + + export type TeamSelectScalar = { + id?: boolean + name?: boolean + userId?: boolean + budget?: boolean + totalPoints?: boolean + formation?: boolean + status?: boolean + createdAt?: boolean + } + + export type TeamOmit = $Extensions.GetOmit<"id" | "name" | "userId" | "budget" | "totalPoints" | "formation" | "status" | "createdAt", ExtArgs["result"]["team"]> + export type TeamInclude = { + user?: boolean | UserDefaultArgs + players?: boolean | Team$playersArgs + _count?: boolean | TeamCountOutputTypeDefaultArgs + } + export type TeamIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + export type TeamIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + } + + export type $TeamPayload = { + name: "Team" + objects: { + user: Prisma.$UserPayload + players: Prisma.$TeamPlayerPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + userId: string + budget: number + totalPoints: number + formation: string + status: $Enums.TeamStatus + createdAt: Date + }, ExtArgs["result"]["team"]> + composites: {} + } + + type TeamGetPayload = $Result.GetResult + + type TeamCountArgs = + Omit & { + select?: TeamCountAggregateInputType | true + } + + export interface TeamDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Team'], meta: { name: 'Team' } } + /** + * Find zero or one Team that matches the filter. + * @param {TeamFindUniqueArgs} args - Arguments to find a Team + * @example + * // Get one Team + * const team = await prisma.team.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Team that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {TeamFindUniqueOrThrowArgs} args - Arguments to find a Team + * @example + * // Get one Team + * const team = await prisma.team.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Team that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamFindFirstArgs} args - Arguments to find a Team + * @example + * // Get one Team + * const team = await prisma.team.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Team that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamFindFirstOrThrowArgs} args - Arguments to find a Team + * @example + * // Get one Team + * const team = await prisma.team.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Teams that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Teams + * const teams = await prisma.team.findMany() + * + * // Get first 10 Teams + * const teams = await prisma.team.findMany({ take: 10 }) + * + * // Only select the `id` + * const teamWithIdOnly = await prisma.team.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Team. + * @param {TeamCreateArgs} args - Arguments to create a Team. + * @example + * // Create one Team + * const Team = await prisma.team.create({ + * data: { + * // ... data to create a Team + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Teams. + * @param {TeamCreateManyArgs} args - Arguments to create many Teams. + * @example + * // Create many Teams + * const team = await prisma.team.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Teams and returns the data saved in the database. + * @param {TeamCreateManyAndReturnArgs} args - Arguments to create many Teams. + * @example + * // Create many Teams + * const team = await prisma.team.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Teams and only return the `id` + * const teamWithIdOnly = await prisma.team.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Team. + * @param {TeamDeleteArgs} args - Arguments to delete one Team. + * @example + * // Delete one Team + * const Team = await prisma.team.delete({ + * where: { + * // ... filter to delete one Team + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Team. + * @param {TeamUpdateArgs} args - Arguments to update one Team. + * @example + * // Update one Team + * const team = await prisma.team.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Teams. + * @param {TeamDeleteManyArgs} args - Arguments to filter Teams to delete. + * @example + * // Delete a few Teams + * const { count } = await prisma.team.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Teams. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Teams + * const team = await prisma.team.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Teams and returns the data updated in the database. + * @param {TeamUpdateManyAndReturnArgs} args - Arguments to update many Teams. + * @example + * // Update many Teams + * const team = await prisma.team.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Teams and only return the `id` + * const teamWithIdOnly = await prisma.team.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Team. + * @param {TeamUpsertArgs} args - Arguments to update or create a Team. + * @example + * // Update or create a Team + * const team = await prisma.team.upsert({ + * create: { + * // ... data to create a Team + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Team we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__TeamClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Teams. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamCountArgs} args - Arguments to filter Teams to count. + * @example + * // Count the number of Teams + * const count = await prisma.team.count({ + * where: { + * // ... the filter for the Teams we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Team. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Team. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends TeamGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: TeamGroupByArgs['orderBy'] } + : { orderBy?: TeamGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetTeamGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Team model + */ + readonly fields: TeamFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Team. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__TeamClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + players = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Team model + */ + interface TeamFieldRefs { + readonly id: FieldRef<"Team", 'String'> + readonly name: FieldRef<"Team", 'String'> + readonly userId: FieldRef<"Team", 'String'> + readonly budget: FieldRef<"Team", 'Float'> + readonly totalPoints: FieldRef<"Team", 'Int'> + readonly formation: FieldRef<"Team", 'String'> + readonly status: FieldRef<"Team", 'TeamStatus'> + readonly createdAt: FieldRef<"Team", 'DateTime'> + } + + + // Custom InputTypes + /** + * Team findUnique + */ + export type TeamFindUniqueArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter, which Team to fetch. + */ + where: TeamWhereUniqueInput + } + + /** + * Team findUniqueOrThrow + */ + export type TeamFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter, which Team to fetch. + */ + where: TeamWhereUniqueInput + } + + /** + * Team findFirst + */ + export type TeamFindFirstArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter, which Team to fetch. + */ + where?: TeamWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Teams to fetch. + */ + orderBy?: TeamOrderByWithRelationInput | TeamOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Teams. + */ + cursor?: TeamWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Teams from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Teams. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Teams. + */ + distinct?: TeamScalarFieldEnum | TeamScalarFieldEnum[] + } + + /** + * Team findFirstOrThrow + */ + export type TeamFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter, which Team to fetch. + */ + where?: TeamWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Teams to fetch. + */ + orderBy?: TeamOrderByWithRelationInput | TeamOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Teams. + */ + cursor?: TeamWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Teams from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Teams. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Teams. + */ + distinct?: TeamScalarFieldEnum | TeamScalarFieldEnum[] + } + + /** + * Team findMany + */ + export type TeamFindManyArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter, which Teams to fetch. + */ + where?: TeamWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Teams to fetch. + */ + orderBy?: TeamOrderByWithRelationInput | TeamOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Teams. + */ + cursor?: TeamWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Teams from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Teams. + */ + skip?: number + distinct?: TeamScalarFieldEnum | TeamScalarFieldEnum[] + } + + /** + * Team create + */ + export type TeamCreateArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * The data needed to create a Team. + */ + data: XOR + } + + /** + * Team createMany + */ + export type TeamCreateManyArgs = { + /** + * The data used to create many Teams. + */ + data: TeamCreateManyInput | TeamCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Team createManyAndReturn + */ + export type TeamCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * The data used to create many Teams. + */ + data: TeamCreateManyInput | TeamCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamIncludeCreateManyAndReturn | null + } + + /** + * Team update + */ + export type TeamUpdateArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * The data needed to update a Team. + */ + data: XOR + /** + * Choose, which Team to update. + */ + where: TeamWhereUniqueInput + } + + /** + * Team updateMany + */ + export type TeamUpdateManyArgs = { + /** + * The data used to update Teams. + */ + data: XOR + /** + * Filter which Teams to update + */ + where?: TeamWhereInput + /** + * Limit how many Teams to update. + */ + limit?: number + } + + /** + * Team updateManyAndReturn + */ + export type TeamUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * The data used to update Teams. + */ + data: XOR + /** + * Filter which Teams to update + */ + where?: TeamWhereInput + /** + * Limit how many Teams to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamIncludeUpdateManyAndReturn | null + } + + /** + * Team upsert + */ + export type TeamUpsertArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * The filter to search for the Team to update in case it exists. + */ + where: TeamWhereUniqueInput + /** + * In case the Team found by the `where` argument doesn't exist, create a new Team with this data. + */ + create: XOR + /** + * In case the Team was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Team delete + */ + export type TeamDeleteArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + /** + * Filter which Team to delete. + */ + where: TeamWhereUniqueInput + } + + /** + * Team deleteMany + */ + export type TeamDeleteManyArgs = { + /** + * Filter which Teams to delete + */ + where?: TeamWhereInput + /** + * Limit how many Teams to delete. + */ + limit?: number + } + + /** + * Team.players + */ + export type Team$playersArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + where?: TeamPlayerWhereInput + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + cursor?: TeamPlayerWhereUniqueInput + take?: number + skip?: number + distinct?: TeamPlayerScalarFieldEnum | TeamPlayerScalarFieldEnum[] + } + + /** + * Team without action + */ + export type TeamDefaultArgs = { + /** + * Select specific fields to fetch from the Team + */ + select?: TeamSelect | null + /** + * Omit specific fields from the Team + */ + omit?: TeamOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamInclude | null + } + + + /** + * Model TeamPlayer + */ + + export type AggregateTeamPlayer = { + _count: TeamPlayerCountAggregateOutputType | null + _avg: TeamPlayerAvgAggregateOutputType | null + _sum: TeamPlayerSumAggregateOutputType | null + _min: TeamPlayerMinAggregateOutputType | null + _max: TeamPlayerMaxAggregateOutputType | null + } + + export type TeamPlayerAvgAggregateOutputType = { + positionIndex: number | null + } + + export type TeamPlayerSumAggregateOutputType = { + positionIndex: number | null + } + + export type TeamPlayerMinAggregateOutputType = { + teamId: string | null + playerId: string | null + goldenCardId: string | null + isCaptain: boolean | null + isViceCaptain: boolean | null + isBench: boolean | null + positionIndex: number | null + } + + export type TeamPlayerMaxAggregateOutputType = { + teamId: string | null + playerId: string | null + goldenCardId: string | null + isCaptain: boolean | null + isViceCaptain: boolean | null + isBench: boolean | null + positionIndex: number | null + } + + export type TeamPlayerCountAggregateOutputType = { + teamId: number + playerId: number + goldenCardId: number + isCaptain: number + isViceCaptain: number + isBench: number + positionIndex: number + _all: number + } + + + export type TeamPlayerAvgAggregateInputType = { + positionIndex?: true + } + + export type TeamPlayerSumAggregateInputType = { + positionIndex?: true + } + + export type TeamPlayerMinAggregateInputType = { + teamId?: true + playerId?: true + goldenCardId?: true + isCaptain?: true + isViceCaptain?: true + isBench?: true + positionIndex?: true + } + + export type TeamPlayerMaxAggregateInputType = { + teamId?: true + playerId?: true + goldenCardId?: true + isCaptain?: true + isViceCaptain?: true + isBench?: true + positionIndex?: true + } + + export type TeamPlayerCountAggregateInputType = { + teamId?: true + playerId?: true + goldenCardId?: true + isCaptain?: true + isViceCaptain?: true + isBench?: true + positionIndex?: true + _all?: true + } + + export type TeamPlayerAggregateArgs = { + /** + * Filter which TeamPlayer to aggregate. + */ + where?: TeamPlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TeamPlayers to fetch. + */ + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: TeamPlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TeamPlayers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TeamPlayers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned TeamPlayers + **/ + _count?: true | TeamPlayerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: TeamPlayerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: TeamPlayerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: TeamPlayerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: TeamPlayerMaxAggregateInputType + } + + export type GetTeamPlayerAggregateType = { + [P in keyof T & keyof AggregateTeamPlayer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type TeamPlayerGroupByArgs = { + where?: TeamPlayerWhereInput + orderBy?: TeamPlayerOrderByWithAggregationInput | TeamPlayerOrderByWithAggregationInput[] + by: TeamPlayerScalarFieldEnum[] | TeamPlayerScalarFieldEnum + having?: TeamPlayerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: TeamPlayerCountAggregateInputType | true + _avg?: TeamPlayerAvgAggregateInputType + _sum?: TeamPlayerSumAggregateInputType + _min?: TeamPlayerMinAggregateInputType + _max?: TeamPlayerMaxAggregateInputType + } + + export type TeamPlayerGroupByOutputType = { + teamId: string + playerId: string + goldenCardId: string | null + isCaptain: boolean + isViceCaptain: boolean + isBench: boolean + positionIndex: number + _count: TeamPlayerCountAggregateOutputType | null + _avg: TeamPlayerAvgAggregateOutputType | null + _sum: TeamPlayerSumAggregateOutputType | null + _min: TeamPlayerMinAggregateOutputType | null + _max: TeamPlayerMaxAggregateOutputType | null + } + + type GetTeamPlayerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof TeamPlayerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type TeamPlayerSelect = $Extensions.GetSelect<{ + teamId?: boolean + playerId?: boolean + goldenCardId?: boolean + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: boolean + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + }, ExtArgs["result"]["teamPlayer"]> + + export type TeamPlayerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + teamId?: boolean + playerId?: boolean + goldenCardId?: boolean + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: boolean + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + }, ExtArgs["result"]["teamPlayer"]> + + export type TeamPlayerSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + teamId?: boolean + playerId?: boolean + goldenCardId?: boolean + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: boolean + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + }, ExtArgs["result"]["teamPlayer"]> + + export type TeamPlayerSelectScalar = { + teamId?: boolean + playerId?: boolean + goldenCardId?: boolean + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: boolean + } + + export type TeamPlayerOmit = $Extensions.GetOmit<"teamId" | "playerId" | "goldenCardId" | "isCaptain" | "isViceCaptain" | "isBench" | "positionIndex", ExtArgs["result"]["teamPlayer"]> + export type TeamPlayerInclude = { + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + } + export type TeamPlayerIncludeCreateManyAndReturn = { + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + } + export type TeamPlayerIncludeUpdateManyAndReturn = { + team?: boolean | TeamDefaultArgs + player?: boolean | PlayerDefaultArgs + goldenCard?: boolean | TeamPlayer$goldenCardArgs + } + + export type $TeamPlayerPayload = { + name: "TeamPlayer" + objects: { + team: Prisma.$TeamPayload + player: Prisma.$PlayerPayload + goldenCard: Prisma.$GoldenCardPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + teamId: string + playerId: string + goldenCardId: string | null + isCaptain: boolean + isViceCaptain: boolean + isBench: boolean + positionIndex: number + }, ExtArgs["result"]["teamPlayer"]> + composites: {} + } + + type TeamPlayerGetPayload = $Result.GetResult + + type TeamPlayerCountArgs = + Omit & { + select?: TeamPlayerCountAggregateInputType | true + } + + export interface TeamPlayerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['TeamPlayer'], meta: { name: 'TeamPlayer' } } + /** + * Find zero or one TeamPlayer that matches the filter. + * @param {TeamPlayerFindUniqueArgs} args - Arguments to find a TeamPlayer + * @example + * // Get one TeamPlayer + * const teamPlayer = await prisma.teamPlayer.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one TeamPlayer that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {TeamPlayerFindUniqueOrThrowArgs} args - Arguments to find a TeamPlayer + * @example + * // Get one TeamPlayer + * const teamPlayer = await prisma.teamPlayer.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TeamPlayer that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerFindFirstArgs} args - Arguments to find a TeamPlayer + * @example + * // Get one TeamPlayer + * const teamPlayer = await prisma.teamPlayer.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first TeamPlayer that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerFindFirstOrThrowArgs} args - Arguments to find a TeamPlayer + * @example + * // Get one TeamPlayer + * const teamPlayer = await prisma.teamPlayer.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more TeamPlayers that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all TeamPlayers + * const teamPlayers = await prisma.teamPlayer.findMany() + * + * // Get first 10 TeamPlayers + * const teamPlayers = await prisma.teamPlayer.findMany({ take: 10 }) + * + * // Only select the `teamId` + * const teamPlayerWithTeamIdOnly = await prisma.teamPlayer.findMany({ select: { teamId: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a TeamPlayer. + * @param {TeamPlayerCreateArgs} args - Arguments to create a TeamPlayer. + * @example + * // Create one TeamPlayer + * const TeamPlayer = await prisma.teamPlayer.create({ + * data: { + * // ... data to create a TeamPlayer + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many TeamPlayers. + * @param {TeamPlayerCreateManyArgs} args - Arguments to create many TeamPlayers. + * @example + * // Create many TeamPlayers + * const teamPlayer = await prisma.teamPlayer.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many TeamPlayers and returns the data saved in the database. + * @param {TeamPlayerCreateManyAndReturnArgs} args - Arguments to create many TeamPlayers. + * @example + * // Create many TeamPlayers + * const teamPlayer = await prisma.teamPlayer.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many TeamPlayers and only return the `teamId` + * const teamPlayerWithTeamIdOnly = await prisma.teamPlayer.createManyAndReturn({ + * select: { teamId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a TeamPlayer. + * @param {TeamPlayerDeleteArgs} args - Arguments to delete one TeamPlayer. + * @example + * // Delete one TeamPlayer + * const TeamPlayer = await prisma.teamPlayer.delete({ + * where: { + * // ... filter to delete one TeamPlayer + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one TeamPlayer. + * @param {TeamPlayerUpdateArgs} args - Arguments to update one TeamPlayer. + * @example + * // Update one TeamPlayer + * const teamPlayer = await prisma.teamPlayer.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more TeamPlayers. + * @param {TeamPlayerDeleteManyArgs} args - Arguments to filter TeamPlayers to delete. + * @example + * // Delete a few TeamPlayers + * const { count } = await prisma.teamPlayer.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TeamPlayers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many TeamPlayers + * const teamPlayer = await prisma.teamPlayer.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more TeamPlayers and returns the data updated in the database. + * @param {TeamPlayerUpdateManyAndReturnArgs} args - Arguments to update many TeamPlayers. + * @example + * // Update many TeamPlayers + * const teamPlayer = await prisma.teamPlayer.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more TeamPlayers and only return the `teamId` + * const teamPlayerWithTeamIdOnly = await prisma.teamPlayer.updateManyAndReturn({ + * select: { teamId: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one TeamPlayer. + * @param {TeamPlayerUpsertArgs} args - Arguments to update or create a TeamPlayer. + * @example + * // Update or create a TeamPlayer + * const teamPlayer = await prisma.teamPlayer.upsert({ + * create: { + * // ... data to create a TeamPlayer + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the TeamPlayer we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__TeamPlayerClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of TeamPlayers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerCountArgs} args - Arguments to filter TeamPlayers to count. + * @example + * // Count the number of TeamPlayers + * const count = await prisma.teamPlayer.count({ + * where: { + * // ... the filter for the TeamPlayers we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a TeamPlayer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by TeamPlayer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TeamPlayerGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends TeamPlayerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: TeamPlayerGroupByArgs['orderBy'] } + : { orderBy?: TeamPlayerGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetTeamPlayerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the TeamPlayer model + */ + readonly fields: TeamPlayerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for TeamPlayer. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__TeamPlayerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + team = {}>(args?: Subset>): Prisma__TeamClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + player = {}>(args?: Subset>): Prisma__PlayerClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + goldenCard = {}>(args?: Subset>): Prisma__GoldenCardClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the TeamPlayer model + */ + interface TeamPlayerFieldRefs { + readonly teamId: FieldRef<"TeamPlayer", 'String'> + readonly playerId: FieldRef<"TeamPlayer", 'String'> + readonly goldenCardId: FieldRef<"TeamPlayer", 'String'> + readonly isCaptain: FieldRef<"TeamPlayer", 'Boolean'> + readonly isViceCaptain: FieldRef<"TeamPlayer", 'Boolean'> + readonly isBench: FieldRef<"TeamPlayer", 'Boolean'> + readonly positionIndex: FieldRef<"TeamPlayer", 'Int'> + } + + + // Custom InputTypes + /** + * TeamPlayer findUnique + */ + export type TeamPlayerFindUniqueArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter, which TeamPlayer to fetch. + */ + where: TeamPlayerWhereUniqueInput + } + + /** + * TeamPlayer findUniqueOrThrow + */ + export type TeamPlayerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter, which TeamPlayer to fetch. + */ + where: TeamPlayerWhereUniqueInput + } + + /** + * TeamPlayer findFirst + */ + export type TeamPlayerFindFirstArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter, which TeamPlayer to fetch. + */ + where?: TeamPlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TeamPlayers to fetch. + */ + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TeamPlayers. + */ + cursor?: TeamPlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TeamPlayers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TeamPlayers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TeamPlayers. + */ + distinct?: TeamPlayerScalarFieldEnum | TeamPlayerScalarFieldEnum[] + } + + /** + * TeamPlayer findFirstOrThrow + */ + export type TeamPlayerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter, which TeamPlayer to fetch. + */ + where?: TeamPlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TeamPlayers to fetch. + */ + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for TeamPlayers. + */ + cursor?: TeamPlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TeamPlayers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TeamPlayers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of TeamPlayers. + */ + distinct?: TeamPlayerScalarFieldEnum | TeamPlayerScalarFieldEnum[] + } + + /** + * TeamPlayer findMany + */ + export type TeamPlayerFindManyArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter, which TeamPlayers to fetch. + */ + where?: TeamPlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of TeamPlayers to fetch. + */ + orderBy?: TeamPlayerOrderByWithRelationInput | TeamPlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing TeamPlayers. + */ + cursor?: TeamPlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` TeamPlayers from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` TeamPlayers. + */ + skip?: number + distinct?: TeamPlayerScalarFieldEnum | TeamPlayerScalarFieldEnum[] + } + + /** + * TeamPlayer create + */ + export type TeamPlayerCreateArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * The data needed to create a TeamPlayer. + */ + data: XOR + } + + /** + * TeamPlayer createMany + */ + export type TeamPlayerCreateManyArgs = { + /** + * The data used to create many TeamPlayers. + */ + data: TeamPlayerCreateManyInput | TeamPlayerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * TeamPlayer createManyAndReturn + */ + export type TeamPlayerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * The data used to create many TeamPlayers. + */ + data: TeamPlayerCreateManyInput | TeamPlayerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerIncludeCreateManyAndReturn | null + } + + /** + * TeamPlayer update + */ + export type TeamPlayerUpdateArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * The data needed to update a TeamPlayer. + */ + data: XOR + /** + * Choose, which TeamPlayer to update. + */ + where: TeamPlayerWhereUniqueInput + } + + /** + * TeamPlayer updateMany + */ + export type TeamPlayerUpdateManyArgs = { + /** + * The data used to update TeamPlayers. + */ + data: XOR + /** + * Filter which TeamPlayers to update + */ + where?: TeamPlayerWhereInput + /** + * Limit how many TeamPlayers to update. + */ + limit?: number + } + + /** + * TeamPlayer updateManyAndReturn + */ + export type TeamPlayerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * The data used to update TeamPlayers. + */ + data: XOR + /** + * Filter which TeamPlayers to update + */ + where?: TeamPlayerWhereInput + /** + * Limit how many TeamPlayers to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerIncludeUpdateManyAndReturn | null + } + + /** + * TeamPlayer upsert + */ + export type TeamPlayerUpsertArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * The filter to search for the TeamPlayer to update in case it exists. + */ + where: TeamPlayerWhereUniqueInput + /** + * In case the TeamPlayer found by the `where` argument doesn't exist, create a new TeamPlayer with this data. + */ + create: XOR + /** + * In case the TeamPlayer was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * TeamPlayer delete + */ + export type TeamPlayerDeleteArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + /** + * Filter which TeamPlayer to delete. + */ + where: TeamPlayerWhereUniqueInput + } + + /** + * TeamPlayer deleteMany + */ + export type TeamPlayerDeleteManyArgs = { + /** + * Filter which TeamPlayers to delete + */ + where?: TeamPlayerWhereInput + /** + * Limit how many TeamPlayers to delete. + */ + limit?: number + } + + /** + * TeamPlayer.goldenCard + */ + export type TeamPlayer$goldenCardArgs = { + /** + * Select specific fields to fetch from the GoldenCard + */ + select?: GoldenCardSelect | null + /** + * Omit specific fields from the GoldenCard + */ + omit?: GoldenCardOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: GoldenCardInclude | null + where?: GoldenCardWhereInput + } + + /** + * TeamPlayer without action + */ + export type TeamPlayerDefaultArgs = { + /** + * Select specific fields to fetch from the TeamPlayer + */ + select?: TeamPlayerSelect | null + /** + * Omit specific fields from the TeamPlayer + */ + omit?: TeamPlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: TeamPlayerInclude | null + } + + + /** + * Model Package + */ + + export type AggregatePackage = { + _count: PackageCountAggregateOutputType | null + _avg: PackageAvgAggregateOutputType | null + _sum: PackageSumAggregateOutputType | null + _min: PackageMinAggregateOutputType | null + _max: PackageMaxAggregateOutputType | null + } + + export type PackageAvgAggregateOutputType = { + budgetBonus: number | null + price: number | null + } + + export type PackageSumAggregateOutputType = { + budgetBonus: number | null + price: number | null + } + + export type PackageMinAggregateOutputType = { + id: string | null + name: string | null + budgetBonus: number | null + price: number | null + description: string | null + isActive: boolean | null + } + + export type PackageMaxAggregateOutputType = { + id: string | null + name: string | null + budgetBonus: number | null + price: number | null + description: string | null + isActive: boolean | null + } + + export type PackageCountAggregateOutputType = { + id: number + name: number + budgetBonus: number + price: number + description: number + isActive: number + _all: number + } + + + export type PackageAvgAggregateInputType = { + budgetBonus?: true + price?: true + } + + export type PackageSumAggregateInputType = { + budgetBonus?: true + price?: true + } + + export type PackageMinAggregateInputType = { + id?: true + name?: true + budgetBonus?: true + price?: true + description?: true + isActive?: true + } + + export type PackageMaxAggregateInputType = { + id?: true + name?: true + budgetBonus?: true + price?: true + description?: true + isActive?: true + } + + export type PackageCountAggregateInputType = { + id?: true + name?: true + budgetBonus?: true + price?: true + description?: true + isActive?: true + _all?: true + } + + export type PackageAggregateArgs = { + /** + * Filter which Package to aggregate. + */ + where?: PackageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Packages to fetch. + */ + orderBy?: PackageOrderByWithRelationInput | PackageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PackageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Packages from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Packages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Packages + **/ + _count?: true | PackageCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PackageAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PackageSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PackageMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PackageMaxAggregateInputType + } + + export type GetPackageAggregateType = { + [P in keyof T & keyof AggregatePackage]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PackageGroupByArgs = { + where?: PackageWhereInput + orderBy?: PackageOrderByWithAggregationInput | PackageOrderByWithAggregationInput[] + by: PackageScalarFieldEnum[] | PackageScalarFieldEnum + having?: PackageScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PackageCountAggregateInputType | true + _avg?: PackageAvgAggregateInputType + _sum?: PackageSumAggregateInputType + _min?: PackageMinAggregateInputType + _max?: PackageMaxAggregateInputType + } + + export type PackageGroupByOutputType = { + id: string + name: string + budgetBonus: number + price: number + description: string | null + isActive: boolean + _count: PackageCountAggregateOutputType | null + _avg: PackageAvgAggregateOutputType | null + _sum: PackageSumAggregateOutputType | null + _min: PackageMinAggregateOutputType | null + _max: PackageMaxAggregateOutputType | null + } + + type GetPackageGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PackageGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PackageSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + budgetBonus?: boolean + price?: boolean + description?: boolean + isActive?: boolean + payments?: boolean | Package$paymentsArgs + _count?: boolean | PackageCountOutputTypeDefaultArgs + }, ExtArgs["result"]["package"]> + + export type PackageSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + budgetBonus?: boolean + price?: boolean + description?: boolean + isActive?: boolean + }, ExtArgs["result"]["package"]> + + export type PackageSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + budgetBonus?: boolean + price?: boolean + description?: boolean + isActive?: boolean + }, ExtArgs["result"]["package"]> + + export type PackageSelectScalar = { + id?: boolean + name?: boolean + budgetBonus?: boolean + price?: boolean + description?: boolean + isActive?: boolean + } + + export type PackageOmit = $Extensions.GetOmit<"id" | "name" | "budgetBonus" | "price" | "description" | "isActive", ExtArgs["result"]["package"]> + export type PackageInclude = { + payments?: boolean | Package$paymentsArgs + _count?: boolean | PackageCountOutputTypeDefaultArgs + } + export type PackageIncludeCreateManyAndReturn = {} + export type PackageIncludeUpdateManyAndReturn = {} + + export type $PackagePayload = { + name: "Package" + objects: { + payments: Prisma.$PaymentPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + budgetBonus: number + price: number + description: string | null + isActive: boolean + }, ExtArgs["result"]["package"]> + composites: {} + } + + type PackageGetPayload = $Result.GetResult + + type PackageCountArgs = + Omit & { + select?: PackageCountAggregateInputType | true + } + + export interface PackageDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Package'], meta: { name: 'Package' } } + /** + * Find zero or one Package that matches the filter. + * @param {PackageFindUniqueArgs} args - Arguments to find a Package + * @example + * // Get one Package + * const package = await prisma.package.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Package that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PackageFindUniqueOrThrowArgs} args - Arguments to find a Package + * @example + * // Get one Package + * const package = await prisma.package.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Package that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageFindFirstArgs} args - Arguments to find a Package + * @example + * // Get one Package + * const package = await prisma.package.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Package that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageFindFirstOrThrowArgs} args - Arguments to find a Package + * @example + * // Get one Package + * const package = await prisma.package.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Packages that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Packages + * const packages = await prisma.package.findMany() + * + * // Get first 10 Packages + * const packages = await prisma.package.findMany({ take: 10 }) + * + * // Only select the `id` + * const packageWithIdOnly = await prisma.package.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Package. + * @param {PackageCreateArgs} args - Arguments to create a Package. + * @example + * // Create one Package + * const Package = await prisma.package.create({ + * data: { + * // ... data to create a Package + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Packages. + * @param {PackageCreateManyArgs} args - Arguments to create many Packages. + * @example + * // Create many Packages + * const package = await prisma.package.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Packages and returns the data saved in the database. + * @param {PackageCreateManyAndReturnArgs} args - Arguments to create many Packages. + * @example + * // Create many Packages + * const package = await prisma.package.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Packages and only return the `id` + * const packageWithIdOnly = await prisma.package.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Package. + * @param {PackageDeleteArgs} args - Arguments to delete one Package. + * @example + * // Delete one Package + * const Package = await prisma.package.delete({ + * where: { + * // ... filter to delete one Package + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Package. + * @param {PackageUpdateArgs} args - Arguments to update one Package. + * @example + * // Update one Package + * const package = await prisma.package.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Packages. + * @param {PackageDeleteManyArgs} args - Arguments to filter Packages to delete. + * @example + * // Delete a few Packages + * const { count } = await prisma.package.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Packages. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Packages + * const package = await prisma.package.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Packages and returns the data updated in the database. + * @param {PackageUpdateManyAndReturnArgs} args - Arguments to update many Packages. + * @example + * // Update many Packages + * const package = await prisma.package.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Packages and only return the `id` + * const packageWithIdOnly = await prisma.package.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Package. + * @param {PackageUpsertArgs} args - Arguments to update or create a Package. + * @example + * // Update or create a Package + * const package = await prisma.package.upsert({ + * create: { + * // ... data to create a Package + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Package we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PackageClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Packages. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageCountArgs} args - Arguments to filter Packages to count. + * @example + * // Count the number of Packages + * const count = await prisma.package.count({ + * where: { + * // ... the filter for the Packages we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Package. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Package. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PackageGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PackageGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PackageGroupByArgs['orderBy'] } + : { orderBy?: PackageGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPackageGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Package model + */ + readonly fields: PackageFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Package. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PackageClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + payments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Package model + */ + interface PackageFieldRefs { + readonly id: FieldRef<"Package", 'String'> + readonly name: FieldRef<"Package", 'String'> + readonly budgetBonus: FieldRef<"Package", 'Float'> + readonly price: FieldRef<"Package", 'Int'> + readonly description: FieldRef<"Package", 'String'> + readonly isActive: FieldRef<"Package", 'Boolean'> + } + + + // Custom InputTypes + /** + * Package findUnique + */ + export type PackageFindUniqueArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter, which Package to fetch. + */ + where: PackageWhereUniqueInput + } + + /** + * Package findUniqueOrThrow + */ + export type PackageFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter, which Package to fetch. + */ + where: PackageWhereUniqueInput + } + + /** + * Package findFirst + */ + export type PackageFindFirstArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter, which Package to fetch. + */ + where?: PackageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Packages to fetch. + */ + orderBy?: PackageOrderByWithRelationInput | PackageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Packages. + */ + cursor?: PackageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Packages from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Packages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Packages. + */ + distinct?: PackageScalarFieldEnum | PackageScalarFieldEnum[] + } + + /** + * Package findFirstOrThrow + */ + export type PackageFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter, which Package to fetch. + */ + where?: PackageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Packages to fetch. + */ + orderBy?: PackageOrderByWithRelationInput | PackageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Packages. + */ + cursor?: PackageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Packages from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Packages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Packages. + */ + distinct?: PackageScalarFieldEnum | PackageScalarFieldEnum[] + } + + /** + * Package findMany + */ + export type PackageFindManyArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter, which Packages to fetch. + */ + where?: PackageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Packages to fetch. + */ + orderBy?: PackageOrderByWithRelationInput | PackageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Packages. + */ + cursor?: PackageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Packages from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Packages. + */ + skip?: number + distinct?: PackageScalarFieldEnum | PackageScalarFieldEnum[] + } + + /** + * Package create + */ + export type PackageCreateArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * The data needed to create a Package. + */ + data: XOR + } + + /** + * Package createMany + */ + export type PackageCreateManyArgs = { + /** + * The data used to create many Packages. + */ + data: PackageCreateManyInput | PackageCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Package createManyAndReturn + */ + export type PackageCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * The data used to create many Packages. + */ + data: PackageCreateManyInput | PackageCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Package update + */ + export type PackageUpdateArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * The data needed to update a Package. + */ + data: XOR + /** + * Choose, which Package to update. + */ + where: PackageWhereUniqueInput + } + + /** + * Package updateMany + */ + export type PackageUpdateManyArgs = { + /** + * The data used to update Packages. + */ + data: XOR + /** + * Filter which Packages to update + */ + where?: PackageWhereInput + /** + * Limit how many Packages to update. + */ + limit?: number + } + + /** + * Package updateManyAndReturn + */ + export type PackageUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * The data used to update Packages. + */ + data: XOR + /** + * Filter which Packages to update + */ + where?: PackageWhereInput + /** + * Limit how many Packages to update. + */ + limit?: number + } + + /** + * Package upsert + */ + export type PackageUpsertArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * The filter to search for the Package to update in case it exists. + */ + where: PackageWhereUniqueInput + /** + * In case the Package found by the `where` argument doesn't exist, create a new Package with this data. + */ + create: XOR + /** + * In case the Package was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Package delete + */ + export type PackageDeleteArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + /** + * Filter which Package to delete. + */ + where: PackageWhereUniqueInput + } + + /** + * Package deleteMany + */ + export type PackageDeleteManyArgs = { + /** + * Filter which Packages to delete + */ + where?: PackageWhereInput + /** + * Limit how many Packages to delete. + */ + limit?: number + } + + /** + * Package.payments + */ + export type Package$paymentsArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + where?: PaymentWhereInput + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + cursor?: PaymentWhereUniqueInput + take?: number + skip?: number + distinct?: PaymentScalarFieldEnum | PaymentScalarFieldEnum[] + } + + /** + * Package without action + */ + export type PackageDefaultArgs = { + /** + * Select specific fields to fetch from the Package + */ + select?: PackageSelect | null + /** + * Omit specific fields from the Package + */ + omit?: PackageOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PackageInclude | null + } + + + /** + * Model Payment + */ + + export type AggregatePayment = { + _count: PaymentCountAggregateOutputType | null + _avg: PaymentAvgAggregateOutputType | null + _sum: PaymentSumAggregateOutputType | null + _min: PaymentMinAggregateOutputType | null + _max: PaymentMaxAggregateOutputType | null + } + + export type PaymentAvgAggregateOutputType = { + amount: number | null + } + + export type PaymentSumAggregateOutputType = { + amount: number | null + } + + export type PaymentMinAggregateOutputType = { + id: string | null + userId: string | null + packageId: string | null + amount: number | null + authority: string | null + refId: string | null + status: $Enums.PaymentStatus | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PaymentMaxAggregateOutputType = { + id: string | null + userId: string | null + packageId: string | null + amount: number | null + authority: string | null + refId: string | null + status: $Enums.PaymentStatus | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PaymentCountAggregateOutputType = { + id: number + userId: number + packageId: number + amount: number + authority: number + refId: number + status: number + createdAt: number + updatedAt: number + _all: number + } + + + export type PaymentAvgAggregateInputType = { + amount?: true + } + + export type PaymentSumAggregateInputType = { + amount?: true + } + + export type PaymentMinAggregateInputType = { + id?: true + userId?: true + packageId?: true + amount?: true + authority?: true + refId?: true + status?: true + createdAt?: true + updatedAt?: true + } + + export type PaymentMaxAggregateInputType = { + id?: true + userId?: true + packageId?: true + amount?: true + authority?: true + refId?: true + status?: true + createdAt?: true + updatedAt?: true + } + + export type PaymentCountAggregateInputType = { + id?: true + userId?: true + packageId?: true + amount?: true + authority?: true + refId?: true + status?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type PaymentAggregateArgs = { + /** + * Filter which Payment to aggregate. + */ + where?: PaymentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Payments to fetch. + */ + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PaymentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Payments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Payments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Payments + **/ + _count?: true | PaymentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PaymentAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PaymentSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PaymentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PaymentMaxAggregateInputType + } + + export type GetPaymentAggregateType = { + [P in keyof T & keyof AggregatePayment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PaymentGroupByArgs = { + where?: PaymentWhereInput + orderBy?: PaymentOrderByWithAggregationInput | PaymentOrderByWithAggregationInput[] + by: PaymentScalarFieldEnum[] | PaymentScalarFieldEnum + having?: PaymentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PaymentCountAggregateInputType | true + _avg?: PaymentAvgAggregateInputType + _sum?: PaymentSumAggregateInputType + _min?: PaymentMinAggregateInputType + _max?: PaymentMaxAggregateInputType + } + + export type PaymentGroupByOutputType = { + id: string + userId: string + packageId: string + amount: number + authority: string | null + refId: string | null + status: $Enums.PaymentStatus + createdAt: Date + updatedAt: Date + _count: PaymentCountAggregateOutputType | null + _avg: PaymentAvgAggregateOutputType | null + _sum: PaymentSumAggregateOutputType | null + _min: PaymentMinAggregateOutputType | null + _max: PaymentMaxAggregateOutputType | null + } + + type GetPaymentGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PaymentGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PaymentSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + packageId?: boolean + amount?: boolean + authority?: boolean + refId?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + }, ExtArgs["result"]["payment"]> + + export type PaymentSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + packageId?: boolean + amount?: boolean + authority?: boolean + refId?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + }, ExtArgs["result"]["payment"]> + + export type PaymentSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + packageId?: boolean + amount?: boolean + authority?: boolean + refId?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + }, ExtArgs["result"]["payment"]> + + export type PaymentSelectScalar = { + id?: boolean + userId?: boolean + packageId?: boolean + amount?: boolean + authority?: boolean + refId?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type PaymentOmit = $Extensions.GetOmit<"id" | "userId" | "packageId" | "amount" | "authority" | "refId" | "status" | "createdAt" | "updatedAt", ExtArgs["result"]["payment"]> + export type PaymentInclude = { + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + } + export type PaymentIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + } + export type PaymentIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + package?: boolean | PackageDefaultArgs + } + + export type $PaymentPayload = { + name: "Payment" + objects: { + user: Prisma.$UserPayload + package: Prisma.$PackagePayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + packageId: string + amount: number + authority: string | null + refId: string | null + status: $Enums.PaymentStatus + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["payment"]> + composites: {} + } + + type PaymentGetPayload = $Result.GetResult + + type PaymentCountArgs = + Omit & { + select?: PaymentCountAggregateInputType | true + } + + export interface PaymentDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Payment'], meta: { name: 'Payment' } } + /** + * Find zero or one Payment that matches the filter. + * @param {PaymentFindUniqueArgs} args - Arguments to find a Payment + * @example + * // Get one Payment + * const payment = await prisma.payment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Payment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PaymentFindUniqueOrThrowArgs} args - Arguments to find a Payment + * @example + * // Get one Payment + * const payment = await prisma.payment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Payment that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentFindFirstArgs} args - Arguments to find a Payment + * @example + * // Get one Payment + * const payment = await prisma.payment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Payment that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentFindFirstOrThrowArgs} args - Arguments to find a Payment + * @example + * // Get one Payment + * const payment = await prisma.payment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Payments that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Payments + * const payments = await prisma.payment.findMany() + * + * // Get first 10 Payments + * const payments = await prisma.payment.findMany({ take: 10 }) + * + * // Only select the `id` + * const paymentWithIdOnly = await prisma.payment.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Payment. + * @param {PaymentCreateArgs} args - Arguments to create a Payment. + * @example + * // Create one Payment + * const Payment = await prisma.payment.create({ + * data: { + * // ... data to create a Payment + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Payments. + * @param {PaymentCreateManyArgs} args - Arguments to create many Payments. + * @example + * // Create many Payments + * const payment = await prisma.payment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Payments and returns the data saved in the database. + * @param {PaymentCreateManyAndReturnArgs} args - Arguments to create many Payments. + * @example + * // Create many Payments + * const payment = await prisma.payment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Payments and only return the `id` + * const paymentWithIdOnly = await prisma.payment.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Payment. + * @param {PaymentDeleteArgs} args - Arguments to delete one Payment. + * @example + * // Delete one Payment + * const Payment = await prisma.payment.delete({ + * where: { + * // ... filter to delete one Payment + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Payment. + * @param {PaymentUpdateArgs} args - Arguments to update one Payment. + * @example + * // Update one Payment + * const payment = await prisma.payment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Payments. + * @param {PaymentDeleteManyArgs} args - Arguments to filter Payments to delete. + * @example + * // Delete a few Payments + * const { count } = await prisma.payment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Payments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Payments + * const payment = await prisma.payment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Payments and returns the data updated in the database. + * @param {PaymentUpdateManyAndReturnArgs} args - Arguments to update many Payments. + * @example + * // Update many Payments + * const payment = await prisma.payment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Payments and only return the `id` + * const paymentWithIdOnly = await prisma.payment.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Payment. + * @param {PaymentUpsertArgs} args - Arguments to update or create a Payment. + * @example + * // Update or create a Payment + * const payment = await prisma.payment.upsert({ + * create: { + * // ... data to create a Payment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Payment we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PaymentClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Payments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentCountArgs} args - Arguments to filter Payments to count. + * @example + * // Count the number of Payments + * const count = await prisma.payment.count({ + * where: { + * // ... the filter for the Payments we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Payment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Payment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PaymentGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PaymentGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PaymentGroupByArgs['orderBy'] } + : { orderBy?: PaymentGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPaymentGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Payment model + */ + readonly fields: PaymentFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Payment. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PaymentClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + package = {}>(args?: Subset>): Prisma__PackageClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Payment model + */ + interface PaymentFieldRefs { + readonly id: FieldRef<"Payment", 'String'> + readonly userId: FieldRef<"Payment", 'String'> + readonly packageId: FieldRef<"Payment", 'String'> + readonly amount: FieldRef<"Payment", 'Int'> + readonly authority: FieldRef<"Payment", 'String'> + readonly refId: FieldRef<"Payment", 'String'> + readonly status: FieldRef<"Payment", 'PaymentStatus'> + readonly createdAt: FieldRef<"Payment", 'DateTime'> + readonly updatedAt: FieldRef<"Payment", 'DateTime'> + } + + + // Custom InputTypes + /** + * Payment findUnique + */ + export type PaymentFindUniqueArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter, which Payment to fetch. + */ + where: PaymentWhereUniqueInput + } + + /** + * Payment findUniqueOrThrow + */ + export type PaymentFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter, which Payment to fetch. + */ + where: PaymentWhereUniqueInput + } + + /** + * Payment findFirst + */ + export type PaymentFindFirstArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter, which Payment to fetch. + */ + where?: PaymentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Payments to fetch. + */ + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Payments. + */ + cursor?: PaymentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Payments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Payments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Payments. + */ + distinct?: PaymentScalarFieldEnum | PaymentScalarFieldEnum[] + } + + /** + * Payment findFirstOrThrow + */ + export type PaymentFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter, which Payment to fetch. + */ + where?: PaymentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Payments to fetch. + */ + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Payments. + */ + cursor?: PaymentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Payments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Payments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Payments. + */ + distinct?: PaymentScalarFieldEnum | PaymentScalarFieldEnum[] + } + + /** + * Payment findMany + */ + export type PaymentFindManyArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter, which Payments to fetch. + */ + where?: PaymentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Payments to fetch. + */ + orderBy?: PaymentOrderByWithRelationInput | PaymentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Payments. + */ + cursor?: PaymentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Payments from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Payments. + */ + skip?: number + distinct?: PaymentScalarFieldEnum | PaymentScalarFieldEnum[] + } + + /** + * Payment create + */ + export type PaymentCreateArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * The data needed to create a Payment. + */ + data: XOR + } + + /** + * Payment createMany + */ + export type PaymentCreateManyArgs = { + /** + * The data used to create many Payments. + */ + data: PaymentCreateManyInput | PaymentCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Payment createManyAndReturn + */ + export type PaymentCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * The data used to create many Payments. + */ + data: PaymentCreateManyInput | PaymentCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentIncludeCreateManyAndReturn | null + } + + /** + * Payment update + */ + export type PaymentUpdateArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * The data needed to update a Payment. + */ + data: XOR + /** + * Choose, which Payment to update. + */ + where: PaymentWhereUniqueInput + } + + /** + * Payment updateMany + */ + export type PaymentUpdateManyArgs = { + /** + * The data used to update Payments. + */ + data: XOR + /** + * Filter which Payments to update + */ + where?: PaymentWhereInput + /** + * Limit how many Payments to update. + */ + limit?: number + } + + /** + * Payment updateManyAndReturn + */ + export type PaymentUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * The data used to update Payments. + */ + data: XOR + /** + * Filter which Payments to update + */ + where?: PaymentWhereInput + /** + * Limit how many Payments to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentIncludeUpdateManyAndReturn | null + } + + /** + * Payment upsert + */ + export type PaymentUpsertArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * The filter to search for the Payment to update in case it exists. + */ + where: PaymentWhereUniqueInput + /** + * In case the Payment found by the `where` argument doesn't exist, create a new Payment with this data. + */ + create: XOR + /** + * In case the Payment was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Payment delete + */ + export type PaymentDeleteArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + /** + * Filter which Payment to delete. + */ + where: PaymentWhereUniqueInput + } + + /** + * Payment deleteMany + */ + export type PaymentDeleteManyArgs = { + /** + * Filter which Payments to delete + */ + where?: PaymentWhereInput + /** + * Limit how many Payments to delete. + */ + limit?: number + } + + /** + * Payment without action + */ + export type PaymentDefaultArgs = { + /** + * Select specific fields to fetch from the Payment + */ + select?: PaymentSelect | null + /** + * Omit specific fields from the Payment + */ + omit?: PaymentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PaymentInclude | null + } + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const CountryScalarFieldEnum: { + id: 'id', + name: 'name', + code: 'code', + flagUrl: 'flagUrl', + flagImage: 'flagImage', + confederation: 'confederation', + qualificationMethod: 'qualificationMethod', + qualificationDate: 'qualificationDate', + participationHistory: 'participationHistory', + bestResult: 'bestResult', + description: 'description', + defaultFormation: 'defaultFormation', + defaultLineupPlayerIds: 'defaultLineupPlayerIds', + defaultCaptainId: 'defaultCaptainId', + groupId: 'groupId', + isEliminated: 'isEliminated' + }; + + export type CountryScalarFieldEnum = (typeof CountryScalarFieldEnum)[keyof typeof CountryScalarFieldEnum] + + + export const GroupScalarFieldEnum: { + id: 'id', + name: 'name' + }; + + export type GroupScalarFieldEnum = (typeof GroupScalarFieldEnum)[keyof typeof GroupScalarFieldEnum] + + + export const PlayerScalarFieldEnum: { + id: 'id', + name: 'name', + image: 'image', + position: 'position', + countryId: 'countryId', + price: 'price', + totalPoints: 'totalPoints', + isActive: 'isActive', + isGoldenCardEligible: 'isGoldenCardEligible', + cardTier: 'cardTier', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type PlayerScalarFieldEnum = (typeof PlayerScalarFieldEnum)[keyof typeof PlayerScalarFieldEnum] + + + export const MatchScalarFieldEnum: { + id: 'id', + homeTeamId: 'homeTeamId', + awayTeamId: 'awayTeamId', + homeScore: 'homeScore', + awayScore: 'awayScore', + stage: 'stage', + status: 'status', + matchDate: 'matchDate', + matchDatePersian: 'matchDatePersian', + stadium: 'stadium', + city: 'city', + referee: 'referee', + assistant1: 'assistant1', + assistant2: 'assistant2', + fourthOfficial: 'fourthOfficial', + attendance: 'attendance', + weather: 'weather', + description: 'description', + roundId: 'roundId', + createdAt: 'createdAt' + }; + + export type MatchScalarFieldEnum = (typeof MatchScalarFieldEnum)[keyof typeof MatchScalarFieldEnum] + + + export const RoundScalarFieldEnum: { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' + }; + + export type RoundScalarFieldEnum = (typeof RoundScalarFieldEnum)[keyof typeof RoundScalarFieldEnum] + + + export const GameweekScalarFieldEnum: { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' + }; + + export type GameweekScalarFieldEnum = (typeof GameweekScalarFieldEnum)[keyof typeof GameweekScalarFieldEnum] + + + export const MatchEventScalarFieldEnum: { + id: 'id', + matchId: 'matchId', + playerId: 'playerId', + type: 'type', + minute: 'minute', + extraInfo: 'extraInfo', + createdAt: 'createdAt' + }; + + export type MatchEventScalarFieldEnum = (typeof MatchEventScalarFieldEnum)[keyof typeof MatchEventScalarFieldEnum] + + + export const MatchLineupScalarFieldEnum: { + id: 'id', + matchId: 'matchId', + countryId: 'countryId', + formation: 'formation', + playerIds: 'playerIds' + }; + + export type MatchLineupScalarFieldEnum = (typeof MatchLineupScalarFieldEnum)[keyof typeof MatchLineupScalarFieldEnum] + + + export const PlayerMatchStatScalarFieldEnum: { + id: 'id', + playerId: 'playerId', + matchId: 'matchId', + goals: 'goals', + assists: 'assists', + yellowCards: 'yellowCards', + redCards: 'redCards', + minutesPlayed: 'minutesPlayed', + cleanSheet: 'cleanSheet', + penaltySaved: 'penaltySaved', + penaltyMissed: 'penaltyMissed', + ownGoals: 'ownGoals', + isMotm: 'isMotm', + extraTimeBonus: 'extraTimeBonus', + points: 'points' + }; + + export type PlayerMatchStatScalarFieldEnum = (typeof PlayerMatchStatScalarFieldEnum)[keyof typeof PlayerMatchStatScalarFieldEnum] + + + export const ScoringRuleScalarFieldEnum: { + id: 'id', + position: 'position', + eventType: 'eventType', + points: 'points', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' + }; + + export type ScoringRuleScalarFieldEnum = (typeof ScoringRuleScalarFieldEnum)[keyof typeof ScoringRuleScalarFieldEnum] + + + export const UserScalarFieldEnum: { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + password: 'password', + role: 'role', + createdAt: 'createdAt' + }; + + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + + + export const LoginOtpScalarFieldEnum: { + id: 'id', + phone: 'phone', + codeHash: 'codeHash', + attempts: 'attempts', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + createdAt: 'createdAt' + }; + + export type LoginOtpScalarFieldEnum = (typeof LoginOtpScalarFieldEnum)[keyof typeof LoginOtpScalarFieldEnum] + + + export const FantasyNewsScalarFieldEnum: { + id: 'id', + icon: 'icon', + title: 'title', + description: 'description', + newsTime: 'newsTime', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type FantasyNewsScalarFieldEnum = (typeof FantasyNewsScalarFieldEnum)[keyof typeof FantasyNewsScalarFieldEnum] + + + export const DailyQuizScalarFieldEnum: { + id: 'id', + date: 'date', + windowStart: 'windowStart', + windowEnd: 'windowEnd', + goldWinnersCount: 'goldWinnersCount', + silverWinnersCount: 'silverWinnersCount', + bronzeWinnersCount: 'bronzeWinnersCount', + goldMinCorrect: 'goldMinCorrect', + silverMinCorrect: 'silverMinCorrect', + bronzeMinCorrect: 'bronzeMinCorrect', + isProcessed: 'isProcessed', + createdAt: 'createdAt' + }; + + export type DailyQuizScalarFieldEnum = (typeof DailyQuizScalarFieldEnum)[keyof typeof DailyQuizScalarFieldEnum] + + + export const QuizQuestionScalarFieldEnum: { + id: 'id', + quizId: 'quizId', + questionText: 'questionText', + options: 'options', + correctAnswer: 'correctAnswer', + order: 'order' + }; + + export type QuizQuestionScalarFieldEnum = (typeof QuizQuestionScalarFieldEnum)[keyof typeof QuizQuestionScalarFieldEnum] + + + export const QuizSubmissionScalarFieldEnum: { + id: 'id', + userId: 'userId', + quizId: 'quizId', + answers: 'answers', + correctAnswers: 'correctAnswers', + score: 'score', + submittedAt: 'submittedAt' + }; + + export type QuizSubmissionScalarFieldEnum = (typeof QuizSubmissionScalarFieldEnum)[keyof typeof QuizSubmissionScalarFieldEnum] + + + export const GoldenCardScalarFieldEnum: { + id: 'id', + userId: 'userId', + quizId: 'quizId', + playerId: 'playerId', + cardTier: 'cardTier', + status: 'status', + state: 'state', + acquiredDate: 'acquiredDate', + openedAt: 'openedAt' + }; + + export type GoldenCardScalarFieldEnum = (typeof GoldenCardScalarFieldEnum)[keyof typeof GoldenCardScalarFieldEnum] + + + export const SessionScalarFieldEnum: { + id: 'id', + sessionToken: 'sessionToken', + userId: 'userId', + expires: 'expires' + }; + + export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum] + + + export const TeamScalarFieldEnum: { + id: 'id', + name: 'name', + userId: 'userId', + budget: 'budget', + totalPoints: 'totalPoints', + formation: 'formation', + status: 'status', + createdAt: 'createdAt' + }; + + export type TeamScalarFieldEnum = (typeof TeamScalarFieldEnum)[keyof typeof TeamScalarFieldEnum] + + + export const TeamPlayerScalarFieldEnum: { + teamId: 'teamId', + playerId: 'playerId', + goldenCardId: 'goldenCardId', + isCaptain: 'isCaptain', + isViceCaptain: 'isViceCaptain', + isBench: 'isBench', + positionIndex: 'positionIndex' + }; + + export type TeamPlayerScalarFieldEnum = (typeof TeamPlayerScalarFieldEnum)[keyof typeof TeamPlayerScalarFieldEnum] + + + export const PackageScalarFieldEnum: { + id: 'id', + name: 'name', + budgetBonus: 'budgetBonus', + price: 'price', + description: 'description', + isActive: 'isActive' + }; + + export type PackageScalarFieldEnum = (typeof PackageScalarFieldEnum)[keyof typeof PackageScalarFieldEnum] + + + export const PaymentScalarFieldEnum: { + id: 'id', + userId: 'userId', + packageId: 'packageId', + amount: 'amount', + authority: 'authority', + refId: 'refId', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type PaymentScalarFieldEnum = (typeof PaymentScalarFieldEnum)[keyof typeof PaymentScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'String[]' + */ + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'Position' + */ + export type EnumPositionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Position'> + + + + /** + * Reference to a field of type 'Position[]' + */ + export type ListEnumPositionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Position[]'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'CardTier' + */ + export type EnumCardTierFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CardTier'> + + + + /** + * Reference to a field of type 'CardTier[]' + */ + export type ListEnumCardTierFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CardTier[]'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + + /** + * Reference to a field of type 'MatchStage' + */ + export type EnumMatchStageFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MatchStage'> + + + + /** + * Reference to a field of type 'MatchStage[]' + */ + export type ListEnumMatchStageFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MatchStage[]'> + + + + /** + * Reference to a field of type 'MatchStatus' + */ + export type EnumMatchStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MatchStatus'> + + + + /** + * Reference to a field of type 'MatchStatus[]' + */ + export type ListEnumMatchStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MatchStatus[]'> + + + + /** + * Reference to a field of type 'EventType' + */ + export type EnumEventTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'EventType'> + + + + /** + * Reference to a field of type 'EventType[]' + */ + export type ListEnumEventTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'EventType[]'> + + + + /** + * Reference to a field of type 'Role' + */ + export type EnumRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Role'> + + + + /** + * Reference to a field of type 'Role[]' + */ + export type ListEnumRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Role[]'> + + + + /** + * Reference to a field of type 'GoldenCardStatus' + */ + export type EnumGoldenCardStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'GoldenCardStatus'> + + + + /** + * Reference to a field of type 'GoldenCardStatus[]' + */ + export type ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'GoldenCardStatus[]'> + + + + /** + * Reference to a field of type 'SpecialCardState' + */ + export type EnumSpecialCardStateFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpecialCardState'> + + + + /** + * Reference to a field of type 'SpecialCardState[]' + */ + export type ListEnumSpecialCardStateFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpecialCardState[]'> + + + + /** + * Reference to a field of type 'TeamStatus' + */ + export type EnumTeamStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TeamStatus'> + + + + /** + * Reference to a field of type 'TeamStatus[]' + */ + export type ListEnumTeamStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TeamStatus[]'> + + + + /** + * Reference to a field of type 'PaymentStatus' + */ + export type EnumPaymentStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PaymentStatus'> + + + + /** + * Reference to a field of type 'PaymentStatus[]' + */ + export type ListEnumPaymentStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PaymentStatus[]'> + + /** + * Deep Input Types + */ + + + export type CountryWhereInput = { + AND?: CountryWhereInput | CountryWhereInput[] + OR?: CountryWhereInput[] + NOT?: CountryWhereInput | CountryWhereInput[] + id?: StringFilter<"Country"> | string + name?: StringFilter<"Country"> | string + code?: StringFilter<"Country"> | string + flagUrl?: StringNullableFilter<"Country"> | string | null + flagImage?: StringNullableFilter<"Country"> | string | null + confederation?: StringNullableFilter<"Country"> | string | null + qualificationMethod?: StringNullableFilter<"Country"> | string | null + qualificationDate?: StringNullableFilter<"Country"> | string | null + participationHistory?: StringNullableFilter<"Country"> | string | null + bestResult?: StringNullableFilter<"Country"> | string | null + description?: StringNullableFilter<"Country"> | string | null + defaultFormation?: StringFilter<"Country"> | string + defaultLineupPlayerIds?: StringNullableListFilter<"Country"> + defaultCaptainId?: StringNullableFilter<"Country"> | string | null + groupId?: StringNullableFilter<"Country"> | string | null + isEliminated?: BoolFilter<"Country"> | boolean + group?: XOR | null + players?: PlayerListRelationFilter + homeMatches?: MatchListRelationFilter + awayMatches?: MatchListRelationFilter + } + + export type CountryOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + code?: SortOrder + flagUrl?: SortOrderInput | SortOrder + flagImage?: SortOrderInput | SortOrder + confederation?: SortOrderInput | SortOrder + qualificationMethod?: SortOrderInput | SortOrder + qualificationDate?: SortOrderInput | SortOrder + participationHistory?: SortOrderInput | SortOrder + bestResult?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + defaultFormation?: SortOrder + defaultLineupPlayerIds?: SortOrder + defaultCaptainId?: SortOrderInput | SortOrder + groupId?: SortOrderInput | SortOrder + isEliminated?: SortOrder + group?: GroupOrderByWithRelationInput + players?: PlayerOrderByRelationAggregateInput + homeMatches?: MatchOrderByRelationAggregateInput + awayMatches?: MatchOrderByRelationAggregateInput + } + + export type CountryWhereUniqueInput = Prisma.AtLeast<{ + id?: string + name?: string + code?: string + AND?: CountryWhereInput | CountryWhereInput[] + OR?: CountryWhereInput[] + NOT?: CountryWhereInput | CountryWhereInput[] + flagUrl?: StringNullableFilter<"Country"> | string | null + flagImage?: StringNullableFilter<"Country"> | string | null + confederation?: StringNullableFilter<"Country"> | string | null + qualificationMethod?: StringNullableFilter<"Country"> | string | null + qualificationDate?: StringNullableFilter<"Country"> | string | null + participationHistory?: StringNullableFilter<"Country"> | string | null + bestResult?: StringNullableFilter<"Country"> | string | null + description?: StringNullableFilter<"Country"> | string | null + defaultFormation?: StringFilter<"Country"> | string + defaultLineupPlayerIds?: StringNullableListFilter<"Country"> + defaultCaptainId?: StringNullableFilter<"Country"> | string | null + groupId?: StringNullableFilter<"Country"> | string | null + isEliminated?: BoolFilter<"Country"> | boolean + group?: XOR | null + players?: PlayerListRelationFilter + homeMatches?: MatchListRelationFilter + awayMatches?: MatchListRelationFilter + }, "id" | "name" | "code"> + + export type CountryOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + code?: SortOrder + flagUrl?: SortOrderInput | SortOrder + flagImage?: SortOrderInput | SortOrder + confederation?: SortOrderInput | SortOrder + qualificationMethod?: SortOrderInput | SortOrder + qualificationDate?: SortOrderInput | SortOrder + participationHistory?: SortOrderInput | SortOrder + bestResult?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + defaultFormation?: SortOrder + defaultLineupPlayerIds?: SortOrder + defaultCaptainId?: SortOrderInput | SortOrder + groupId?: SortOrderInput | SortOrder + isEliminated?: SortOrder + _count?: CountryCountOrderByAggregateInput + _max?: CountryMaxOrderByAggregateInput + _min?: CountryMinOrderByAggregateInput + } + + export type CountryScalarWhereWithAggregatesInput = { + AND?: CountryScalarWhereWithAggregatesInput | CountryScalarWhereWithAggregatesInput[] + OR?: CountryScalarWhereWithAggregatesInput[] + NOT?: CountryScalarWhereWithAggregatesInput | CountryScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Country"> | string + name?: StringWithAggregatesFilter<"Country"> | string + code?: StringWithAggregatesFilter<"Country"> | string + flagUrl?: StringNullableWithAggregatesFilter<"Country"> | string | null + flagImage?: StringNullableWithAggregatesFilter<"Country"> | string | null + confederation?: StringNullableWithAggregatesFilter<"Country"> | string | null + qualificationMethod?: StringNullableWithAggregatesFilter<"Country"> | string | null + qualificationDate?: StringNullableWithAggregatesFilter<"Country"> | string | null + participationHistory?: StringNullableWithAggregatesFilter<"Country"> | string | null + bestResult?: StringNullableWithAggregatesFilter<"Country"> | string | null + description?: StringNullableWithAggregatesFilter<"Country"> | string | null + defaultFormation?: StringWithAggregatesFilter<"Country"> | string + defaultLineupPlayerIds?: StringNullableListFilter<"Country"> + defaultCaptainId?: StringNullableWithAggregatesFilter<"Country"> | string | null + groupId?: StringNullableWithAggregatesFilter<"Country"> | string | null + isEliminated?: BoolWithAggregatesFilter<"Country"> | boolean + } + + export type GroupWhereInput = { + AND?: GroupWhereInput | GroupWhereInput[] + OR?: GroupWhereInput[] + NOT?: GroupWhereInput | GroupWhereInput[] + id?: StringFilter<"Group"> | string + name?: StringFilter<"Group"> | string + countries?: CountryListRelationFilter + } + + export type GroupOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + countries?: CountryOrderByRelationAggregateInput + } + + export type GroupWhereUniqueInput = Prisma.AtLeast<{ + id?: string + name?: string + AND?: GroupWhereInput | GroupWhereInput[] + OR?: GroupWhereInput[] + NOT?: GroupWhereInput | GroupWhereInput[] + countries?: CountryListRelationFilter + }, "id" | "name"> + + export type GroupOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + _count?: GroupCountOrderByAggregateInput + _max?: GroupMaxOrderByAggregateInput + _min?: GroupMinOrderByAggregateInput + } + + export type GroupScalarWhereWithAggregatesInput = { + AND?: GroupScalarWhereWithAggregatesInput | GroupScalarWhereWithAggregatesInput[] + OR?: GroupScalarWhereWithAggregatesInput[] + NOT?: GroupScalarWhereWithAggregatesInput | GroupScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Group"> | string + name?: StringWithAggregatesFilter<"Group"> | string + } + + export type PlayerWhereInput = { + AND?: PlayerWhereInput | PlayerWhereInput[] + OR?: PlayerWhereInput[] + NOT?: PlayerWhereInput | PlayerWhereInput[] + id?: StringFilter<"Player"> | string + name?: StringFilter<"Player"> | string + image?: StringNullableFilter<"Player"> | string | null + position?: EnumPositionFilter<"Player"> | $Enums.Position + countryId?: StringFilter<"Player"> | string + price?: FloatFilter<"Player"> | number + totalPoints?: IntFilter<"Player"> | number + isActive?: BoolFilter<"Player"> | boolean + isGoldenCardEligible?: BoolFilter<"Player"> | boolean + cardTier?: EnumCardTierFilter<"Player"> | $Enums.CardTier + createdAt?: DateTimeFilter<"Player"> | Date | string + updatedAt?: DateTimeFilter<"Player"> | Date | string + country?: XOR + matchStats?: PlayerMatchStatListRelationFilter + teamPlayers?: TeamPlayerListRelationFilter + events?: MatchEventListRelationFilter + goldenCards?: GoldenCardListRelationFilter + } + + export type PlayerOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + image?: SortOrderInput | SortOrder + position?: SortOrder + countryId?: SortOrder + price?: SortOrder + totalPoints?: SortOrder + isActive?: SortOrder + isGoldenCardEligible?: SortOrder + cardTier?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + country?: CountryOrderByWithRelationInput + matchStats?: PlayerMatchStatOrderByRelationAggregateInput + teamPlayers?: TeamPlayerOrderByRelationAggregateInput + events?: MatchEventOrderByRelationAggregateInput + goldenCards?: GoldenCardOrderByRelationAggregateInput + } + + export type PlayerWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: PlayerWhereInput | PlayerWhereInput[] + OR?: PlayerWhereInput[] + NOT?: PlayerWhereInput | PlayerWhereInput[] + name?: StringFilter<"Player"> | string + image?: StringNullableFilter<"Player"> | string | null + position?: EnumPositionFilter<"Player"> | $Enums.Position + countryId?: StringFilter<"Player"> | string + price?: FloatFilter<"Player"> | number + totalPoints?: IntFilter<"Player"> | number + isActive?: BoolFilter<"Player"> | boolean + isGoldenCardEligible?: BoolFilter<"Player"> | boolean + cardTier?: EnumCardTierFilter<"Player"> | $Enums.CardTier + createdAt?: DateTimeFilter<"Player"> | Date | string + updatedAt?: DateTimeFilter<"Player"> | Date | string + country?: XOR + matchStats?: PlayerMatchStatListRelationFilter + teamPlayers?: TeamPlayerListRelationFilter + events?: MatchEventListRelationFilter + goldenCards?: GoldenCardListRelationFilter + }, "id"> + + export type PlayerOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + image?: SortOrderInput | SortOrder + position?: SortOrder + countryId?: SortOrder + price?: SortOrder + totalPoints?: SortOrder + isActive?: SortOrder + isGoldenCardEligible?: SortOrder + cardTier?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: PlayerCountOrderByAggregateInput + _avg?: PlayerAvgOrderByAggregateInput + _max?: PlayerMaxOrderByAggregateInput + _min?: PlayerMinOrderByAggregateInput + _sum?: PlayerSumOrderByAggregateInput + } + + export type PlayerScalarWhereWithAggregatesInput = { + AND?: PlayerScalarWhereWithAggregatesInput | PlayerScalarWhereWithAggregatesInput[] + OR?: PlayerScalarWhereWithAggregatesInput[] + NOT?: PlayerScalarWhereWithAggregatesInput | PlayerScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Player"> | string + name?: StringWithAggregatesFilter<"Player"> | string + image?: StringNullableWithAggregatesFilter<"Player"> | string | null + position?: EnumPositionWithAggregatesFilter<"Player"> | $Enums.Position + countryId?: StringWithAggregatesFilter<"Player"> | string + price?: FloatWithAggregatesFilter<"Player"> | number + totalPoints?: IntWithAggregatesFilter<"Player"> | number + isActive?: BoolWithAggregatesFilter<"Player"> | boolean + isGoldenCardEligible?: BoolWithAggregatesFilter<"Player"> | boolean + cardTier?: EnumCardTierWithAggregatesFilter<"Player"> | $Enums.CardTier + createdAt?: DateTimeWithAggregatesFilter<"Player"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Player"> | Date | string + } + + export type MatchWhereInput = { + AND?: MatchWhereInput | MatchWhereInput[] + OR?: MatchWhereInput[] + NOT?: MatchWhereInput | MatchWhereInput[] + id?: StringFilter<"Match"> | string + homeTeamId?: StringFilter<"Match"> | string + awayTeamId?: StringFilter<"Match"> | string + homeScore?: IntNullableFilter<"Match"> | number | null + awayScore?: IntNullableFilter<"Match"> | number | null + stage?: EnumMatchStageFilter<"Match"> | $Enums.MatchStage + status?: EnumMatchStatusFilter<"Match"> | $Enums.MatchStatus + matchDate?: DateTimeFilter<"Match"> | Date | string + matchDatePersian?: StringNullableFilter<"Match"> | string | null + stadium?: StringNullableFilter<"Match"> | string | null + city?: StringNullableFilter<"Match"> | string | null + referee?: StringNullableFilter<"Match"> | string | null + assistant1?: StringNullableFilter<"Match"> | string | null + assistant2?: StringNullableFilter<"Match"> | string | null + fourthOfficial?: StringNullableFilter<"Match"> | string | null + attendance?: IntNullableFilter<"Match"> | number | null + weather?: StringNullableFilter<"Match"> | string | null + description?: StringNullableFilter<"Match"> | string | null + roundId?: StringNullableFilter<"Match"> | string | null + createdAt?: DateTimeFilter<"Match"> | Date | string + homeTeam?: XOR + awayTeam?: XOR + round?: XOR | null + playerStats?: PlayerMatchStatListRelationFilter + events?: MatchEventListRelationFilter + lineups?: MatchLineupListRelationFilter + } + + export type MatchOrderByWithRelationInput = { + id?: SortOrder + homeTeamId?: SortOrder + awayTeamId?: SortOrder + homeScore?: SortOrderInput | SortOrder + awayScore?: SortOrderInput | SortOrder + stage?: SortOrder + status?: SortOrder + matchDate?: SortOrder + matchDatePersian?: SortOrderInput | SortOrder + stadium?: SortOrderInput | SortOrder + city?: SortOrderInput | SortOrder + referee?: SortOrderInput | SortOrder + assistant1?: SortOrderInput | SortOrder + assistant2?: SortOrderInput | SortOrder + fourthOfficial?: SortOrderInput | SortOrder + attendance?: SortOrderInput | SortOrder + weather?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + roundId?: SortOrderInput | SortOrder + createdAt?: SortOrder + homeTeam?: CountryOrderByWithRelationInput + awayTeam?: CountryOrderByWithRelationInput + round?: RoundOrderByWithRelationInput + playerStats?: PlayerMatchStatOrderByRelationAggregateInput + events?: MatchEventOrderByRelationAggregateInput + lineups?: MatchLineupOrderByRelationAggregateInput + } + + export type MatchWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: MatchWhereInput | MatchWhereInput[] + OR?: MatchWhereInput[] + NOT?: MatchWhereInput | MatchWhereInput[] + homeTeamId?: StringFilter<"Match"> | string + awayTeamId?: StringFilter<"Match"> | string + homeScore?: IntNullableFilter<"Match"> | number | null + awayScore?: IntNullableFilter<"Match"> | number | null + stage?: EnumMatchStageFilter<"Match"> | $Enums.MatchStage + status?: EnumMatchStatusFilter<"Match"> | $Enums.MatchStatus + matchDate?: DateTimeFilter<"Match"> | Date | string + matchDatePersian?: StringNullableFilter<"Match"> | string | null + stadium?: StringNullableFilter<"Match"> | string | null + city?: StringNullableFilter<"Match"> | string | null + referee?: StringNullableFilter<"Match"> | string | null + assistant1?: StringNullableFilter<"Match"> | string | null + assistant2?: StringNullableFilter<"Match"> | string | null + fourthOfficial?: StringNullableFilter<"Match"> | string | null + attendance?: IntNullableFilter<"Match"> | number | null + weather?: StringNullableFilter<"Match"> | string | null + description?: StringNullableFilter<"Match"> | string | null + roundId?: StringNullableFilter<"Match"> | string | null + createdAt?: DateTimeFilter<"Match"> | Date | string + homeTeam?: XOR + awayTeam?: XOR + round?: XOR | null + playerStats?: PlayerMatchStatListRelationFilter + events?: MatchEventListRelationFilter + lineups?: MatchLineupListRelationFilter + }, "id"> + + export type MatchOrderByWithAggregationInput = { + id?: SortOrder + homeTeamId?: SortOrder + awayTeamId?: SortOrder + homeScore?: SortOrderInput | SortOrder + awayScore?: SortOrderInput | SortOrder + stage?: SortOrder + status?: SortOrder + matchDate?: SortOrder + matchDatePersian?: SortOrderInput | SortOrder + stadium?: SortOrderInput | SortOrder + city?: SortOrderInput | SortOrder + referee?: SortOrderInput | SortOrder + assistant1?: SortOrderInput | SortOrder + assistant2?: SortOrderInput | SortOrder + fourthOfficial?: SortOrderInput | SortOrder + attendance?: SortOrderInput | SortOrder + weather?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + roundId?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: MatchCountOrderByAggregateInput + _avg?: MatchAvgOrderByAggregateInput + _max?: MatchMaxOrderByAggregateInput + _min?: MatchMinOrderByAggregateInput + _sum?: MatchSumOrderByAggregateInput + } + + export type MatchScalarWhereWithAggregatesInput = { + AND?: MatchScalarWhereWithAggregatesInput | MatchScalarWhereWithAggregatesInput[] + OR?: MatchScalarWhereWithAggregatesInput[] + NOT?: MatchScalarWhereWithAggregatesInput | MatchScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Match"> | string + homeTeamId?: StringWithAggregatesFilter<"Match"> | string + awayTeamId?: StringWithAggregatesFilter<"Match"> | string + homeScore?: IntNullableWithAggregatesFilter<"Match"> | number | null + awayScore?: IntNullableWithAggregatesFilter<"Match"> | number | null + stage?: EnumMatchStageWithAggregatesFilter<"Match"> | $Enums.MatchStage + status?: EnumMatchStatusWithAggregatesFilter<"Match"> | $Enums.MatchStatus + matchDate?: DateTimeWithAggregatesFilter<"Match"> | Date | string + matchDatePersian?: StringNullableWithAggregatesFilter<"Match"> | string | null + stadium?: StringNullableWithAggregatesFilter<"Match"> | string | null + city?: StringNullableWithAggregatesFilter<"Match"> | string | null + referee?: StringNullableWithAggregatesFilter<"Match"> | string | null + assistant1?: StringNullableWithAggregatesFilter<"Match"> | string | null + assistant2?: StringNullableWithAggregatesFilter<"Match"> | string | null + fourthOfficial?: StringNullableWithAggregatesFilter<"Match"> | string | null + attendance?: IntNullableWithAggregatesFilter<"Match"> | number | null + weather?: StringNullableWithAggregatesFilter<"Match"> | string | null + description?: StringNullableWithAggregatesFilter<"Match"> | string | null + roundId?: StringNullableWithAggregatesFilter<"Match"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Match"> | Date | string + } + + export type RoundWhereInput = { + AND?: RoundWhereInput | RoundWhereInput[] + OR?: RoundWhereInput[] + NOT?: RoundWhereInput | RoundWhereInput[] + id?: StringFilter<"Round"> | string + number?: IntFilter<"Round"> | number + name?: StringFilter<"Round"> | string + isActive?: BoolFilter<"Round"> | boolean + deadline?: DateTimeFilter<"Round"> | Date | string + createdAt?: DateTimeFilter<"Round"> | Date | string + matches?: MatchListRelationFilter + } + + export type RoundOrderByWithRelationInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + matches?: MatchOrderByRelationAggregateInput + } + + export type RoundWhereUniqueInput = Prisma.AtLeast<{ + id?: string + number?: number + AND?: RoundWhereInput | RoundWhereInput[] + OR?: RoundWhereInput[] + NOT?: RoundWhereInput | RoundWhereInput[] + name?: StringFilter<"Round"> | string + isActive?: BoolFilter<"Round"> | boolean + deadline?: DateTimeFilter<"Round"> | Date | string + createdAt?: DateTimeFilter<"Round"> | Date | string + matches?: MatchListRelationFilter + }, "id" | "number"> + + export type RoundOrderByWithAggregationInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + _count?: RoundCountOrderByAggregateInput + _avg?: RoundAvgOrderByAggregateInput + _max?: RoundMaxOrderByAggregateInput + _min?: RoundMinOrderByAggregateInput + _sum?: RoundSumOrderByAggregateInput + } + + export type RoundScalarWhereWithAggregatesInput = { + AND?: RoundScalarWhereWithAggregatesInput | RoundScalarWhereWithAggregatesInput[] + OR?: RoundScalarWhereWithAggregatesInput[] + NOT?: RoundScalarWhereWithAggregatesInput | RoundScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Round"> | string + number?: IntWithAggregatesFilter<"Round"> | number + name?: StringWithAggregatesFilter<"Round"> | string + isActive?: BoolWithAggregatesFilter<"Round"> | boolean + deadline?: DateTimeWithAggregatesFilter<"Round"> | Date | string + createdAt?: DateTimeWithAggregatesFilter<"Round"> | Date | string + } + + export type GameweekWhereInput = { + AND?: GameweekWhereInput | GameweekWhereInput[] + OR?: GameweekWhereInput[] + NOT?: GameweekWhereInput | GameweekWhereInput[] + id?: StringFilter<"Gameweek"> | string + number?: IntFilter<"Gameweek"> | number + name?: StringFilter<"Gameweek"> | string + isActive?: BoolFilter<"Gameweek"> | boolean + deadline?: DateTimeFilter<"Gameweek"> | Date | string + createdAt?: DateTimeFilter<"Gameweek"> | Date | string + } + + export type GameweekOrderByWithRelationInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type GameweekWhereUniqueInput = Prisma.AtLeast<{ + id?: string + number?: number + AND?: GameweekWhereInput | GameweekWhereInput[] + OR?: GameweekWhereInput[] + NOT?: GameweekWhereInput | GameweekWhereInput[] + name?: StringFilter<"Gameweek"> | string + isActive?: BoolFilter<"Gameweek"> | boolean + deadline?: DateTimeFilter<"Gameweek"> | Date | string + createdAt?: DateTimeFilter<"Gameweek"> | Date | string + }, "id" | "number"> + + export type GameweekOrderByWithAggregationInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + _count?: GameweekCountOrderByAggregateInput + _avg?: GameweekAvgOrderByAggregateInput + _max?: GameweekMaxOrderByAggregateInput + _min?: GameweekMinOrderByAggregateInput + _sum?: GameweekSumOrderByAggregateInput + } + + export type GameweekScalarWhereWithAggregatesInput = { + AND?: GameweekScalarWhereWithAggregatesInput | GameweekScalarWhereWithAggregatesInput[] + OR?: GameweekScalarWhereWithAggregatesInput[] + NOT?: GameweekScalarWhereWithAggregatesInput | GameweekScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Gameweek"> | string + number?: IntWithAggregatesFilter<"Gameweek"> | number + name?: StringWithAggregatesFilter<"Gameweek"> | string + isActive?: BoolWithAggregatesFilter<"Gameweek"> | boolean + deadline?: DateTimeWithAggregatesFilter<"Gameweek"> | Date | string + createdAt?: DateTimeWithAggregatesFilter<"Gameweek"> | Date | string + } + + export type MatchEventWhereInput = { + AND?: MatchEventWhereInput | MatchEventWhereInput[] + OR?: MatchEventWhereInput[] + NOT?: MatchEventWhereInput | MatchEventWhereInput[] + id?: StringFilter<"MatchEvent"> | string + matchId?: StringFilter<"MatchEvent"> | string + playerId?: StringFilter<"MatchEvent"> | string + type?: EnumEventTypeFilter<"MatchEvent"> | $Enums.EventType + minute?: IntNullableFilter<"MatchEvent"> | number | null + extraInfo?: StringNullableFilter<"MatchEvent"> | string | null + createdAt?: DateTimeFilter<"MatchEvent"> | Date | string + match?: XOR + player?: XOR + } + + export type MatchEventOrderByWithRelationInput = { + id?: SortOrder + matchId?: SortOrder + playerId?: SortOrder + type?: SortOrder + minute?: SortOrderInput | SortOrder + extraInfo?: SortOrderInput | SortOrder + createdAt?: SortOrder + match?: MatchOrderByWithRelationInput + player?: PlayerOrderByWithRelationInput + } + + export type MatchEventWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: MatchEventWhereInput | MatchEventWhereInput[] + OR?: MatchEventWhereInput[] + NOT?: MatchEventWhereInput | MatchEventWhereInput[] + matchId?: StringFilter<"MatchEvent"> | string + playerId?: StringFilter<"MatchEvent"> | string + type?: EnumEventTypeFilter<"MatchEvent"> | $Enums.EventType + minute?: IntNullableFilter<"MatchEvent"> | number | null + extraInfo?: StringNullableFilter<"MatchEvent"> | string | null + createdAt?: DateTimeFilter<"MatchEvent"> | Date | string + match?: XOR + player?: XOR + }, "id"> + + export type MatchEventOrderByWithAggregationInput = { + id?: SortOrder + matchId?: SortOrder + playerId?: SortOrder + type?: SortOrder + minute?: SortOrderInput | SortOrder + extraInfo?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: MatchEventCountOrderByAggregateInput + _avg?: MatchEventAvgOrderByAggregateInput + _max?: MatchEventMaxOrderByAggregateInput + _min?: MatchEventMinOrderByAggregateInput + _sum?: MatchEventSumOrderByAggregateInput + } + + export type MatchEventScalarWhereWithAggregatesInput = { + AND?: MatchEventScalarWhereWithAggregatesInput | MatchEventScalarWhereWithAggregatesInput[] + OR?: MatchEventScalarWhereWithAggregatesInput[] + NOT?: MatchEventScalarWhereWithAggregatesInput | MatchEventScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"MatchEvent"> | string + matchId?: StringWithAggregatesFilter<"MatchEvent"> | string + playerId?: StringWithAggregatesFilter<"MatchEvent"> | string + type?: EnumEventTypeWithAggregatesFilter<"MatchEvent"> | $Enums.EventType + minute?: IntNullableWithAggregatesFilter<"MatchEvent"> | number | null + extraInfo?: StringNullableWithAggregatesFilter<"MatchEvent"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"MatchEvent"> | Date | string + } + + export type MatchLineupWhereInput = { + AND?: MatchLineupWhereInput | MatchLineupWhereInput[] + OR?: MatchLineupWhereInput[] + NOT?: MatchLineupWhereInput | MatchLineupWhereInput[] + id?: StringFilter<"MatchLineup"> | string + matchId?: StringFilter<"MatchLineup"> | string + countryId?: StringFilter<"MatchLineup"> | string + formation?: StringFilter<"MatchLineup"> | string + playerIds?: StringNullableListFilter<"MatchLineup"> + match?: XOR + } + + export type MatchLineupOrderByWithRelationInput = { + id?: SortOrder + matchId?: SortOrder + countryId?: SortOrder + formation?: SortOrder + playerIds?: SortOrder + match?: MatchOrderByWithRelationInput + } + + export type MatchLineupWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: MatchLineupWhereInput | MatchLineupWhereInput[] + OR?: MatchLineupWhereInput[] + NOT?: MatchLineupWhereInput | MatchLineupWhereInput[] + matchId?: StringFilter<"MatchLineup"> | string + countryId?: StringFilter<"MatchLineup"> | string + formation?: StringFilter<"MatchLineup"> | string + playerIds?: StringNullableListFilter<"MatchLineup"> + match?: XOR + }, "id"> + + export type MatchLineupOrderByWithAggregationInput = { + id?: SortOrder + matchId?: SortOrder + countryId?: SortOrder + formation?: SortOrder + playerIds?: SortOrder + _count?: MatchLineupCountOrderByAggregateInput + _max?: MatchLineupMaxOrderByAggregateInput + _min?: MatchLineupMinOrderByAggregateInput + } + + export type MatchLineupScalarWhereWithAggregatesInput = { + AND?: MatchLineupScalarWhereWithAggregatesInput | MatchLineupScalarWhereWithAggregatesInput[] + OR?: MatchLineupScalarWhereWithAggregatesInput[] + NOT?: MatchLineupScalarWhereWithAggregatesInput | MatchLineupScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"MatchLineup"> | string + matchId?: StringWithAggregatesFilter<"MatchLineup"> | string + countryId?: StringWithAggregatesFilter<"MatchLineup"> | string + formation?: StringWithAggregatesFilter<"MatchLineup"> | string + playerIds?: StringNullableListFilter<"MatchLineup"> + } + + export type PlayerMatchStatWhereInput = { + AND?: PlayerMatchStatWhereInput | PlayerMatchStatWhereInput[] + OR?: PlayerMatchStatWhereInput[] + NOT?: PlayerMatchStatWhereInput | PlayerMatchStatWhereInput[] + id?: StringFilter<"PlayerMatchStat"> | string + playerId?: StringFilter<"PlayerMatchStat"> | string + matchId?: StringFilter<"PlayerMatchStat"> | string + goals?: IntFilter<"PlayerMatchStat"> | number + assists?: IntFilter<"PlayerMatchStat"> | number + yellowCards?: IntFilter<"PlayerMatchStat"> | number + redCards?: IntFilter<"PlayerMatchStat"> | number + minutesPlayed?: IntFilter<"PlayerMatchStat"> | number + cleanSheet?: BoolFilter<"PlayerMatchStat"> | boolean + penaltySaved?: IntFilter<"PlayerMatchStat"> | number + penaltyMissed?: IntFilter<"PlayerMatchStat"> | number + ownGoals?: IntFilter<"PlayerMatchStat"> | number + isMotm?: BoolFilter<"PlayerMatchStat"> | boolean + extraTimeBonus?: IntFilter<"PlayerMatchStat"> | number + points?: IntFilter<"PlayerMatchStat"> | number + player?: XOR + match?: XOR + } + + export type PlayerMatchStatOrderByWithRelationInput = { + id?: SortOrder + playerId?: SortOrder + matchId?: SortOrder + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + cleanSheet?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + isMotm?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + player?: PlayerOrderByWithRelationInput + match?: MatchOrderByWithRelationInput + } + + export type PlayerMatchStatWhereUniqueInput = Prisma.AtLeast<{ + id?: string + playerId_matchId?: PlayerMatchStatPlayerIdMatchIdCompoundUniqueInput + AND?: PlayerMatchStatWhereInput | PlayerMatchStatWhereInput[] + OR?: PlayerMatchStatWhereInput[] + NOT?: PlayerMatchStatWhereInput | PlayerMatchStatWhereInput[] + playerId?: StringFilter<"PlayerMatchStat"> | string + matchId?: StringFilter<"PlayerMatchStat"> | string + goals?: IntFilter<"PlayerMatchStat"> | number + assists?: IntFilter<"PlayerMatchStat"> | number + yellowCards?: IntFilter<"PlayerMatchStat"> | number + redCards?: IntFilter<"PlayerMatchStat"> | number + minutesPlayed?: IntFilter<"PlayerMatchStat"> | number + cleanSheet?: BoolFilter<"PlayerMatchStat"> | boolean + penaltySaved?: IntFilter<"PlayerMatchStat"> | number + penaltyMissed?: IntFilter<"PlayerMatchStat"> | number + ownGoals?: IntFilter<"PlayerMatchStat"> | number + isMotm?: BoolFilter<"PlayerMatchStat"> | boolean + extraTimeBonus?: IntFilter<"PlayerMatchStat"> | number + points?: IntFilter<"PlayerMatchStat"> | number + player?: XOR + match?: XOR + }, "id" | "playerId_matchId"> + + export type PlayerMatchStatOrderByWithAggregationInput = { + id?: SortOrder + playerId?: SortOrder + matchId?: SortOrder + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + cleanSheet?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + isMotm?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + _count?: PlayerMatchStatCountOrderByAggregateInput + _avg?: PlayerMatchStatAvgOrderByAggregateInput + _max?: PlayerMatchStatMaxOrderByAggregateInput + _min?: PlayerMatchStatMinOrderByAggregateInput + _sum?: PlayerMatchStatSumOrderByAggregateInput + } + + export type PlayerMatchStatScalarWhereWithAggregatesInput = { + AND?: PlayerMatchStatScalarWhereWithAggregatesInput | PlayerMatchStatScalarWhereWithAggregatesInput[] + OR?: PlayerMatchStatScalarWhereWithAggregatesInput[] + NOT?: PlayerMatchStatScalarWhereWithAggregatesInput | PlayerMatchStatScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"PlayerMatchStat"> | string + playerId?: StringWithAggregatesFilter<"PlayerMatchStat"> | string + matchId?: StringWithAggregatesFilter<"PlayerMatchStat"> | string + goals?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + assists?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + yellowCards?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + redCards?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + minutesPlayed?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + cleanSheet?: BoolWithAggregatesFilter<"PlayerMatchStat"> | boolean + penaltySaved?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + penaltyMissed?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + ownGoals?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + isMotm?: BoolWithAggregatesFilter<"PlayerMatchStat"> | boolean + extraTimeBonus?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + points?: IntWithAggregatesFilter<"PlayerMatchStat"> | number + } + + export type ScoringRuleWhereInput = { + AND?: ScoringRuleWhereInput | ScoringRuleWhereInput[] + OR?: ScoringRuleWhereInput[] + NOT?: ScoringRuleWhereInput | ScoringRuleWhereInput[] + id?: StringFilter<"ScoringRule"> | string + position?: EnumPositionFilter<"ScoringRule"> | $Enums.Position + eventType?: EnumEventTypeFilter<"ScoringRule"> | $Enums.EventType + points?: IntFilter<"ScoringRule"> | number + updatedAt?: DateTimeFilter<"ScoringRule"> | Date | string + updatedBy?: StringNullableFilter<"ScoringRule"> | string | null + } + + export type ScoringRuleOrderByWithRelationInput = { + id?: SortOrder + position?: SortOrder + eventType?: SortOrder + points?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrderInput | SortOrder + } + + export type ScoringRuleWhereUniqueInput = Prisma.AtLeast<{ + id?: string + position_eventType?: ScoringRulePositionEventTypeCompoundUniqueInput + AND?: ScoringRuleWhereInput | ScoringRuleWhereInput[] + OR?: ScoringRuleWhereInput[] + NOT?: ScoringRuleWhereInput | ScoringRuleWhereInput[] + position?: EnumPositionFilter<"ScoringRule"> | $Enums.Position + eventType?: EnumEventTypeFilter<"ScoringRule"> | $Enums.EventType + points?: IntFilter<"ScoringRule"> | number + updatedAt?: DateTimeFilter<"ScoringRule"> | Date | string + updatedBy?: StringNullableFilter<"ScoringRule"> | string | null + }, "id" | "position_eventType"> + + export type ScoringRuleOrderByWithAggregationInput = { + id?: SortOrder + position?: SortOrder + eventType?: SortOrder + points?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrderInput | SortOrder + _count?: ScoringRuleCountOrderByAggregateInput + _avg?: ScoringRuleAvgOrderByAggregateInput + _max?: ScoringRuleMaxOrderByAggregateInput + _min?: ScoringRuleMinOrderByAggregateInput + _sum?: ScoringRuleSumOrderByAggregateInput + } + + export type ScoringRuleScalarWhereWithAggregatesInput = { + AND?: ScoringRuleScalarWhereWithAggregatesInput | ScoringRuleScalarWhereWithAggregatesInput[] + OR?: ScoringRuleScalarWhereWithAggregatesInput[] + NOT?: ScoringRuleScalarWhereWithAggregatesInput | ScoringRuleScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ScoringRule"> | string + position?: EnumPositionWithAggregatesFilter<"ScoringRule"> | $Enums.Position + eventType?: EnumEventTypeWithAggregatesFilter<"ScoringRule"> | $Enums.EventType + points?: IntWithAggregatesFilter<"ScoringRule"> | number + updatedAt?: DateTimeWithAggregatesFilter<"ScoringRule"> | Date | string + updatedBy?: StringNullableWithAggregatesFilter<"ScoringRule"> | string | null + } + + export type UserWhereInput = { + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + id?: StringFilter<"User"> | string + name?: StringNullableFilter<"User"> | string | null + email?: StringFilter<"User"> | string + phone?: StringNullableFilter<"User"> | string | null + password?: StringFilter<"User"> | string + role?: EnumRoleFilter<"User"> | $Enums.Role + createdAt?: DateTimeFilter<"User"> | Date | string + team?: XOR | null + sessions?: SessionListRelationFilter + payments?: PaymentListRelationFilter + quizSubmissions?: QuizSubmissionListRelationFilter + goldenCards?: GoldenCardListRelationFilter + } + + export type UserOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrderInput | SortOrder + email?: SortOrder + phone?: SortOrderInput | SortOrder + password?: SortOrder + role?: SortOrder + createdAt?: SortOrder + team?: TeamOrderByWithRelationInput + sessions?: SessionOrderByRelationAggregateInput + payments?: PaymentOrderByRelationAggregateInput + quizSubmissions?: QuizSubmissionOrderByRelationAggregateInput + goldenCards?: GoldenCardOrderByRelationAggregateInput + } + + export type UserWhereUniqueInput = Prisma.AtLeast<{ + id?: string + email?: string + phone?: string + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + name?: StringNullableFilter<"User"> | string | null + password?: StringFilter<"User"> | string + role?: EnumRoleFilter<"User"> | $Enums.Role + createdAt?: DateTimeFilter<"User"> | Date | string + team?: XOR | null + sessions?: SessionListRelationFilter + payments?: PaymentListRelationFilter + quizSubmissions?: QuizSubmissionListRelationFilter + goldenCards?: GoldenCardListRelationFilter + }, "id" | "email" | "phone"> + + export type UserOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrderInput | SortOrder + email?: SortOrder + phone?: SortOrderInput | SortOrder + password?: SortOrder + role?: SortOrder + createdAt?: SortOrder + _count?: UserCountOrderByAggregateInput + _max?: UserMaxOrderByAggregateInput + _min?: UserMinOrderByAggregateInput + } + + export type UserScalarWhereWithAggregatesInput = { + AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + OR?: UserScalarWhereWithAggregatesInput[] + NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"User"> | string + name?: StringNullableWithAggregatesFilter<"User"> | string | null + email?: StringWithAggregatesFilter<"User"> | string + phone?: StringNullableWithAggregatesFilter<"User"> | string | null + password?: StringWithAggregatesFilter<"User"> | string + role?: EnumRoleWithAggregatesFilter<"User"> | $Enums.Role + createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + } + + export type LoginOtpWhereInput = { + AND?: LoginOtpWhereInput | LoginOtpWhereInput[] + OR?: LoginOtpWhereInput[] + NOT?: LoginOtpWhereInput | LoginOtpWhereInput[] + id?: StringFilter<"LoginOtp"> | string + phone?: StringFilter<"LoginOtp"> | string + codeHash?: StringFilter<"LoginOtp"> | string + attempts?: IntFilter<"LoginOtp"> | number + expiresAt?: DateTimeFilter<"LoginOtp"> | Date | string + consumedAt?: DateTimeNullableFilter<"LoginOtp"> | Date | string | null + createdAt?: DateTimeFilter<"LoginOtp"> | Date | string + } + + export type LoginOtpOrderByWithRelationInput = { + id?: SortOrder + phone?: SortOrder + codeHash?: SortOrder + attempts?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + } + + export type LoginOtpWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: LoginOtpWhereInput | LoginOtpWhereInput[] + OR?: LoginOtpWhereInput[] + NOT?: LoginOtpWhereInput | LoginOtpWhereInput[] + phone?: StringFilter<"LoginOtp"> | string + codeHash?: StringFilter<"LoginOtp"> | string + attempts?: IntFilter<"LoginOtp"> | number + expiresAt?: DateTimeFilter<"LoginOtp"> | Date | string + consumedAt?: DateTimeNullableFilter<"LoginOtp"> | Date | string | null + createdAt?: DateTimeFilter<"LoginOtp"> | Date | string + }, "id"> + + export type LoginOtpOrderByWithAggregationInput = { + id?: SortOrder + phone?: SortOrder + codeHash?: SortOrder + attempts?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: LoginOtpCountOrderByAggregateInput + _avg?: LoginOtpAvgOrderByAggregateInput + _max?: LoginOtpMaxOrderByAggregateInput + _min?: LoginOtpMinOrderByAggregateInput + _sum?: LoginOtpSumOrderByAggregateInput + } + + export type LoginOtpScalarWhereWithAggregatesInput = { + AND?: LoginOtpScalarWhereWithAggregatesInput | LoginOtpScalarWhereWithAggregatesInput[] + OR?: LoginOtpScalarWhereWithAggregatesInput[] + NOT?: LoginOtpScalarWhereWithAggregatesInput | LoginOtpScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"LoginOtp"> | string + phone?: StringWithAggregatesFilter<"LoginOtp"> | string + codeHash?: StringWithAggregatesFilter<"LoginOtp"> | string + attempts?: IntWithAggregatesFilter<"LoginOtp"> | number + expiresAt?: DateTimeWithAggregatesFilter<"LoginOtp"> | Date | string + consumedAt?: DateTimeNullableWithAggregatesFilter<"LoginOtp"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"LoginOtp"> | Date | string + } + + export type FantasyNewsWhereInput = { + AND?: FantasyNewsWhereInput | FantasyNewsWhereInput[] + OR?: FantasyNewsWhereInput[] + NOT?: FantasyNewsWhereInput | FantasyNewsWhereInput[] + id?: StringFilter<"FantasyNews"> | string + icon?: StringFilter<"FantasyNews"> | string + title?: StringFilter<"FantasyNews"> | string + description?: StringFilter<"FantasyNews"> | string + newsTime?: DateTimeFilter<"FantasyNews"> | Date | string + createdAt?: DateTimeFilter<"FantasyNews"> | Date | string + updatedAt?: DateTimeFilter<"FantasyNews"> | Date | string + } + + export type FantasyNewsOrderByWithRelationInput = { + id?: SortOrder + icon?: SortOrder + title?: SortOrder + description?: SortOrder + newsTime?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type FantasyNewsWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: FantasyNewsWhereInput | FantasyNewsWhereInput[] + OR?: FantasyNewsWhereInput[] + NOT?: FantasyNewsWhereInput | FantasyNewsWhereInput[] + icon?: StringFilter<"FantasyNews"> | string + title?: StringFilter<"FantasyNews"> | string + description?: StringFilter<"FantasyNews"> | string + newsTime?: DateTimeFilter<"FantasyNews"> | Date | string + createdAt?: DateTimeFilter<"FantasyNews"> | Date | string + updatedAt?: DateTimeFilter<"FantasyNews"> | Date | string + }, "id"> + + export type FantasyNewsOrderByWithAggregationInput = { + id?: SortOrder + icon?: SortOrder + title?: SortOrder + description?: SortOrder + newsTime?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: FantasyNewsCountOrderByAggregateInput + _max?: FantasyNewsMaxOrderByAggregateInput + _min?: FantasyNewsMinOrderByAggregateInput + } + + export type FantasyNewsScalarWhereWithAggregatesInput = { + AND?: FantasyNewsScalarWhereWithAggregatesInput | FantasyNewsScalarWhereWithAggregatesInput[] + OR?: FantasyNewsScalarWhereWithAggregatesInput[] + NOT?: FantasyNewsScalarWhereWithAggregatesInput | FantasyNewsScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"FantasyNews"> | string + icon?: StringWithAggregatesFilter<"FantasyNews"> | string + title?: StringWithAggregatesFilter<"FantasyNews"> | string + description?: StringWithAggregatesFilter<"FantasyNews"> | string + newsTime?: DateTimeWithAggregatesFilter<"FantasyNews"> | Date | string + createdAt?: DateTimeWithAggregatesFilter<"FantasyNews"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"FantasyNews"> | Date | string + } + + export type DailyQuizWhereInput = { + AND?: DailyQuizWhereInput | DailyQuizWhereInput[] + OR?: DailyQuizWhereInput[] + NOT?: DailyQuizWhereInput | DailyQuizWhereInput[] + id?: StringFilter<"DailyQuiz"> | string + date?: DateTimeFilter<"DailyQuiz"> | Date | string + windowStart?: DateTimeFilter<"DailyQuiz"> | Date | string + windowEnd?: DateTimeFilter<"DailyQuiz"> | Date | string + goldWinnersCount?: IntFilter<"DailyQuiz"> | number + silverWinnersCount?: IntFilter<"DailyQuiz"> | number + bronzeWinnersCount?: IntFilter<"DailyQuiz"> | number + goldMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + silverMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + bronzeMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + isProcessed?: BoolFilter<"DailyQuiz"> | boolean + createdAt?: DateTimeFilter<"DailyQuiz"> | Date | string + questions?: QuizQuestionListRelationFilter + submissions?: QuizSubmissionListRelationFilter + awardedCards?: GoldenCardListRelationFilter + } + + export type DailyQuizOrderByWithRelationInput = { + id?: SortOrder + date?: SortOrder + windowStart?: SortOrder + windowEnd?: SortOrder + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrderInput | SortOrder + silverMinCorrect?: SortOrderInput | SortOrder + bronzeMinCorrect?: SortOrderInput | SortOrder + isProcessed?: SortOrder + createdAt?: SortOrder + questions?: QuizQuestionOrderByRelationAggregateInput + submissions?: QuizSubmissionOrderByRelationAggregateInput + awardedCards?: GoldenCardOrderByRelationAggregateInput + } + + export type DailyQuizWhereUniqueInput = Prisma.AtLeast<{ + id?: string + date?: Date | string + AND?: DailyQuizWhereInput | DailyQuizWhereInput[] + OR?: DailyQuizWhereInput[] + NOT?: DailyQuizWhereInput | DailyQuizWhereInput[] + windowStart?: DateTimeFilter<"DailyQuiz"> | Date | string + windowEnd?: DateTimeFilter<"DailyQuiz"> | Date | string + goldWinnersCount?: IntFilter<"DailyQuiz"> | number + silverWinnersCount?: IntFilter<"DailyQuiz"> | number + bronzeWinnersCount?: IntFilter<"DailyQuiz"> | number + goldMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + silverMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + bronzeMinCorrect?: IntNullableFilter<"DailyQuiz"> | number | null + isProcessed?: BoolFilter<"DailyQuiz"> | boolean + createdAt?: DateTimeFilter<"DailyQuiz"> | Date | string + questions?: QuizQuestionListRelationFilter + submissions?: QuizSubmissionListRelationFilter + awardedCards?: GoldenCardListRelationFilter + }, "id" | "date"> + + export type DailyQuizOrderByWithAggregationInput = { + id?: SortOrder + date?: SortOrder + windowStart?: SortOrder + windowEnd?: SortOrder + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrderInput | SortOrder + silverMinCorrect?: SortOrderInput | SortOrder + bronzeMinCorrect?: SortOrderInput | SortOrder + isProcessed?: SortOrder + createdAt?: SortOrder + _count?: DailyQuizCountOrderByAggregateInput + _avg?: DailyQuizAvgOrderByAggregateInput + _max?: DailyQuizMaxOrderByAggregateInput + _min?: DailyQuizMinOrderByAggregateInput + _sum?: DailyQuizSumOrderByAggregateInput + } + + export type DailyQuizScalarWhereWithAggregatesInput = { + AND?: DailyQuizScalarWhereWithAggregatesInput | DailyQuizScalarWhereWithAggregatesInput[] + OR?: DailyQuizScalarWhereWithAggregatesInput[] + NOT?: DailyQuizScalarWhereWithAggregatesInput | DailyQuizScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"DailyQuiz"> | string + date?: DateTimeWithAggregatesFilter<"DailyQuiz"> | Date | string + windowStart?: DateTimeWithAggregatesFilter<"DailyQuiz"> | Date | string + windowEnd?: DateTimeWithAggregatesFilter<"DailyQuiz"> | Date | string + goldWinnersCount?: IntWithAggregatesFilter<"DailyQuiz"> | number + silverWinnersCount?: IntWithAggregatesFilter<"DailyQuiz"> | number + bronzeWinnersCount?: IntWithAggregatesFilter<"DailyQuiz"> | number + goldMinCorrect?: IntNullableWithAggregatesFilter<"DailyQuiz"> | number | null + silverMinCorrect?: IntNullableWithAggregatesFilter<"DailyQuiz"> | number | null + bronzeMinCorrect?: IntNullableWithAggregatesFilter<"DailyQuiz"> | number | null + isProcessed?: BoolWithAggregatesFilter<"DailyQuiz"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"DailyQuiz"> | Date | string + } + + export type QuizQuestionWhereInput = { + AND?: QuizQuestionWhereInput | QuizQuestionWhereInput[] + OR?: QuizQuestionWhereInput[] + NOT?: QuizQuestionWhereInput | QuizQuestionWhereInput[] + id?: StringFilter<"QuizQuestion"> | string + quizId?: StringFilter<"QuizQuestion"> | string + questionText?: StringFilter<"QuizQuestion"> | string + options?: StringNullableListFilter<"QuizQuestion"> + correctAnswer?: IntFilter<"QuizQuestion"> | number + order?: IntFilter<"QuizQuestion"> | number + quiz?: XOR + } + + export type QuizQuestionOrderByWithRelationInput = { + id?: SortOrder + quizId?: SortOrder + questionText?: SortOrder + options?: SortOrder + correctAnswer?: SortOrder + order?: SortOrder + quiz?: DailyQuizOrderByWithRelationInput + } + + export type QuizQuestionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: QuizQuestionWhereInput | QuizQuestionWhereInput[] + OR?: QuizQuestionWhereInput[] + NOT?: QuizQuestionWhereInput | QuizQuestionWhereInput[] + quizId?: StringFilter<"QuizQuestion"> | string + questionText?: StringFilter<"QuizQuestion"> | string + options?: StringNullableListFilter<"QuizQuestion"> + correctAnswer?: IntFilter<"QuizQuestion"> | number + order?: IntFilter<"QuizQuestion"> | number + quiz?: XOR + }, "id"> + + export type QuizQuestionOrderByWithAggregationInput = { + id?: SortOrder + quizId?: SortOrder + questionText?: SortOrder + options?: SortOrder + correctAnswer?: SortOrder + order?: SortOrder + _count?: QuizQuestionCountOrderByAggregateInput + _avg?: QuizQuestionAvgOrderByAggregateInput + _max?: QuizQuestionMaxOrderByAggregateInput + _min?: QuizQuestionMinOrderByAggregateInput + _sum?: QuizQuestionSumOrderByAggregateInput + } + + export type QuizQuestionScalarWhereWithAggregatesInput = { + AND?: QuizQuestionScalarWhereWithAggregatesInput | QuizQuestionScalarWhereWithAggregatesInput[] + OR?: QuizQuestionScalarWhereWithAggregatesInput[] + NOT?: QuizQuestionScalarWhereWithAggregatesInput | QuizQuestionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"QuizQuestion"> | string + quizId?: StringWithAggregatesFilter<"QuizQuestion"> | string + questionText?: StringWithAggregatesFilter<"QuizQuestion"> | string + options?: StringNullableListFilter<"QuizQuestion"> + correctAnswer?: IntWithAggregatesFilter<"QuizQuestion"> | number + order?: IntWithAggregatesFilter<"QuizQuestion"> | number + } + + export type QuizSubmissionWhereInput = { + AND?: QuizSubmissionWhereInput | QuizSubmissionWhereInput[] + OR?: QuizSubmissionWhereInput[] + NOT?: QuizSubmissionWhereInput | QuizSubmissionWhereInput[] + id?: StringFilter<"QuizSubmission"> | string + userId?: StringFilter<"QuizSubmission"> | string + quizId?: StringFilter<"QuizSubmission"> | string + answers?: IntNullableListFilter<"QuizSubmission"> + correctAnswers?: IntFilter<"QuizSubmission"> | number + score?: IntFilter<"QuizSubmission"> | number + submittedAt?: DateTimeFilter<"QuizSubmission"> | Date | string + user?: XOR + quiz?: XOR + } + + export type QuizSubmissionOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + answers?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + submittedAt?: SortOrder + user?: UserOrderByWithRelationInput + quiz?: DailyQuizOrderByWithRelationInput + } + + export type QuizSubmissionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId_quizId?: QuizSubmissionUserIdQuizIdCompoundUniqueInput + AND?: QuizSubmissionWhereInput | QuizSubmissionWhereInput[] + OR?: QuizSubmissionWhereInput[] + NOT?: QuizSubmissionWhereInput | QuizSubmissionWhereInput[] + userId?: StringFilter<"QuizSubmission"> | string + quizId?: StringFilter<"QuizSubmission"> | string + answers?: IntNullableListFilter<"QuizSubmission"> + correctAnswers?: IntFilter<"QuizSubmission"> | number + score?: IntFilter<"QuizSubmission"> | number + submittedAt?: DateTimeFilter<"QuizSubmission"> | Date | string + user?: XOR + quiz?: XOR + }, "id" | "userId_quizId"> + + export type QuizSubmissionOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + answers?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + submittedAt?: SortOrder + _count?: QuizSubmissionCountOrderByAggregateInput + _avg?: QuizSubmissionAvgOrderByAggregateInput + _max?: QuizSubmissionMaxOrderByAggregateInput + _min?: QuizSubmissionMinOrderByAggregateInput + _sum?: QuizSubmissionSumOrderByAggregateInput + } + + export type QuizSubmissionScalarWhereWithAggregatesInput = { + AND?: QuizSubmissionScalarWhereWithAggregatesInput | QuizSubmissionScalarWhereWithAggregatesInput[] + OR?: QuizSubmissionScalarWhereWithAggregatesInput[] + NOT?: QuizSubmissionScalarWhereWithAggregatesInput | QuizSubmissionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"QuizSubmission"> | string + userId?: StringWithAggregatesFilter<"QuizSubmission"> | string + quizId?: StringWithAggregatesFilter<"QuizSubmission"> | string + answers?: IntNullableListFilter<"QuizSubmission"> + correctAnswers?: IntWithAggregatesFilter<"QuizSubmission"> | number + score?: IntWithAggregatesFilter<"QuizSubmission"> | number + submittedAt?: DateTimeWithAggregatesFilter<"QuizSubmission"> | Date | string + } + + export type GoldenCardWhereInput = { + AND?: GoldenCardWhereInput | GoldenCardWhereInput[] + OR?: GoldenCardWhereInput[] + NOT?: GoldenCardWhereInput | GoldenCardWhereInput[] + id?: StringFilter<"GoldenCard"> | string + userId?: StringFilter<"GoldenCard"> | string + quizId?: StringNullableFilter<"GoldenCard"> | string | null + playerId?: StringFilter<"GoldenCard"> | string + cardTier?: EnumCardTierFilter<"GoldenCard"> | $Enums.CardTier + status?: EnumGoldenCardStatusFilter<"GoldenCard"> | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFilter<"GoldenCard"> | $Enums.SpecialCardState + acquiredDate?: DateTimeFilter<"GoldenCard"> | Date | string + openedAt?: DateTimeNullableFilter<"GoldenCard"> | Date | string | null + user?: XOR + quiz?: XOR | null + player?: XOR + teamPlayer?: XOR | null + } + + export type GoldenCardOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrderInput | SortOrder + playerId?: SortOrder + cardTier?: SortOrder + status?: SortOrder + state?: SortOrder + acquiredDate?: SortOrder + openedAt?: SortOrderInput | SortOrder + user?: UserOrderByWithRelationInput + quiz?: DailyQuizOrderByWithRelationInput + player?: PlayerOrderByWithRelationInput + teamPlayer?: TeamPlayerOrderByWithRelationInput + } + + export type GoldenCardWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: GoldenCardWhereInput | GoldenCardWhereInput[] + OR?: GoldenCardWhereInput[] + NOT?: GoldenCardWhereInput | GoldenCardWhereInput[] + userId?: StringFilter<"GoldenCard"> | string + quizId?: StringNullableFilter<"GoldenCard"> | string | null + playerId?: StringFilter<"GoldenCard"> | string + cardTier?: EnumCardTierFilter<"GoldenCard"> | $Enums.CardTier + status?: EnumGoldenCardStatusFilter<"GoldenCard"> | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFilter<"GoldenCard"> | $Enums.SpecialCardState + acquiredDate?: DateTimeFilter<"GoldenCard"> | Date | string + openedAt?: DateTimeNullableFilter<"GoldenCard"> | Date | string | null + user?: XOR + quiz?: XOR | null + player?: XOR + teamPlayer?: XOR | null + }, "id"> + + export type GoldenCardOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrderInput | SortOrder + playerId?: SortOrder + cardTier?: SortOrder + status?: SortOrder + state?: SortOrder + acquiredDate?: SortOrder + openedAt?: SortOrderInput | SortOrder + _count?: GoldenCardCountOrderByAggregateInput + _max?: GoldenCardMaxOrderByAggregateInput + _min?: GoldenCardMinOrderByAggregateInput + } + + export type GoldenCardScalarWhereWithAggregatesInput = { + AND?: GoldenCardScalarWhereWithAggregatesInput | GoldenCardScalarWhereWithAggregatesInput[] + OR?: GoldenCardScalarWhereWithAggregatesInput[] + NOT?: GoldenCardScalarWhereWithAggregatesInput | GoldenCardScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"GoldenCard"> | string + userId?: StringWithAggregatesFilter<"GoldenCard"> | string + quizId?: StringNullableWithAggregatesFilter<"GoldenCard"> | string | null + playerId?: StringWithAggregatesFilter<"GoldenCard"> | string + cardTier?: EnumCardTierWithAggregatesFilter<"GoldenCard"> | $Enums.CardTier + status?: EnumGoldenCardStatusWithAggregatesFilter<"GoldenCard"> | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateWithAggregatesFilter<"GoldenCard"> | $Enums.SpecialCardState + acquiredDate?: DateTimeWithAggregatesFilter<"GoldenCard"> | Date | string + openedAt?: DateTimeNullableWithAggregatesFilter<"GoldenCard"> | Date | string | null + } + + export type SessionWhereInput = { + AND?: SessionWhereInput | SessionWhereInput[] + OR?: SessionWhereInput[] + NOT?: SessionWhereInput | SessionWhereInput[] + id?: StringFilter<"Session"> | string + sessionToken?: StringFilter<"Session"> | string + userId?: StringFilter<"Session"> | string + expires?: DateTimeFilter<"Session"> | Date | string + user?: XOR + } + + export type SessionOrderByWithRelationInput = { + id?: SortOrder + sessionToken?: SortOrder + userId?: SortOrder + expires?: SortOrder + user?: UserOrderByWithRelationInput + } + + export type SessionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + sessionToken?: string + AND?: SessionWhereInput | SessionWhereInput[] + OR?: SessionWhereInput[] + NOT?: SessionWhereInput | SessionWhereInput[] + userId?: StringFilter<"Session"> | string + expires?: DateTimeFilter<"Session"> | Date | string + user?: XOR + }, "id" | "sessionToken"> + + export type SessionOrderByWithAggregationInput = { + id?: SortOrder + sessionToken?: SortOrder + userId?: SortOrder + expires?: SortOrder + _count?: SessionCountOrderByAggregateInput + _max?: SessionMaxOrderByAggregateInput + _min?: SessionMinOrderByAggregateInput + } + + export type SessionScalarWhereWithAggregatesInput = { + AND?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] + OR?: SessionScalarWhereWithAggregatesInput[] + NOT?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Session"> | string + sessionToken?: StringWithAggregatesFilter<"Session"> | string + userId?: StringWithAggregatesFilter<"Session"> | string + expires?: DateTimeWithAggregatesFilter<"Session"> | Date | string + } + + export type TeamWhereInput = { + AND?: TeamWhereInput | TeamWhereInput[] + OR?: TeamWhereInput[] + NOT?: TeamWhereInput | TeamWhereInput[] + id?: StringFilter<"Team"> | string + name?: StringFilter<"Team"> | string + userId?: StringFilter<"Team"> | string + budget?: FloatFilter<"Team"> | number + totalPoints?: IntFilter<"Team"> | number + formation?: StringFilter<"Team"> | string + status?: EnumTeamStatusFilter<"Team"> | $Enums.TeamStatus + createdAt?: DateTimeFilter<"Team"> | Date | string + user?: XOR + players?: TeamPlayerListRelationFilter + } + + export type TeamOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + userId?: SortOrder + budget?: SortOrder + totalPoints?: SortOrder + formation?: SortOrder + status?: SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + players?: TeamPlayerOrderByRelationAggregateInput + } + + export type TeamWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId?: string + AND?: TeamWhereInput | TeamWhereInput[] + OR?: TeamWhereInput[] + NOT?: TeamWhereInput | TeamWhereInput[] + name?: StringFilter<"Team"> | string + budget?: FloatFilter<"Team"> | number + totalPoints?: IntFilter<"Team"> | number + formation?: StringFilter<"Team"> | string + status?: EnumTeamStatusFilter<"Team"> | $Enums.TeamStatus + createdAt?: DateTimeFilter<"Team"> | Date | string + user?: XOR + players?: TeamPlayerListRelationFilter + }, "id" | "userId"> + + export type TeamOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + userId?: SortOrder + budget?: SortOrder + totalPoints?: SortOrder + formation?: SortOrder + status?: SortOrder + createdAt?: SortOrder + _count?: TeamCountOrderByAggregateInput + _avg?: TeamAvgOrderByAggregateInput + _max?: TeamMaxOrderByAggregateInput + _min?: TeamMinOrderByAggregateInput + _sum?: TeamSumOrderByAggregateInput + } + + export type TeamScalarWhereWithAggregatesInput = { + AND?: TeamScalarWhereWithAggregatesInput | TeamScalarWhereWithAggregatesInput[] + OR?: TeamScalarWhereWithAggregatesInput[] + NOT?: TeamScalarWhereWithAggregatesInput | TeamScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Team"> | string + name?: StringWithAggregatesFilter<"Team"> | string + userId?: StringWithAggregatesFilter<"Team"> | string + budget?: FloatWithAggregatesFilter<"Team"> | number + totalPoints?: IntWithAggregatesFilter<"Team"> | number + formation?: StringWithAggregatesFilter<"Team"> | string + status?: EnumTeamStatusWithAggregatesFilter<"Team"> | $Enums.TeamStatus + createdAt?: DateTimeWithAggregatesFilter<"Team"> | Date | string + } + + export type TeamPlayerWhereInput = { + AND?: TeamPlayerWhereInput | TeamPlayerWhereInput[] + OR?: TeamPlayerWhereInput[] + NOT?: TeamPlayerWhereInput | TeamPlayerWhereInput[] + teamId?: StringFilter<"TeamPlayer"> | string + playerId?: StringFilter<"TeamPlayer"> | string + goldenCardId?: StringNullableFilter<"TeamPlayer"> | string | null + isCaptain?: BoolFilter<"TeamPlayer"> | boolean + isViceCaptain?: BoolFilter<"TeamPlayer"> | boolean + isBench?: BoolFilter<"TeamPlayer"> | boolean + positionIndex?: IntFilter<"TeamPlayer"> | number + team?: XOR + player?: XOR + goldenCard?: XOR | null + } + + export type TeamPlayerOrderByWithRelationInput = { + teamId?: SortOrder + playerId?: SortOrder + goldenCardId?: SortOrderInput | SortOrder + isCaptain?: SortOrder + isViceCaptain?: SortOrder + isBench?: SortOrder + positionIndex?: SortOrder + team?: TeamOrderByWithRelationInput + player?: PlayerOrderByWithRelationInput + goldenCard?: GoldenCardOrderByWithRelationInput + } + + export type TeamPlayerWhereUniqueInput = Prisma.AtLeast<{ + goldenCardId?: string + teamId_playerId?: TeamPlayerTeamIdPlayerIdCompoundUniqueInput + AND?: TeamPlayerWhereInput | TeamPlayerWhereInput[] + OR?: TeamPlayerWhereInput[] + NOT?: TeamPlayerWhereInput | TeamPlayerWhereInput[] + teamId?: StringFilter<"TeamPlayer"> | string + playerId?: StringFilter<"TeamPlayer"> | string + isCaptain?: BoolFilter<"TeamPlayer"> | boolean + isViceCaptain?: BoolFilter<"TeamPlayer"> | boolean + isBench?: BoolFilter<"TeamPlayer"> | boolean + positionIndex?: IntFilter<"TeamPlayer"> | number + team?: XOR + player?: XOR + goldenCard?: XOR | null + }, "teamId_playerId" | "goldenCardId"> + + export type TeamPlayerOrderByWithAggregationInput = { + teamId?: SortOrder + playerId?: SortOrder + goldenCardId?: SortOrderInput | SortOrder + isCaptain?: SortOrder + isViceCaptain?: SortOrder + isBench?: SortOrder + positionIndex?: SortOrder + _count?: TeamPlayerCountOrderByAggregateInput + _avg?: TeamPlayerAvgOrderByAggregateInput + _max?: TeamPlayerMaxOrderByAggregateInput + _min?: TeamPlayerMinOrderByAggregateInput + _sum?: TeamPlayerSumOrderByAggregateInput + } + + export type TeamPlayerScalarWhereWithAggregatesInput = { + AND?: TeamPlayerScalarWhereWithAggregatesInput | TeamPlayerScalarWhereWithAggregatesInput[] + OR?: TeamPlayerScalarWhereWithAggregatesInput[] + NOT?: TeamPlayerScalarWhereWithAggregatesInput | TeamPlayerScalarWhereWithAggregatesInput[] + teamId?: StringWithAggregatesFilter<"TeamPlayer"> | string + playerId?: StringWithAggregatesFilter<"TeamPlayer"> | string + goldenCardId?: StringNullableWithAggregatesFilter<"TeamPlayer"> | string | null + isCaptain?: BoolWithAggregatesFilter<"TeamPlayer"> | boolean + isViceCaptain?: BoolWithAggregatesFilter<"TeamPlayer"> | boolean + isBench?: BoolWithAggregatesFilter<"TeamPlayer"> | boolean + positionIndex?: IntWithAggregatesFilter<"TeamPlayer"> | number + } + + export type PackageWhereInput = { + AND?: PackageWhereInput | PackageWhereInput[] + OR?: PackageWhereInput[] + NOT?: PackageWhereInput | PackageWhereInput[] + id?: StringFilter<"Package"> | string + name?: StringFilter<"Package"> | string + budgetBonus?: FloatFilter<"Package"> | number + price?: IntFilter<"Package"> | number + description?: StringNullableFilter<"Package"> | string | null + isActive?: BoolFilter<"Package"> | boolean + payments?: PaymentListRelationFilter + } + + export type PackageOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + budgetBonus?: SortOrder + price?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + payments?: PaymentOrderByRelationAggregateInput + } + + export type PackageWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: PackageWhereInput | PackageWhereInput[] + OR?: PackageWhereInput[] + NOT?: PackageWhereInput | PackageWhereInput[] + name?: StringFilter<"Package"> | string + budgetBonus?: FloatFilter<"Package"> | number + price?: IntFilter<"Package"> | number + description?: StringNullableFilter<"Package"> | string | null + isActive?: BoolFilter<"Package"> | boolean + payments?: PaymentListRelationFilter + }, "id"> + + export type PackageOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + budgetBonus?: SortOrder + price?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + _count?: PackageCountOrderByAggregateInput + _avg?: PackageAvgOrderByAggregateInput + _max?: PackageMaxOrderByAggregateInput + _min?: PackageMinOrderByAggregateInput + _sum?: PackageSumOrderByAggregateInput + } + + export type PackageScalarWhereWithAggregatesInput = { + AND?: PackageScalarWhereWithAggregatesInput | PackageScalarWhereWithAggregatesInput[] + OR?: PackageScalarWhereWithAggregatesInput[] + NOT?: PackageScalarWhereWithAggregatesInput | PackageScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Package"> | string + name?: StringWithAggregatesFilter<"Package"> | string + budgetBonus?: FloatWithAggregatesFilter<"Package"> | number + price?: IntWithAggregatesFilter<"Package"> | number + description?: StringNullableWithAggregatesFilter<"Package"> | string | null + isActive?: BoolWithAggregatesFilter<"Package"> | boolean + } + + export type PaymentWhereInput = { + AND?: PaymentWhereInput | PaymentWhereInput[] + OR?: PaymentWhereInput[] + NOT?: PaymentWhereInput | PaymentWhereInput[] + id?: StringFilter<"Payment"> | string + userId?: StringFilter<"Payment"> | string + packageId?: StringFilter<"Payment"> | string + amount?: IntFilter<"Payment"> | number + authority?: StringNullableFilter<"Payment"> | string | null + refId?: StringNullableFilter<"Payment"> | string | null + status?: EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus + createdAt?: DateTimeFilter<"Payment"> | Date | string + updatedAt?: DateTimeFilter<"Payment"> | Date | string + user?: XOR + package?: XOR + } + + export type PaymentOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + packageId?: SortOrder + amount?: SortOrder + authority?: SortOrderInput | SortOrder + refId?: SortOrderInput | SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + user?: UserOrderByWithRelationInput + package?: PackageOrderByWithRelationInput + } + + export type PaymentWhereUniqueInput = Prisma.AtLeast<{ + id?: string + authority?: string + AND?: PaymentWhereInput | PaymentWhereInput[] + OR?: PaymentWhereInput[] + NOT?: PaymentWhereInput | PaymentWhereInput[] + userId?: StringFilter<"Payment"> | string + packageId?: StringFilter<"Payment"> | string + amount?: IntFilter<"Payment"> | number + refId?: StringNullableFilter<"Payment"> | string | null + status?: EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus + createdAt?: DateTimeFilter<"Payment"> | Date | string + updatedAt?: DateTimeFilter<"Payment"> | Date | string + user?: XOR + package?: XOR + }, "id" | "authority"> + + export type PaymentOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + packageId?: SortOrder + amount?: SortOrder + authority?: SortOrderInput | SortOrder + refId?: SortOrderInput | SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: PaymentCountOrderByAggregateInput + _avg?: PaymentAvgOrderByAggregateInput + _max?: PaymentMaxOrderByAggregateInput + _min?: PaymentMinOrderByAggregateInput + _sum?: PaymentSumOrderByAggregateInput + } + + export type PaymentScalarWhereWithAggregatesInput = { + AND?: PaymentScalarWhereWithAggregatesInput | PaymentScalarWhereWithAggregatesInput[] + OR?: PaymentScalarWhereWithAggregatesInput[] + NOT?: PaymentScalarWhereWithAggregatesInput | PaymentScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Payment"> | string + userId?: StringWithAggregatesFilter<"Payment"> | string + packageId?: StringWithAggregatesFilter<"Payment"> | string + amount?: IntWithAggregatesFilter<"Payment"> | number + authority?: StringNullableWithAggregatesFilter<"Payment"> | string | null + refId?: StringNullableWithAggregatesFilter<"Payment"> | string | null + status?: EnumPaymentStatusWithAggregatesFilter<"Payment"> | $Enums.PaymentStatus + createdAt?: DateTimeWithAggregatesFilter<"Payment"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Payment"> | Date | string + } + + export type CountryCreateInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + group?: GroupCreateNestedOneWithoutCountriesInput + players?: PlayerCreateNestedManyWithoutCountryInput + homeMatches?: MatchCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchCreateNestedManyWithoutAwayTeamInput + } + + export type CountryUncheckedCreateInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + groupId?: string | null + isEliminated?: boolean + players?: PlayerUncheckedCreateNestedManyWithoutCountryInput + homeMatches?: MatchUncheckedCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchUncheckedCreateNestedManyWithoutAwayTeamInput + } + + export type CountryUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + group?: GroupUpdateOneWithoutCountriesNestedInput + players?: PlayerUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + groupId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + players?: PlayerUncheckedUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUncheckedUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUncheckedUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryCreateManyInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + groupId?: string | null + isEliminated?: boolean + } + + export type CountryUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + } + + export type CountryUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + groupId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + } + + export type GroupCreateInput = { + id?: string + name: string + countries?: CountryCreateNestedManyWithoutGroupInput + } + + export type GroupUncheckedCreateInput = { + id?: string + name: string + countries?: CountryUncheckedCreateNestedManyWithoutGroupInput + } + + export type GroupUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + countries?: CountryUpdateManyWithoutGroupNestedInput + } + + export type GroupUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + countries?: CountryUncheckedUpdateManyWithoutGroupNestedInput + } + + export type GroupCreateManyInput = { + id?: string + name: string + } + + export type GroupUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type GroupUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type PlayerCreateInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + country: CountryCreateNestedOneWithoutPlayersInput + matchStats?: PlayerMatchStatCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerCreateNestedManyWithoutPlayerInput + events?: MatchEventCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput + events?: MatchEventUncheckedCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + country?: CountryUpdateOneRequiredWithoutPlayersNestedInput + matchStats?: PlayerMatchStatUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUpdateManyWithoutPlayerNestedInput + events?: MatchEventUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput + events?: MatchEventUncheckedUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type PlayerCreateManyInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PlayerUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PlayerUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchCreateInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + events?: MatchEventCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type MatchCreateManyInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + } + + export type MatchUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type RoundCreateInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + matches?: MatchCreateNestedManyWithoutRoundInput + } + + export type RoundUncheckedCreateInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + matches?: MatchUncheckedCreateNestedManyWithoutRoundInput + } + + export type RoundUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + matches?: MatchUpdateManyWithoutRoundNestedInput + } + + export type RoundUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + matches?: MatchUncheckedUpdateManyWithoutRoundNestedInput + } + + export type RoundCreateManyInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type RoundUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type RoundUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GameweekCreateInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type GameweekUncheckedCreateInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type GameweekUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GameweekUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GameweekCreateManyInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type GameweekUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GameweekUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchEventCreateInput = { + id?: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + match: MatchCreateNestedOneWithoutEventsInput + player: PlayerCreateNestedOneWithoutEventsInput + } + + export type MatchEventUncheckedCreateInput = { + id?: string + matchId: string + playerId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type MatchEventUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + match?: MatchUpdateOneRequiredWithoutEventsNestedInput + player?: PlayerUpdateOneRequiredWithoutEventsNestedInput + } + + export type MatchEventUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchEventCreateManyInput = { + id?: string + matchId: string + playerId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type MatchEventUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchEventUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchLineupCreateInput = { + id?: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + match: MatchCreateNestedOneWithoutLineupsInput + } + + export type MatchLineupUncheckedCreateInput = { + id?: string + matchId: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + } + + export type MatchLineupUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + match?: MatchUpdateOneRequiredWithoutLineupsNestedInput + } + + export type MatchLineupUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type MatchLineupCreateManyInput = { + id?: string + matchId: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + } + + export type MatchLineupUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type MatchLineupUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type PlayerMatchStatCreateInput = { + id?: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + player: PlayerCreateNestedOneWithoutMatchStatsInput + match: MatchCreateNestedOneWithoutPlayerStatsInput + } + + export type PlayerMatchStatUncheckedCreateInput = { + id?: string + playerId: string + matchId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type PlayerMatchStatUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + player?: PlayerUpdateOneRequiredWithoutMatchStatsNestedInput + match?: MatchUpdateOneRequiredWithoutPlayerStatsNestedInput + } + + export type PlayerMatchStatUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type PlayerMatchStatCreateManyInput = { + id?: string + playerId: string + matchId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type PlayerMatchStatUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type PlayerMatchStatUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type ScoringRuleCreateInput = { + id?: string + position: $Enums.Position + eventType: $Enums.EventType + points: number + updatedAt?: Date | string + updatedBy?: string | null + } + + export type ScoringRuleUncheckedCreateInput = { + id?: string + position: $Enums.Position + eventType: $Enums.EventType + points: number + updatedAt?: Date | string + updatedBy?: string | null + } + + export type ScoringRuleUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + eventType?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + points?: IntFieldUpdateOperationsInput | number + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type ScoringRuleUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + eventType?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + points?: IntFieldUpdateOperationsInput | number + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type ScoringRuleCreateManyInput = { + id?: string + position: $Enums.Position + eventType: $Enums.EventType + points: number + updatedAt?: Date | string + updatedBy?: string | null + } + + export type ScoringRuleUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + eventType?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + points?: IntFieldUpdateOperationsInput | number + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type ScoringRuleUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + eventType?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + points?: IntFieldUpdateOperationsInput | number + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedBy?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type UserCreateInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamCreateNestedOneWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + payments?: PaymentCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamUncheckedCreateNestedOneWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + payments?: PaymentUncheckedCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionUncheckedCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutUserInput + } + + export type UserUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUpdateOneWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + payments?: PaymentUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUncheckedUpdateOneWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + payments?: PaymentUncheckedUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutUserNestedInput + } + + export type UserCreateManyInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + } + + export type UserUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LoginOtpCreateInput = { + id?: string + phone: string + codeHash: string + attempts?: number + expiresAt: Date | string + consumedAt?: Date | string | null + createdAt?: Date | string + } + + export type LoginOtpUncheckedCreateInput = { + id?: string + phone: string + codeHash: string + attempts?: number + expiresAt: Date | string + consumedAt?: Date | string | null + createdAt?: Date | string + } + + export type LoginOtpUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + phone?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LoginOtpUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + phone?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LoginOtpCreateManyInput = { + id?: string + phone: string + codeHash: string + attempts?: number + expiresAt: Date | string + consumedAt?: Date | string | null + createdAt?: Date | string + } + + export type LoginOtpUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + phone?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LoginOtpUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + phone?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type FantasyNewsCreateInput = { + id?: string + icon: string + title: string + description: string + newsTime: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type FantasyNewsUncheckedCreateInput = { + id?: string + icon: string + title: string + description: string + newsTime: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type FantasyNewsUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + icon?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: StringFieldUpdateOperationsInput | string + newsTime?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type FantasyNewsUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + icon?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: StringFieldUpdateOperationsInput | string + newsTime?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type FantasyNewsCreateManyInput = { + id?: string + icon: string + title: string + description: string + newsTime: Date | string + createdAt?: Date | string + updatedAt?: Date | string + } + + export type FantasyNewsUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + icon?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: StringFieldUpdateOperationsInput | string + newsTime?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type FantasyNewsUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + icon?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: StringFieldUpdateOperationsInput | string + newsTime?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type DailyQuizCreateInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionCreateNestedManyWithoutQuizInput + submissions?: QuizSubmissionCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardCreateNestedManyWithoutQuizInput + } + + export type DailyQuizUncheckedCreateInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionUncheckedCreateNestedManyWithoutQuizInput + submissions?: QuizSubmissionUncheckedCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardUncheckedCreateNestedManyWithoutQuizInput + } + + export type DailyQuizUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUpdateManyWithoutQuizNestedInput + submissions?: QuizSubmissionUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUpdateManyWithoutQuizNestedInput + } + + export type DailyQuizUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUncheckedUpdateManyWithoutQuizNestedInput + submissions?: QuizSubmissionUncheckedUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUncheckedUpdateManyWithoutQuizNestedInput + } + + export type DailyQuizCreateManyInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + } + + export type DailyQuizUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type DailyQuizUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizQuestionCreateInput = { + id?: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + quiz: DailyQuizCreateNestedOneWithoutQuestionsInput + } + + export type QuizQuestionUncheckedCreateInput = { + id?: string + quizId: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + } + + export type QuizQuestionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + quiz?: DailyQuizUpdateOneRequiredWithoutQuestionsNestedInput + } + + export type QuizQuestionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizQuestionCreateManyInput = { + id?: string + quizId: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + } + + export type QuizQuestionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizQuestionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizSubmissionCreateInput = { + id?: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + user: UserCreateNestedOneWithoutQuizSubmissionsInput + quiz: DailyQuizCreateNestedOneWithoutSubmissionsInput + } + + export type QuizSubmissionUncheckedCreateInput = { + id?: string + userId: string + quizId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type QuizSubmissionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutQuizSubmissionsNestedInput + quiz?: DailyQuizUpdateOneRequiredWithoutSubmissionsNestedInput + } + + export type QuizSubmissionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizSubmissionCreateManyInput = { + id?: string + userId: string + quizId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type QuizSubmissionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizSubmissionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldenCardCreateInput = { + id?: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + user: UserCreateNestedOneWithoutGoldenCardsInput + quiz?: DailyQuizCreateNestedOneWithoutAwardedCardsInput + player: PlayerCreateNestedOneWithoutGoldenCardsInput + teamPlayer?: TeamPlayerCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardUncheckedCreateInput = { + id?: string + userId: string + quizId?: string | null + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + teamPlayer?: TeamPlayerUncheckedCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutGoldenCardsNestedInput + quiz?: DailyQuizUpdateOneWithoutAwardedCardsNestedInput + player?: PlayerUpdateOneRequiredWithoutGoldenCardsNestedInput + teamPlayer?: TeamPlayerUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + teamPlayer?: TeamPlayerUncheckedUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardCreateManyInput = { + id?: string + userId: string + quizId?: string | null + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + } + + export type GoldenCardUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type GoldenCardUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type SessionCreateInput = { + id?: string + sessionToken: string + expires: Date | string + user: UserCreateNestedOneWithoutSessionsInput + } + + export type SessionUncheckedCreateInput = { + id?: string + sessionToken: string + userId: string + expires: Date | string + } + + export type SessionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSessionsNestedInput + } + + export type SessionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionCreateManyInput = { + id?: string + sessionToken: string + userId: string + expires: Date | string + } + + export type SessionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type TeamCreateInput = { + id?: string + name: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + user: UserCreateNestedOneWithoutTeamInput + players?: TeamPlayerCreateNestedManyWithoutTeamInput + } + + export type TeamUncheckedCreateInput = { + id?: string + name: string + userId: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + players?: TeamPlayerUncheckedCreateNestedManyWithoutTeamInput + } + + export type TeamUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutTeamNestedInput + players?: TeamPlayerUpdateManyWithoutTeamNestedInput + } + + export type TeamUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + players?: TeamPlayerUncheckedUpdateManyWithoutTeamNestedInput + } + + export type TeamCreateManyInput = { + id?: string + name: string + userId: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + } + + export type TeamUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type TeamUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type TeamPlayerCreateInput = { + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + team: TeamCreateNestedOneWithoutPlayersInput + player: PlayerCreateNestedOneWithoutTeamPlayersInput + goldenCard?: GoldenCardCreateNestedOneWithoutTeamPlayerInput + } + + export type TeamPlayerUncheckedCreateInput = { + teamId: string + playerId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerUpdateInput = { + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + team?: TeamUpdateOneRequiredWithoutPlayersNestedInput + player?: PlayerUpdateOneRequiredWithoutTeamPlayersNestedInput + goldenCard?: GoldenCardUpdateOneWithoutTeamPlayerNestedInput + } + + export type TeamPlayerUncheckedUpdateInput = { + teamId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type TeamPlayerCreateManyInput = { + teamId: string + playerId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerUpdateManyMutationInput = { + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type TeamPlayerUncheckedUpdateManyInput = { + teamId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type PackageCreateInput = { + id?: string + name: string + budgetBonus: number + price: number + description?: string | null + isActive?: boolean + payments?: PaymentCreateNestedManyWithoutPackageInput + } + + export type PackageUncheckedCreateInput = { + id?: string + name: string + budgetBonus: number + price: number + description?: string | null + isActive?: boolean + payments?: PaymentUncheckedCreateNestedManyWithoutPackageInput + } + + export type PackageUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + payments?: PaymentUpdateManyWithoutPackageNestedInput + } + + export type PackageUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + payments?: PaymentUncheckedUpdateManyWithoutPackageNestedInput + } + + export type PackageCreateManyInput = { + id?: string + name: string + budgetBonus: number + price: number + description?: string | null + isActive?: boolean + } + + export type PackageUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type PackageUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type PaymentCreateInput = { + id?: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutPaymentsInput + package: PackageCreateNestedOneWithoutPaymentsInput + } + + export type PaymentUncheckedCreateInput = { + id?: string + userId: string + packageId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PaymentUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutPaymentsNestedInput + package?: PackageUpdateOneRequiredWithoutPaymentsNestedInput + } + + export type PaymentUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + packageId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PaymentCreateManyInput = { + id?: string + userId: string + packageId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PaymentUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PaymentUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + packageId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringFilter<$PrismaModel> | string + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type StringNullableListFilter<$PrismaModel = never> = { + equals?: string[] | ListStringFieldRefInput<$PrismaModel> | null + has?: string | StringFieldRefInput<$PrismaModel> | null + hasEvery?: string[] | ListStringFieldRefInput<$PrismaModel> + hasSome?: string[] | ListStringFieldRefInput<$PrismaModel> + isEmpty?: boolean + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type GroupNullableScalarRelationFilter = { + is?: GroupWhereInput | null + isNot?: GroupWhereInput | null + } + + export type PlayerListRelationFilter = { + every?: PlayerWhereInput + some?: PlayerWhereInput + none?: PlayerWhereInput + } + + export type MatchListRelationFilter = { + every?: MatchWhereInput + some?: MatchWhereInput + none?: MatchWhereInput + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type PlayerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MatchOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CountryCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + code?: SortOrder + flagUrl?: SortOrder + flagImage?: SortOrder + confederation?: SortOrder + qualificationMethod?: SortOrder + qualificationDate?: SortOrder + participationHistory?: SortOrder + bestResult?: SortOrder + description?: SortOrder + defaultFormation?: SortOrder + defaultLineupPlayerIds?: SortOrder + defaultCaptainId?: SortOrder + groupId?: SortOrder + isEliminated?: SortOrder + } + + export type CountryMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + code?: SortOrder + flagUrl?: SortOrder + flagImage?: SortOrder + confederation?: SortOrder + qualificationMethod?: SortOrder + qualificationDate?: SortOrder + participationHistory?: SortOrder + bestResult?: SortOrder + description?: SortOrder + defaultFormation?: SortOrder + defaultCaptainId?: SortOrder + groupId?: SortOrder + isEliminated?: SortOrder + } + + export type CountryMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + code?: SortOrder + flagUrl?: SortOrder + flagImage?: SortOrder + confederation?: SortOrder + qualificationMethod?: SortOrder + qualificationDate?: SortOrder + participationHistory?: SortOrder + bestResult?: SortOrder + description?: SortOrder + defaultFormation?: SortOrder + defaultCaptainId?: SortOrder + groupId?: SortOrder + isEliminated?: SortOrder + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type CountryListRelationFilter = { + every?: CountryWhereInput + some?: CountryWhereInput + none?: CountryWhereInput + } + + export type CountryOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type GroupCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + } + + export type GroupMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + } + + export type GroupMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + } + + export type EnumPositionFilter<$PrismaModel = never> = { + equals?: $Enums.Position | EnumPositionFieldRefInput<$PrismaModel> + in?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + notIn?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + not?: NestedEnumPositionFilter<$PrismaModel> | $Enums.Position + } + + export type FloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type EnumCardTierFilter<$PrismaModel = never> = { + equals?: $Enums.CardTier | EnumCardTierFieldRefInput<$PrismaModel> + in?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + notIn?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + not?: NestedEnumCardTierFilter<$PrismaModel> | $Enums.CardTier + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type CountryScalarRelationFilter = { + is?: CountryWhereInput + isNot?: CountryWhereInput + } + + export type PlayerMatchStatListRelationFilter = { + every?: PlayerMatchStatWhereInput + some?: PlayerMatchStatWhereInput + none?: PlayerMatchStatWhereInput + } + + export type TeamPlayerListRelationFilter = { + every?: TeamPlayerWhereInput + some?: TeamPlayerWhereInput + none?: TeamPlayerWhereInput + } + + export type MatchEventListRelationFilter = { + every?: MatchEventWhereInput + some?: MatchEventWhereInput + none?: MatchEventWhereInput + } + + export type GoldenCardListRelationFilter = { + every?: GoldenCardWhereInput + some?: GoldenCardWhereInput + none?: GoldenCardWhereInput + } + + export type PlayerMatchStatOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type TeamPlayerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MatchEventOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type GoldenCardOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type PlayerCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + image?: SortOrder + position?: SortOrder + countryId?: SortOrder + price?: SortOrder + totalPoints?: SortOrder + isActive?: SortOrder + isGoldenCardEligible?: SortOrder + cardTier?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PlayerAvgOrderByAggregateInput = { + price?: SortOrder + totalPoints?: SortOrder + } + + export type PlayerMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + image?: SortOrder + position?: SortOrder + countryId?: SortOrder + price?: SortOrder + totalPoints?: SortOrder + isActive?: SortOrder + isGoldenCardEligible?: SortOrder + cardTier?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PlayerMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + image?: SortOrder + position?: SortOrder + countryId?: SortOrder + price?: SortOrder + totalPoints?: SortOrder + isActive?: SortOrder + isGoldenCardEligible?: SortOrder + cardTier?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PlayerSumOrderByAggregateInput = { + price?: SortOrder + totalPoints?: SortOrder + } + + export type EnumPositionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Position | EnumPositionFieldRefInput<$PrismaModel> + in?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + notIn?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + not?: NestedEnumPositionWithAggregatesFilter<$PrismaModel> | $Enums.Position + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPositionFilter<$PrismaModel> + _max?: NestedEnumPositionFilter<$PrismaModel> + } + + export type FloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type EnumCardTierWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.CardTier | EnumCardTierFieldRefInput<$PrismaModel> + in?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + notIn?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + not?: NestedEnumCardTierWithAggregatesFilter<$PrismaModel> | $Enums.CardTier + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumCardTierFilter<$PrismaModel> + _max?: NestedEnumCardTierFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type EnumMatchStageFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStage | EnumMatchStageFieldRefInput<$PrismaModel> + in?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStageFilter<$PrismaModel> | $Enums.MatchStage + } + + export type EnumMatchStatusFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStatus | EnumMatchStatusFieldRefInput<$PrismaModel> + in?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStatusFilter<$PrismaModel> | $Enums.MatchStatus + } + + export type RoundNullableScalarRelationFilter = { + is?: RoundWhereInput | null + isNot?: RoundWhereInput | null + } + + export type MatchLineupListRelationFilter = { + every?: MatchLineupWhereInput + some?: MatchLineupWhereInput + none?: MatchLineupWhereInput + } + + export type MatchLineupOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MatchCountOrderByAggregateInput = { + id?: SortOrder + homeTeamId?: SortOrder + awayTeamId?: SortOrder + homeScore?: SortOrder + awayScore?: SortOrder + stage?: SortOrder + status?: SortOrder + matchDate?: SortOrder + matchDatePersian?: SortOrder + stadium?: SortOrder + city?: SortOrder + referee?: SortOrder + assistant1?: SortOrder + assistant2?: SortOrder + fourthOfficial?: SortOrder + attendance?: SortOrder + weather?: SortOrder + description?: SortOrder + roundId?: SortOrder + createdAt?: SortOrder + } + + export type MatchAvgOrderByAggregateInput = { + homeScore?: SortOrder + awayScore?: SortOrder + attendance?: SortOrder + } + + export type MatchMaxOrderByAggregateInput = { + id?: SortOrder + homeTeamId?: SortOrder + awayTeamId?: SortOrder + homeScore?: SortOrder + awayScore?: SortOrder + stage?: SortOrder + status?: SortOrder + matchDate?: SortOrder + matchDatePersian?: SortOrder + stadium?: SortOrder + city?: SortOrder + referee?: SortOrder + assistant1?: SortOrder + assistant2?: SortOrder + fourthOfficial?: SortOrder + attendance?: SortOrder + weather?: SortOrder + description?: SortOrder + roundId?: SortOrder + createdAt?: SortOrder + } + + export type MatchMinOrderByAggregateInput = { + id?: SortOrder + homeTeamId?: SortOrder + awayTeamId?: SortOrder + homeScore?: SortOrder + awayScore?: SortOrder + stage?: SortOrder + status?: SortOrder + matchDate?: SortOrder + matchDatePersian?: SortOrder + stadium?: SortOrder + city?: SortOrder + referee?: SortOrder + assistant1?: SortOrder + assistant2?: SortOrder + fourthOfficial?: SortOrder + attendance?: SortOrder + weather?: SortOrder + description?: SortOrder + roundId?: SortOrder + createdAt?: SortOrder + } + + export type MatchSumOrderByAggregateInput = { + homeScore?: SortOrder + awayScore?: SortOrder + attendance?: SortOrder + } + + export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type EnumMatchStageWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStage | EnumMatchStageFieldRefInput<$PrismaModel> + in?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStageWithAggregatesFilter<$PrismaModel> | $Enums.MatchStage + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumMatchStageFilter<$PrismaModel> + _max?: NestedEnumMatchStageFilter<$PrismaModel> + } + + export type EnumMatchStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStatus | EnumMatchStatusFieldRefInput<$PrismaModel> + in?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStatusWithAggregatesFilter<$PrismaModel> | $Enums.MatchStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumMatchStatusFilter<$PrismaModel> + _max?: NestedEnumMatchStatusFilter<$PrismaModel> + } + + export type RoundCountOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type RoundAvgOrderByAggregateInput = { + number?: SortOrder + } + + export type RoundMaxOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type RoundMinOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type RoundSumOrderByAggregateInput = { + number?: SortOrder + } + + export type GameweekCountOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type GameweekAvgOrderByAggregateInput = { + number?: SortOrder + } + + export type GameweekMaxOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type GameweekMinOrderByAggregateInput = { + id?: SortOrder + number?: SortOrder + name?: SortOrder + isActive?: SortOrder + deadline?: SortOrder + createdAt?: SortOrder + } + + export type GameweekSumOrderByAggregateInput = { + number?: SortOrder + } + + export type EnumEventTypeFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + not?: NestedEnumEventTypeFilter<$PrismaModel> | $Enums.EventType + } + + export type MatchScalarRelationFilter = { + is?: MatchWhereInput + isNot?: MatchWhereInput + } + + export type PlayerScalarRelationFilter = { + is?: PlayerWhereInput + isNot?: PlayerWhereInput + } + + export type MatchEventCountOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + playerId?: SortOrder + type?: SortOrder + minute?: SortOrder + extraInfo?: SortOrder + createdAt?: SortOrder + } + + export type MatchEventAvgOrderByAggregateInput = { + minute?: SortOrder + } + + export type MatchEventMaxOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + playerId?: SortOrder + type?: SortOrder + minute?: SortOrder + extraInfo?: SortOrder + createdAt?: SortOrder + } + + export type MatchEventMinOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + playerId?: SortOrder + type?: SortOrder + minute?: SortOrder + extraInfo?: SortOrder + createdAt?: SortOrder + } + + export type MatchEventSumOrderByAggregateInput = { + minute?: SortOrder + } + + export type EnumEventTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + not?: NestedEnumEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumEventTypeFilter<$PrismaModel> + _max?: NestedEnumEventTypeFilter<$PrismaModel> + } + + export type MatchLineupCountOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + countryId?: SortOrder + formation?: SortOrder + playerIds?: SortOrder + } + + export type MatchLineupMaxOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + countryId?: SortOrder + formation?: SortOrder + } + + export type MatchLineupMinOrderByAggregateInput = { + id?: SortOrder + matchId?: SortOrder + countryId?: SortOrder + formation?: SortOrder + } + + export type PlayerMatchStatPlayerIdMatchIdCompoundUniqueInput = { + playerId: string + matchId: string + } + + export type PlayerMatchStatCountOrderByAggregateInput = { + id?: SortOrder + playerId?: SortOrder + matchId?: SortOrder + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + cleanSheet?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + isMotm?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + } + + export type PlayerMatchStatAvgOrderByAggregateInput = { + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + } + + export type PlayerMatchStatMaxOrderByAggregateInput = { + id?: SortOrder + playerId?: SortOrder + matchId?: SortOrder + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + cleanSheet?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + isMotm?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + } + + export type PlayerMatchStatMinOrderByAggregateInput = { + id?: SortOrder + playerId?: SortOrder + matchId?: SortOrder + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + cleanSheet?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + isMotm?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + } + + export type PlayerMatchStatSumOrderByAggregateInput = { + goals?: SortOrder + assists?: SortOrder + yellowCards?: SortOrder + redCards?: SortOrder + minutesPlayed?: SortOrder + penaltySaved?: SortOrder + penaltyMissed?: SortOrder + ownGoals?: SortOrder + extraTimeBonus?: SortOrder + points?: SortOrder + } + + export type ScoringRulePositionEventTypeCompoundUniqueInput = { + position: $Enums.Position + eventType: $Enums.EventType + } + + export type ScoringRuleCountOrderByAggregateInput = { + id?: SortOrder + position?: SortOrder + eventType?: SortOrder + points?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ScoringRuleAvgOrderByAggregateInput = { + points?: SortOrder + } + + export type ScoringRuleMaxOrderByAggregateInput = { + id?: SortOrder + position?: SortOrder + eventType?: SortOrder + points?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ScoringRuleMinOrderByAggregateInput = { + id?: SortOrder + position?: SortOrder + eventType?: SortOrder + points?: SortOrder + updatedAt?: SortOrder + updatedBy?: SortOrder + } + + export type ScoringRuleSumOrderByAggregateInput = { + points?: SortOrder + } + + export type EnumRoleFilter<$PrismaModel = never> = { + equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + not?: NestedEnumRoleFilter<$PrismaModel> | $Enums.Role + } + + export type TeamNullableScalarRelationFilter = { + is?: TeamWhereInput | null + isNot?: TeamWhereInput | null + } + + export type SessionListRelationFilter = { + every?: SessionWhereInput + some?: SessionWhereInput + none?: SessionWhereInput + } + + export type PaymentListRelationFilter = { + every?: PaymentWhereInput + some?: PaymentWhereInput + none?: PaymentWhereInput + } + + export type QuizSubmissionListRelationFilter = { + every?: QuizSubmissionWhereInput + some?: QuizSubmissionWhereInput + none?: QuizSubmissionWhereInput + } + + export type SessionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type PaymentOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type QuizSubmissionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type UserCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + email?: SortOrder + phone?: SortOrder + password?: SortOrder + role?: SortOrder + createdAt?: SortOrder + } + + export type UserMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + email?: SortOrder + phone?: SortOrder + password?: SortOrder + role?: SortOrder + createdAt?: SortOrder + } + + export type UserMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + email?: SortOrder + phone?: SortOrder + password?: SortOrder + role?: SortOrder + createdAt?: SortOrder + } + + export type EnumRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + not?: NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumRoleFilter<$PrismaModel> + _max?: NestedEnumRoleFilter<$PrismaModel> + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type LoginOtpCountOrderByAggregateInput = { + id?: SortOrder + phone?: SortOrder + codeHash?: SortOrder + attempts?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + createdAt?: SortOrder + } + + export type LoginOtpAvgOrderByAggregateInput = { + attempts?: SortOrder + } + + export type LoginOtpMaxOrderByAggregateInput = { + id?: SortOrder + phone?: SortOrder + codeHash?: SortOrder + attempts?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + createdAt?: SortOrder + } + + export type LoginOtpMinOrderByAggregateInput = { + id?: SortOrder + phone?: SortOrder + codeHash?: SortOrder + attempts?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + createdAt?: SortOrder + } + + export type LoginOtpSumOrderByAggregateInput = { + attempts?: SortOrder + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type FantasyNewsCountOrderByAggregateInput = { + id?: SortOrder + icon?: SortOrder + title?: SortOrder + description?: SortOrder + newsTime?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type FantasyNewsMaxOrderByAggregateInput = { + id?: SortOrder + icon?: SortOrder + title?: SortOrder + description?: SortOrder + newsTime?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type FantasyNewsMinOrderByAggregateInput = { + id?: SortOrder + icon?: SortOrder + title?: SortOrder + description?: SortOrder + newsTime?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type QuizQuestionListRelationFilter = { + every?: QuizQuestionWhereInput + some?: QuizQuestionWhereInput + none?: QuizQuestionWhereInput + } + + export type QuizQuestionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type DailyQuizCountOrderByAggregateInput = { + id?: SortOrder + date?: SortOrder + windowStart?: SortOrder + windowEnd?: SortOrder + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrder + silverMinCorrect?: SortOrder + bronzeMinCorrect?: SortOrder + isProcessed?: SortOrder + createdAt?: SortOrder + } + + export type DailyQuizAvgOrderByAggregateInput = { + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrder + silverMinCorrect?: SortOrder + bronzeMinCorrect?: SortOrder + } + + export type DailyQuizMaxOrderByAggregateInput = { + id?: SortOrder + date?: SortOrder + windowStart?: SortOrder + windowEnd?: SortOrder + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrder + silverMinCorrect?: SortOrder + bronzeMinCorrect?: SortOrder + isProcessed?: SortOrder + createdAt?: SortOrder + } + + export type DailyQuizMinOrderByAggregateInput = { + id?: SortOrder + date?: SortOrder + windowStart?: SortOrder + windowEnd?: SortOrder + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrder + silverMinCorrect?: SortOrder + bronzeMinCorrect?: SortOrder + isProcessed?: SortOrder + createdAt?: SortOrder + } + + export type DailyQuizSumOrderByAggregateInput = { + goldWinnersCount?: SortOrder + silverWinnersCount?: SortOrder + bronzeWinnersCount?: SortOrder + goldMinCorrect?: SortOrder + silverMinCorrect?: SortOrder + bronzeMinCorrect?: SortOrder + } + + export type DailyQuizScalarRelationFilter = { + is?: DailyQuizWhereInput + isNot?: DailyQuizWhereInput + } + + export type QuizQuestionCountOrderByAggregateInput = { + id?: SortOrder + quizId?: SortOrder + questionText?: SortOrder + options?: SortOrder + correctAnswer?: SortOrder + order?: SortOrder + } + + export type QuizQuestionAvgOrderByAggregateInput = { + correctAnswer?: SortOrder + order?: SortOrder + } + + export type QuizQuestionMaxOrderByAggregateInput = { + id?: SortOrder + quizId?: SortOrder + questionText?: SortOrder + correctAnswer?: SortOrder + order?: SortOrder + } + + export type QuizQuestionMinOrderByAggregateInput = { + id?: SortOrder + quizId?: SortOrder + questionText?: SortOrder + correctAnswer?: SortOrder + order?: SortOrder + } + + export type QuizQuestionSumOrderByAggregateInput = { + correctAnswer?: SortOrder + order?: SortOrder + } + + export type IntNullableListFilter<$PrismaModel = never> = { + equals?: number[] | ListIntFieldRefInput<$PrismaModel> | null + has?: number | IntFieldRefInput<$PrismaModel> | null + hasEvery?: number[] | ListIntFieldRefInput<$PrismaModel> + hasSome?: number[] | ListIntFieldRefInput<$PrismaModel> + isEmpty?: boolean + } + + export type UserScalarRelationFilter = { + is?: UserWhereInput + isNot?: UserWhereInput + } + + export type QuizSubmissionUserIdQuizIdCompoundUniqueInput = { + userId: string + quizId: string + } + + export type QuizSubmissionCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + answers?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + submittedAt?: SortOrder + } + + export type QuizSubmissionAvgOrderByAggregateInput = { + answers?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + } + + export type QuizSubmissionMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + submittedAt?: SortOrder + } + + export type QuizSubmissionMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + submittedAt?: SortOrder + } + + export type QuizSubmissionSumOrderByAggregateInput = { + answers?: SortOrder + correctAnswers?: SortOrder + score?: SortOrder + } + + export type EnumGoldenCardStatusFilter<$PrismaModel = never> = { + equals?: $Enums.GoldenCardStatus | EnumGoldenCardStatusFieldRefInput<$PrismaModel> + in?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + not?: NestedEnumGoldenCardStatusFilter<$PrismaModel> | $Enums.GoldenCardStatus + } + + export type EnumSpecialCardStateFilter<$PrismaModel = never> = { + equals?: $Enums.SpecialCardState | EnumSpecialCardStateFieldRefInput<$PrismaModel> + in?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + notIn?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + not?: NestedEnumSpecialCardStateFilter<$PrismaModel> | $Enums.SpecialCardState + } + + export type DailyQuizNullableScalarRelationFilter = { + is?: DailyQuizWhereInput | null + isNot?: DailyQuizWhereInput | null + } + + export type TeamPlayerNullableScalarRelationFilter = { + is?: TeamPlayerWhereInput | null + isNot?: TeamPlayerWhereInput | null + } + + export type GoldenCardCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + playerId?: SortOrder + cardTier?: SortOrder + status?: SortOrder + state?: SortOrder + acquiredDate?: SortOrder + openedAt?: SortOrder + } + + export type GoldenCardMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + playerId?: SortOrder + cardTier?: SortOrder + status?: SortOrder + state?: SortOrder + acquiredDate?: SortOrder + openedAt?: SortOrder + } + + export type GoldenCardMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + quizId?: SortOrder + playerId?: SortOrder + cardTier?: SortOrder + status?: SortOrder + state?: SortOrder + acquiredDate?: SortOrder + openedAt?: SortOrder + } + + export type EnumGoldenCardStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.GoldenCardStatus | EnumGoldenCardStatusFieldRefInput<$PrismaModel> + in?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + not?: NestedEnumGoldenCardStatusWithAggregatesFilter<$PrismaModel> | $Enums.GoldenCardStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumGoldenCardStatusFilter<$PrismaModel> + _max?: NestedEnumGoldenCardStatusFilter<$PrismaModel> + } + + export type EnumSpecialCardStateWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SpecialCardState | EnumSpecialCardStateFieldRefInput<$PrismaModel> + in?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + notIn?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + not?: NestedEnumSpecialCardStateWithAggregatesFilter<$PrismaModel> | $Enums.SpecialCardState + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSpecialCardStateFilter<$PrismaModel> + _max?: NestedEnumSpecialCardStateFilter<$PrismaModel> + } + + export type SessionCountOrderByAggregateInput = { + id?: SortOrder + sessionToken?: SortOrder + userId?: SortOrder + expires?: SortOrder + } + + export type SessionMaxOrderByAggregateInput = { + id?: SortOrder + sessionToken?: SortOrder + userId?: SortOrder + expires?: SortOrder + } + + export type SessionMinOrderByAggregateInput = { + id?: SortOrder + sessionToken?: SortOrder + userId?: SortOrder + expires?: SortOrder + } + + export type EnumTeamStatusFilter<$PrismaModel = never> = { + equals?: $Enums.TeamStatus | EnumTeamStatusFieldRefInput<$PrismaModel> + in?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + not?: NestedEnumTeamStatusFilter<$PrismaModel> | $Enums.TeamStatus + } + + export type TeamCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + userId?: SortOrder + budget?: SortOrder + totalPoints?: SortOrder + formation?: SortOrder + status?: SortOrder + createdAt?: SortOrder + } + + export type TeamAvgOrderByAggregateInput = { + budget?: SortOrder + totalPoints?: SortOrder + } + + export type TeamMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + userId?: SortOrder + budget?: SortOrder + totalPoints?: SortOrder + formation?: SortOrder + status?: SortOrder + createdAt?: SortOrder + } + + export type TeamMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + userId?: SortOrder + budget?: SortOrder + totalPoints?: SortOrder + formation?: SortOrder + status?: SortOrder + createdAt?: SortOrder + } + + export type TeamSumOrderByAggregateInput = { + budget?: SortOrder + totalPoints?: SortOrder + } + + export type EnumTeamStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.TeamStatus | EnumTeamStatusFieldRefInput<$PrismaModel> + in?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + not?: NestedEnumTeamStatusWithAggregatesFilter<$PrismaModel> | $Enums.TeamStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumTeamStatusFilter<$PrismaModel> + _max?: NestedEnumTeamStatusFilter<$PrismaModel> + } + + export type TeamScalarRelationFilter = { + is?: TeamWhereInput + isNot?: TeamWhereInput + } + + export type GoldenCardNullableScalarRelationFilter = { + is?: GoldenCardWhereInput | null + isNot?: GoldenCardWhereInput | null + } + + export type TeamPlayerTeamIdPlayerIdCompoundUniqueInput = { + teamId: string + playerId: string + } + + export type TeamPlayerCountOrderByAggregateInput = { + teamId?: SortOrder + playerId?: SortOrder + goldenCardId?: SortOrder + isCaptain?: SortOrder + isViceCaptain?: SortOrder + isBench?: SortOrder + positionIndex?: SortOrder + } + + export type TeamPlayerAvgOrderByAggregateInput = { + positionIndex?: SortOrder + } + + export type TeamPlayerMaxOrderByAggregateInput = { + teamId?: SortOrder + playerId?: SortOrder + goldenCardId?: SortOrder + isCaptain?: SortOrder + isViceCaptain?: SortOrder + isBench?: SortOrder + positionIndex?: SortOrder + } + + export type TeamPlayerMinOrderByAggregateInput = { + teamId?: SortOrder + playerId?: SortOrder + goldenCardId?: SortOrder + isCaptain?: SortOrder + isViceCaptain?: SortOrder + isBench?: SortOrder + positionIndex?: SortOrder + } + + export type TeamPlayerSumOrderByAggregateInput = { + positionIndex?: SortOrder + } + + export type PackageCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + budgetBonus?: SortOrder + price?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type PackageAvgOrderByAggregateInput = { + budgetBonus?: SortOrder + price?: SortOrder + } + + export type PackageMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + budgetBonus?: SortOrder + price?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type PackageMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + budgetBonus?: SortOrder + price?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type PackageSumOrderByAggregateInput = { + budgetBonus?: SortOrder + price?: SortOrder + } + + export type EnumPaymentStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PaymentStatus | EnumPaymentStatusFieldRefInput<$PrismaModel> + in?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPaymentStatusFilter<$PrismaModel> | $Enums.PaymentStatus + } + + export type PackageScalarRelationFilter = { + is?: PackageWhereInput + isNot?: PackageWhereInput + } + + export type PaymentCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + packageId?: SortOrder + amount?: SortOrder + authority?: SortOrder + refId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PaymentAvgOrderByAggregateInput = { + amount?: SortOrder + } + + export type PaymentMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + packageId?: SortOrder + amount?: SortOrder + authority?: SortOrder + refId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PaymentMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + packageId?: SortOrder + amount?: SortOrder + authority?: SortOrder + refId?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PaymentSumOrderByAggregateInput = { + amount?: SortOrder + } + + export type EnumPaymentStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PaymentStatus | EnumPaymentStatusFieldRefInput<$PrismaModel> + in?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPaymentStatusWithAggregatesFilter<$PrismaModel> | $Enums.PaymentStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPaymentStatusFilter<$PrismaModel> + _max?: NestedEnumPaymentStatusFilter<$PrismaModel> + } + + export type CountryCreatedefaultLineupPlayerIdsInput = { + set: string[] + } + + export type GroupCreateNestedOneWithoutCountriesInput = { + create?: XOR + connectOrCreate?: GroupCreateOrConnectWithoutCountriesInput + connect?: GroupWhereUniqueInput + } + + export type PlayerCreateNestedManyWithoutCountryInput = { + create?: XOR | PlayerCreateWithoutCountryInput[] | PlayerUncheckedCreateWithoutCountryInput[] + connectOrCreate?: PlayerCreateOrConnectWithoutCountryInput | PlayerCreateOrConnectWithoutCountryInput[] + createMany?: PlayerCreateManyCountryInputEnvelope + connect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + } + + export type MatchCreateNestedManyWithoutHomeTeamInput = { + create?: XOR | MatchCreateWithoutHomeTeamInput[] | MatchUncheckedCreateWithoutHomeTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutHomeTeamInput | MatchCreateOrConnectWithoutHomeTeamInput[] + createMany?: MatchCreateManyHomeTeamInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type MatchCreateNestedManyWithoutAwayTeamInput = { + create?: XOR | MatchCreateWithoutAwayTeamInput[] | MatchUncheckedCreateWithoutAwayTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutAwayTeamInput | MatchCreateOrConnectWithoutAwayTeamInput[] + createMany?: MatchCreateManyAwayTeamInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type PlayerUncheckedCreateNestedManyWithoutCountryInput = { + create?: XOR | PlayerCreateWithoutCountryInput[] | PlayerUncheckedCreateWithoutCountryInput[] + connectOrCreate?: PlayerCreateOrConnectWithoutCountryInput | PlayerCreateOrConnectWithoutCountryInput[] + createMany?: PlayerCreateManyCountryInputEnvelope + connect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + } + + export type MatchUncheckedCreateNestedManyWithoutHomeTeamInput = { + create?: XOR | MatchCreateWithoutHomeTeamInput[] | MatchUncheckedCreateWithoutHomeTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutHomeTeamInput | MatchCreateOrConnectWithoutHomeTeamInput[] + createMany?: MatchCreateManyHomeTeamInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type MatchUncheckedCreateNestedManyWithoutAwayTeamInput = { + create?: XOR | MatchCreateWithoutAwayTeamInput[] | MatchUncheckedCreateWithoutAwayTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutAwayTeamInput | MatchCreateOrConnectWithoutAwayTeamInput[] + createMany?: MatchCreateManyAwayTeamInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type CountryUpdatedefaultLineupPlayerIdsInput = { + set?: string[] + push?: string | string[] + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type GroupUpdateOneWithoutCountriesNestedInput = { + create?: XOR + connectOrCreate?: GroupCreateOrConnectWithoutCountriesInput + upsert?: GroupUpsertWithoutCountriesInput + disconnect?: GroupWhereInput | boolean + delete?: GroupWhereInput | boolean + connect?: GroupWhereUniqueInput + update?: XOR, GroupUncheckedUpdateWithoutCountriesInput> + } + + export type PlayerUpdateManyWithoutCountryNestedInput = { + create?: XOR | PlayerCreateWithoutCountryInput[] | PlayerUncheckedCreateWithoutCountryInput[] + connectOrCreate?: PlayerCreateOrConnectWithoutCountryInput | PlayerCreateOrConnectWithoutCountryInput[] + upsert?: PlayerUpsertWithWhereUniqueWithoutCountryInput | PlayerUpsertWithWhereUniqueWithoutCountryInput[] + createMany?: PlayerCreateManyCountryInputEnvelope + set?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + disconnect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + delete?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + connect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + update?: PlayerUpdateWithWhereUniqueWithoutCountryInput | PlayerUpdateWithWhereUniqueWithoutCountryInput[] + updateMany?: PlayerUpdateManyWithWhereWithoutCountryInput | PlayerUpdateManyWithWhereWithoutCountryInput[] + deleteMany?: PlayerScalarWhereInput | PlayerScalarWhereInput[] + } + + export type MatchUpdateManyWithoutHomeTeamNestedInput = { + create?: XOR | MatchCreateWithoutHomeTeamInput[] | MatchUncheckedCreateWithoutHomeTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutHomeTeamInput | MatchCreateOrConnectWithoutHomeTeamInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutHomeTeamInput | MatchUpsertWithWhereUniqueWithoutHomeTeamInput[] + createMany?: MatchCreateManyHomeTeamInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutHomeTeamInput | MatchUpdateWithWhereUniqueWithoutHomeTeamInput[] + updateMany?: MatchUpdateManyWithWhereWithoutHomeTeamInput | MatchUpdateManyWithWhereWithoutHomeTeamInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type MatchUpdateManyWithoutAwayTeamNestedInput = { + create?: XOR | MatchCreateWithoutAwayTeamInput[] | MatchUncheckedCreateWithoutAwayTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutAwayTeamInput | MatchCreateOrConnectWithoutAwayTeamInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutAwayTeamInput | MatchUpsertWithWhereUniqueWithoutAwayTeamInput[] + createMany?: MatchCreateManyAwayTeamInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutAwayTeamInput | MatchUpdateWithWhereUniqueWithoutAwayTeamInput[] + updateMany?: MatchUpdateManyWithWhereWithoutAwayTeamInput | MatchUpdateManyWithWhereWithoutAwayTeamInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type PlayerUncheckedUpdateManyWithoutCountryNestedInput = { + create?: XOR | PlayerCreateWithoutCountryInput[] | PlayerUncheckedCreateWithoutCountryInput[] + connectOrCreate?: PlayerCreateOrConnectWithoutCountryInput | PlayerCreateOrConnectWithoutCountryInput[] + upsert?: PlayerUpsertWithWhereUniqueWithoutCountryInput | PlayerUpsertWithWhereUniqueWithoutCountryInput[] + createMany?: PlayerCreateManyCountryInputEnvelope + set?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + disconnect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + delete?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + connect?: PlayerWhereUniqueInput | PlayerWhereUniqueInput[] + update?: PlayerUpdateWithWhereUniqueWithoutCountryInput | PlayerUpdateWithWhereUniqueWithoutCountryInput[] + updateMany?: PlayerUpdateManyWithWhereWithoutCountryInput | PlayerUpdateManyWithWhereWithoutCountryInput[] + deleteMany?: PlayerScalarWhereInput | PlayerScalarWhereInput[] + } + + export type MatchUncheckedUpdateManyWithoutHomeTeamNestedInput = { + create?: XOR | MatchCreateWithoutHomeTeamInput[] | MatchUncheckedCreateWithoutHomeTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutHomeTeamInput | MatchCreateOrConnectWithoutHomeTeamInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutHomeTeamInput | MatchUpsertWithWhereUniqueWithoutHomeTeamInput[] + createMany?: MatchCreateManyHomeTeamInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutHomeTeamInput | MatchUpdateWithWhereUniqueWithoutHomeTeamInput[] + updateMany?: MatchUpdateManyWithWhereWithoutHomeTeamInput | MatchUpdateManyWithWhereWithoutHomeTeamInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type MatchUncheckedUpdateManyWithoutAwayTeamNestedInput = { + create?: XOR | MatchCreateWithoutAwayTeamInput[] | MatchUncheckedCreateWithoutAwayTeamInput[] + connectOrCreate?: MatchCreateOrConnectWithoutAwayTeamInput | MatchCreateOrConnectWithoutAwayTeamInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutAwayTeamInput | MatchUpsertWithWhereUniqueWithoutAwayTeamInput[] + createMany?: MatchCreateManyAwayTeamInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutAwayTeamInput | MatchUpdateWithWhereUniqueWithoutAwayTeamInput[] + updateMany?: MatchUpdateManyWithWhereWithoutAwayTeamInput | MatchUpdateManyWithWhereWithoutAwayTeamInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type CountryCreateNestedManyWithoutGroupInput = { + create?: XOR | CountryCreateWithoutGroupInput[] | CountryUncheckedCreateWithoutGroupInput[] + connectOrCreate?: CountryCreateOrConnectWithoutGroupInput | CountryCreateOrConnectWithoutGroupInput[] + createMany?: CountryCreateManyGroupInputEnvelope + connect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + } + + export type CountryUncheckedCreateNestedManyWithoutGroupInput = { + create?: XOR | CountryCreateWithoutGroupInput[] | CountryUncheckedCreateWithoutGroupInput[] + connectOrCreate?: CountryCreateOrConnectWithoutGroupInput | CountryCreateOrConnectWithoutGroupInput[] + createMany?: CountryCreateManyGroupInputEnvelope + connect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + } + + export type CountryUpdateManyWithoutGroupNestedInput = { + create?: XOR | CountryCreateWithoutGroupInput[] | CountryUncheckedCreateWithoutGroupInput[] + connectOrCreate?: CountryCreateOrConnectWithoutGroupInput | CountryCreateOrConnectWithoutGroupInput[] + upsert?: CountryUpsertWithWhereUniqueWithoutGroupInput | CountryUpsertWithWhereUniqueWithoutGroupInput[] + createMany?: CountryCreateManyGroupInputEnvelope + set?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + disconnect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + delete?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + connect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + update?: CountryUpdateWithWhereUniqueWithoutGroupInput | CountryUpdateWithWhereUniqueWithoutGroupInput[] + updateMany?: CountryUpdateManyWithWhereWithoutGroupInput | CountryUpdateManyWithWhereWithoutGroupInput[] + deleteMany?: CountryScalarWhereInput | CountryScalarWhereInput[] + } + + export type CountryUncheckedUpdateManyWithoutGroupNestedInput = { + create?: XOR | CountryCreateWithoutGroupInput[] | CountryUncheckedCreateWithoutGroupInput[] + connectOrCreate?: CountryCreateOrConnectWithoutGroupInput | CountryCreateOrConnectWithoutGroupInput[] + upsert?: CountryUpsertWithWhereUniqueWithoutGroupInput | CountryUpsertWithWhereUniqueWithoutGroupInput[] + createMany?: CountryCreateManyGroupInputEnvelope + set?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + disconnect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + delete?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + connect?: CountryWhereUniqueInput | CountryWhereUniqueInput[] + update?: CountryUpdateWithWhereUniqueWithoutGroupInput | CountryUpdateWithWhereUniqueWithoutGroupInput[] + updateMany?: CountryUpdateManyWithWhereWithoutGroupInput | CountryUpdateManyWithWhereWithoutGroupInput[] + deleteMany?: CountryScalarWhereInput | CountryScalarWhereInput[] + } + + export type CountryCreateNestedOneWithoutPlayersInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutPlayersInput + connect?: CountryWhereUniqueInput + } + + export type PlayerMatchStatCreateNestedManyWithoutPlayerInput = { + create?: XOR | PlayerMatchStatCreateWithoutPlayerInput[] | PlayerMatchStatUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutPlayerInput | PlayerMatchStatCreateOrConnectWithoutPlayerInput[] + createMany?: PlayerMatchStatCreateManyPlayerInputEnvelope + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + } + + export type TeamPlayerCreateNestedManyWithoutPlayerInput = { + create?: XOR | TeamPlayerCreateWithoutPlayerInput[] | TeamPlayerUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutPlayerInput | TeamPlayerCreateOrConnectWithoutPlayerInput[] + createMany?: TeamPlayerCreateManyPlayerInputEnvelope + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + } + + export type MatchEventCreateNestedManyWithoutPlayerInput = { + create?: XOR | MatchEventCreateWithoutPlayerInput[] | MatchEventUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutPlayerInput | MatchEventCreateOrConnectWithoutPlayerInput[] + createMany?: MatchEventCreateManyPlayerInputEnvelope + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + } + + export type GoldenCardCreateNestedManyWithoutPlayerInput = { + create?: XOR | GoldenCardCreateWithoutPlayerInput[] | GoldenCardUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutPlayerInput | GoldenCardCreateOrConnectWithoutPlayerInput[] + createMany?: GoldenCardCreateManyPlayerInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput = { + create?: XOR | PlayerMatchStatCreateWithoutPlayerInput[] | PlayerMatchStatUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutPlayerInput | PlayerMatchStatCreateOrConnectWithoutPlayerInput[] + createMany?: PlayerMatchStatCreateManyPlayerInputEnvelope + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + } + + export type TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput = { + create?: XOR | TeamPlayerCreateWithoutPlayerInput[] | TeamPlayerUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutPlayerInput | TeamPlayerCreateOrConnectWithoutPlayerInput[] + createMany?: TeamPlayerCreateManyPlayerInputEnvelope + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + } + + export type MatchEventUncheckedCreateNestedManyWithoutPlayerInput = { + create?: XOR | MatchEventCreateWithoutPlayerInput[] | MatchEventUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutPlayerInput | MatchEventCreateOrConnectWithoutPlayerInput[] + createMany?: MatchEventCreateManyPlayerInputEnvelope + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + } + + export type GoldenCardUncheckedCreateNestedManyWithoutPlayerInput = { + create?: XOR | GoldenCardCreateWithoutPlayerInput[] | GoldenCardUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutPlayerInput | GoldenCardCreateOrConnectWithoutPlayerInput[] + createMany?: GoldenCardCreateManyPlayerInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type EnumPositionFieldUpdateOperationsInput = { + set?: $Enums.Position + } + + export type FloatFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type EnumCardTierFieldUpdateOperationsInput = { + set?: $Enums.CardTier + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type CountryUpdateOneRequiredWithoutPlayersNestedInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutPlayersInput + upsert?: CountryUpsertWithoutPlayersInput + connect?: CountryWhereUniqueInput + update?: XOR, CountryUncheckedUpdateWithoutPlayersInput> + } + + export type PlayerMatchStatUpdateManyWithoutPlayerNestedInput = { + create?: XOR | PlayerMatchStatCreateWithoutPlayerInput[] | PlayerMatchStatUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutPlayerInput | PlayerMatchStatCreateOrConnectWithoutPlayerInput[] + upsert?: PlayerMatchStatUpsertWithWhereUniqueWithoutPlayerInput | PlayerMatchStatUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: PlayerMatchStatCreateManyPlayerInputEnvelope + set?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + disconnect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + delete?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + update?: PlayerMatchStatUpdateWithWhereUniqueWithoutPlayerInput | PlayerMatchStatUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: PlayerMatchStatUpdateManyWithWhereWithoutPlayerInput | PlayerMatchStatUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + } + + export type TeamPlayerUpdateManyWithoutPlayerNestedInput = { + create?: XOR | TeamPlayerCreateWithoutPlayerInput[] | TeamPlayerUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutPlayerInput | TeamPlayerCreateOrConnectWithoutPlayerInput[] + upsert?: TeamPlayerUpsertWithWhereUniqueWithoutPlayerInput | TeamPlayerUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: TeamPlayerCreateManyPlayerInputEnvelope + set?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + disconnect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + delete?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + update?: TeamPlayerUpdateWithWhereUniqueWithoutPlayerInput | TeamPlayerUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: TeamPlayerUpdateManyWithWhereWithoutPlayerInput | TeamPlayerUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + } + + export type MatchEventUpdateManyWithoutPlayerNestedInput = { + create?: XOR | MatchEventCreateWithoutPlayerInput[] | MatchEventUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutPlayerInput | MatchEventCreateOrConnectWithoutPlayerInput[] + upsert?: MatchEventUpsertWithWhereUniqueWithoutPlayerInput | MatchEventUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: MatchEventCreateManyPlayerInputEnvelope + set?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + disconnect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + delete?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + update?: MatchEventUpdateWithWhereUniqueWithoutPlayerInput | MatchEventUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: MatchEventUpdateManyWithWhereWithoutPlayerInput | MatchEventUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + } + + export type GoldenCardUpdateManyWithoutPlayerNestedInput = { + create?: XOR | GoldenCardCreateWithoutPlayerInput[] | GoldenCardUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutPlayerInput | GoldenCardCreateOrConnectWithoutPlayerInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutPlayerInput | GoldenCardUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: GoldenCardCreateManyPlayerInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutPlayerInput | GoldenCardUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutPlayerInput | GoldenCardUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput = { + create?: XOR | PlayerMatchStatCreateWithoutPlayerInput[] | PlayerMatchStatUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutPlayerInput | PlayerMatchStatCreateOrConnectWithoutPlayerInput[] + upsert?: PlayerMatchStatUpsertWithWhereUniqueWithoutPlayerInput | PlayerMatchStatUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: PlayerMatchStatCreateManyPlayerInputEnvelope + set?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + disconnect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + delete?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + update?: PlayerMatchStatUpdateWithWhereUniqueWithoutPlayerInput | PlayerMatchStatUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: PlayerMatchStatUpdateManyWithWhereWithoutPlayerInput | PlayerMatchStatUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + } + + export type TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput = { + create?: XOR | TeamPlayerCreateWithoutPlayerInput[] | TeamPlayerUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutPlayerInput | TeamPlayerCreateOrConnectWithoutPlayerInput[] + upsert?: TeamPlayerUpsertWithWhereUniqueWithoutPlayerInput | TeamPlayerUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: TeamPlayerCreateManyPlayerInputEnvelope + set?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + disconnect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + delete?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + update?: TeamPlayerUpdateWithWhereUniqueWithoutPlayerInput | TeamPlayerUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: TeamPlayerUpdateManyWithWhereWithoutPlayerInput | TeamPlayerUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + } + + export type MatchEventUncheckedUpdateManyWithoutPlayerNestedInput = { + create?: XOR | MatchEventCreateWithoutPlayerInput[] | MatchEventUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutPlayerInput | MatchEventCreateOrConnectWithoutPlayerInput[] + upsert?: MatchEventUpsertWithWhereUniqueWithoutPlayerInput | MatchEventUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: MatchEventCreateManyPlayerInputEnvelope + set?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + disconnect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + delete?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + update?: MatchEventUpdateWithWhereUniqueWithoutPlayerInput | MatchEventUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: MatchEventUpdateManyWithWhereWithoutPlayerInput | MatchEventUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + } + + export type GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput = { + create?: XOR | GoldenCardCreateWithoutPlayerInput[] | GoldenCardUncheckedCreateWithoutPlayerInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutPlayerInput | GoldenCardCreateOrConnectWithoutPlayerInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutPlayerInput | GoldenCardUpsertWithWhereUniqueWithoutPlayerInput[] + createMany?: GoldenCardCreateManyPlayerInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutPlayerInput | GoldenCardUpdateWithWhereUniqueWithoutPlayerInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutPlayerInput | GoldenCardUpdateManyWithWhereWithoutPlayerInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type CountryCreateNestedOneWithoutHomeMatchesInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutHomeMatchesInput + connect?: CountryWhereUniqueInput + } + + export type CountryCreateNestedOneWithoutAwayMatchesInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutAwayMatchesInput + connect?: CountryWhereUniqueInput + } + + export type RoundCreateNestedOneWithoutMatchesInput = { + create?: XOR + connectOrCreate?: RoundCreateOrConnectWithoutMatchesInput + connect?: RoundWhereUniqueInput + } + + export type PlayerMatchStatCreateNestedManyWithoutMatchInput = { + create?: XOR | PlayerMatchStatCreateWithoutMatchInput[] | PlayerMatchStatUncheckedCreateWithoutMatchInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutMatchInput | PlayerMatchStatCreateOrConnectWithoutMatchInput[] + createMany?: PlayerMatchStatCreateManyMatchInputEnvelope + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + } + + export type MatchEventCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchEventCreateWithoutMatchInput[] | MatchEventUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutMatchInput | MatchEventCreateOrConnectWithoutMatchInput[] + createMany?: MatchEventCreateManyMatchInputEnvelope + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + } + + export type MatchLineupCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchLineupCreateWithoutMatchInput[] | MatchLineupUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchLineupCreateOrConnectWithoutMatchInput | MatchLineupCreateOrConnectWithoutMatchInput[] + createMany?: MatchLineupCreateManyMatchInputEnvelope + connect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + } + + export type PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput = { + create?: XOR | PlayerMatchStatCreateWithoutMatchInput[] | PlayerMatchStatUncheckedCreateWithoutMatchInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutMatchInput | PlayerMatchStatCreateOrConnectWithoutMatchInput[] + createMany?: PlayerMatchStatCreateManyMatchInputEnvelope + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + } + + export type MatchEventUncheckedCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchEventCreateWithoutMatchInput[] | MatchEventUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutMatchInput | MatchEventCreateOrConnectWithoutMatchInput[] + createMany?: MatchEventCreateManyMatchInputEnvelope + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + } + + export type MatchLineupUncheckedCreateNestedManyWithoutMatchInput = { + create?: XOR | MatchLineupCreateWithoutMatchInput[] | MatchLineupUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchLineupCreateOrConnectWithoutMatchInput | MatchLineupCreateOrConnectWithoutMatchInput[] + createMany?: MatchLineupCreateManyMatchInputEnvelope + connect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + } + + export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type EnumMatchStageFieldUpdateOperationsInput = { + set?: $Enums.MatchStage + } + + export type EnumMatchStatusFieldUpdateOperationsInput = { + set?: $Enums.MatchStatus + } + + export type CountryUpdateOneRequiredWithoutHomeMatchesNestedInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutHomeMatchesInput + upsert?: CountryUpsertWithoutHomeMatchesInput + connect?: CountryWhereUniqueInput + update?: XOR, CountryUncheckedUpdateWithoutHomeMatchesInput> + } + + export type CountryUpdateOneRequiredWithoutAwayMatchesNestedInput = { + create?: XOR + connectOrCreate?: CountryCreateOrConnectWithoutAwayMatchesInput + upsert?: CountryUpsertWithoutAwayMatchesInput + connect?: CountryWhereUniqueInput + update?: XOR, CountryUncheckedUpdateWithoutAwayMatchesInput> + } + + export type RoundUpdateOneWithoutMatchesNestedInput = { + create?: XOR + connectOrCreate?: RoundCreateOrConnectWithoutMatchesInput + upsert?: RoundUpsertWithoutMatchesInput + disconnect?: RoundWhereInput | boolean + delete?: RoundWhereInput | boolean + connect?: RoundWhereUniqueInput + update?: XOR, RoundUncheckedUpdateWithoutMatchesInput> + } + + export type PlayerMatchStatUpdateManyWithoutMatchNestedInput = { + create?: XOR | PlayerMatchStatCreateWithoutMatchInput[] | PlayerMatchStatUncheckedCreateWithoutMatchInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutMatchInput | PlayerMatchStatCreateOrConnectWithoutMatchInput[] + upsert?: PlayerMatchStatUpsertWithWhereUniqueWithoutMatchInput | PlayerMatchStatUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: PlayerMatchStatCreateManyMatchInputEnvelope + set?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + disconnect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + delete?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + update?: PlayerMatchStatUpdateWithWhereUniqueWithoutMatchInput | PlayerMatchStatUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: PlayerMatchStatUpdateManyWithWhereWithoutMatchInput | PlayerMatchStatUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + } + + export type MatchEventUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchEventCreateWithoutMatchInput[] | MatchEventUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutMatchInput | MatchEventCreateOrConnectWithoutMatchInput[] + upsert?: MatchEventUpsertWithWhereUniqueWithoutMatchInput | MatchEventUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchEventCreateManyMatchInputEnvelope + set?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + disconnect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + delete?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + update?: MatchEventUpdateWithWhereUniqueWithoutMatchInput | MatchEventUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchEventUpdateManyWithWhereWithoutMatchInput | MatchEventUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + } + + export type MatchLineupUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchLineupCreateWithoutMatchInput[] | MatchLineupUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchLineupCreateOrConnectWithoutMatchInput | MatchLineupCreateOrConnectWithoutMatchInput[] + upsert?: MatchLineupUpsertWithWhereUniqueWithoutMatchInput | MatchLineupUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchLineupCreateManyMatchInputEnvelope + set?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + disconnect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + delete?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + connect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + update?: MatchLineupUpdateWithWhereUniqueWithoutMatchInput | MatchLineupUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchLineupUpdateManyWithWhereWithoutMatchInput | MatchLineupUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchLineupScalarWhereInput | MatchLineupScalarWhereInput[] + } + + export type PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput = { + create?: XOR | PlayerMatchStatCreateWithoutMatchInput[] | PlayerMatchStatUncheckedCreateWithoutMatchInput[] + connectOrCreate?: PlayerMatchStatCreateOrConnectWithoutMatchInput | PlayerMatchStatCreateOrConnectWithoutMatchInput[] + upsert?: PlayerMatchStatUpsertWithWhereUniqueWithoutMatchInput | PlayerMatchStatUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: PlayerMatchStatCreateManyMatchInputEnvelope + set?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + disconnect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + delete?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + connect?: PlayerMatchStatWhereUniqueInput | PlayerMatchStatWhereUniqueInput[] + update?: PlayerMatchStatUpdateWithWhereUniqueWithoutMatchInput | PlayerMatchStatUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: PlayerMatchStatUpdateManyWithWhereWithoutMatchInput | PlayerMatchStatUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + } + + export type MatchEventUncheckedUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchEventCreateWithoutMatchInput[] | MatchEventUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchEventCreateOrConnectWithoutMatchInput | MatchEventCreateOrConnectWithoutMatchInput[] + upsert?: MatchEventUpsertWithWhereUniqueWithoutMatchInput | MatchEventUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchEventCreateManyMatchInputEnvelope + set?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + disconnect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + delete?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + connect?: MatchEventWhereUniqueInput | MatchEventWhereUniqueInput[] + update?: MatchEventUpdateWithWhereUniqueWithoutMatchInput | MatchEventUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchEventUpdateManyWithWhereWithoutMatchInput | MatchEventUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + } + + export type MatchLineupUncheckedUpdateManyWithoutMatchNestedInput = { + create?: XOR | MatchLineupCreateWithoutMatchInput[] | MatchLineupUncheckedCreateWithoutMatchInput[] + connectOrCreate?: MatchLineupCreateOrConnectWithoutMatchInput | MatchLineupCreateOrConnectWithoutMatchInput[] + upsert?: MatchLineupUpsertWithWhereUniqueWithoutMatchInput | MatchLineupUpsertWithWhereUniqueWithoutMatchInput[] + createMany?: MatchLineupCreateManyMatchInputEnvelope + set?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + disconnect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + delete?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + connect?: MatchLineupWhereUniqueInput | MatchLineupWhereUniqueInput[] + update?: MatchLineupUpdateWithWhereUniqueWithoutMatchInput | MatchLineupUpdateWithWhereUniqueWithoutMatchInput[] + updateMany?: MatchLineupUpdateManyWithWhereWithoutMatchInput | MatchLineupUpdateManyWithWhereWithoutMatchInput[] + deleteMany?: MatchLineupScalarWhereInput | MatchLineupScalarWhereInput[] + } + + export type MatchCreateNestedManyWithoutRoundInput = { + create?: XOR | MatchCreateWithoutRoundInput[] | MatchUncheckedCreateWithoutRoundInput[] + connectOrCreate?: MatchCreateOrConnectWithoutRoundInput | MatchCreateOrConnectWithoutRoundInput[] + createMany?: MatchCreateManyRoundInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type MatchUncheckedCreateNestedManyWithoutRoundInput = { + create?: XOR | MatchCreateWithoutRoundInput[] | MatchUncheckedCreateWithoutRoundInput[] + connectOrCreate?: MatchCreateOrConnectWithoutRoundInput | MatchCreateOrConnectWithoutRoundInput[] + createMany?: MatchCreateManyRoundInputEnvelope + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + } + + export type MatchUpdateManyWithoutRoundNestedInput = { + create?: XOR | MatchCreateWithoutRoundInput[] | MatchUncheckedCreateWithoutRoundInput[] + connectOrCreate?: MatchCreateOrConnectWithoutRoundInput | MatchCreateOrConnectWithoutRoundInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutRoundInput | MatchUpsertWithWhereUniqueWithoutRoundInput[] + createMany?: MatchCreateManyRoundInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutRoundInput | MatchUpdateWithWhereUniqueWithoutRoundInput[] + updateMany?: MatchUpdateManyWithWhereWithoutRoundInput | MatchUpdateManyWithWhereWithoutRoundInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type MatchUncheckedUpdateManyWithoutRoundNestedInput = { + create?: XOR | MatchCreateWithoutRoundInput[] | MatchUncheckedCreateWithoutRoundInput[] + connectOrCreate?: MatchCreateOrConnectWithoutRoundInput | MatchCreateOrConnectWithoutRoundInput[] + upsert?: MatchUpsertWithWhereUniqueWithoutRoundInput | MatchUpsertWithWhereUniqueWithoutRoundInput[] + createMany?: MatchCreateManyRoundInputEnvelope + set?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + disconnect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + delete?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + connect?: MatchWhereUniqueInput | MatchWhereUniqueInput[] + update?: MatchUpdateWithWhereUniqueWithoutRoundInput | MatchUpdateWithWhereUniqueWithoutRoundInput[] + updateMany?: MatchUpdateManyWithWhereWithoutRoundInput | MatchUpdateManyWithWhereWithoutRoundInput[] + deleteMany?: MatchScalarWhereInput | MatchScalarWhereInput[] + } + + export type MatchCreateNestedOneWithoutEventsInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutEventsInput + connect?: MatchWhereUniqueInput + } + + export type PlayerCreateNestedOneWithoutEventsInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutEventsInput + connect?: PlayerWhereUniqueInput + } + + export type EnumEventTypeFieldUpdateOperationsInput = { + set?: $Enums.EventType + } + + export type MatchUpdateOneRequiredWithoutEventsNestedInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutEventsInput + upsert?: MatchUpsertWithoutEventsInput + connect?: MatchWhereUniqueInput + update?: XOR, MatchUncheckedUpdateWithoutEventsInput> + } + + export type PlayerUpdateOneRequiredWithoutEventsNestedInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutEventsInput + upsert?: PlayerUpsertWithoutEventsInput + connect?: PlayerWhereUniqueInput + update?: XOR, PlayerUncheckedUpdateWithoutEventsInput> + } + + export type MatchLineupCreateplayerIdsInput = { + set: string[] + } + + export type MatchCreateNestedOneWithoutLineupsInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutLineupsInput + connect?: MatchWhereUniqueInput + } + + export type MatchLineupUpdateplayerIdsInput = { + set?: string[] + push?: string | string[] + } + + export type MatchUpdateOneRequiredWithoutLineupsNestedInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutLineupsInput + upsert?: MatchUpsertWithoutLineupsInput + connect?: MatchWhereUniqueInput + update?: XOR, MatchUncheckedUpdateWithoutLineupsInput> + } + + export type PlayerCreateNestedOneWithoutMatchStatsInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutMatchStatsInput + connect?: PlayerWhereUniqueInput + } + + export type MatchCreateNestedOneWithoutPlayerStatsInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutPlayerStatsInput + connect?: MatchWhereUniqueInput + } + + export type PlayerUpdateOneRequiredWithoutMatchStatsNestedInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutMatchStatsInput + upsert?: PlayerUpsertWithoutMatchStatsInput + connect?: PlayerWhereUniqueInput + update?: XOR, PlayerUncheckedUpdateWithoutMatchStatsInput> + } + + export type MatchUpdateOneRequiredWithoutPlayerStatsNestedInput = { + create?: XOR + connectOrCreate?: MatchCreateOrConnectWithoutPlayerStatsInput + upsert?: MatchUpsertWithoutPlayerStatsInput + connect?: MatchWhereUniqueInput + update?: XOR, MatchUncheckedUpdateWithoutPlayerStatsInput> + } + + export type TeamCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutUserInput + connect?: TeamWhereUniqueInput + } + + export type SessionCreateNestedManyWithoutUserInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + } + + export type PaymentCreateNestedManyWithoutUserInput = { + create?: XOR | PaymentCreateWithoutUserInput[] | PaymentUncheckedCreateWithoutUserInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutUserInput | PaymentCreateOrConnectWithoutUserInput[] + createMany?: PaymentCreateManyUserInputEnvelope + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + } + + export type QuizSubmissionCreateNestedManyWithoutUserInput = { + create?: XOR | QuizSubmissionCreateWithoutUserInput[] | QuizSubmissionUncheckedCreateWithoutUserInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutUserInput | QuizSubmissionCreateOrConnectWithoutUserInput[] + createMany?: QuizSubmissionCreateManyUserInputEnvelope + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + } + + export type GoldenCardCreateNestedManyWithoutUserInput = { + create?: XOR | GoldenCardCreateWithoutUserInput[] | GoldenCardUncheckedCreateWithoutUserInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutUserInput | GoldenCardCreateOrConnectWithoutUserInput[] + createMany?: GoldenCardCreateManyUserInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type TeamUncheckedCreateNestedOneWithoutUserInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutUserInput + connect?: TeamWhereUniqueInput + } + + export type SessionUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + } + + export type PaymentUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | PaymentCreateWithoutUserInput[] | PaymentUncheckedCreateWithoutUserInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutUserInput | PaymentCreateOrConnectWithoutUserInput[] + createMany?: PaymentCreateManyUserInputEnvelope + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + } + + export type QuizSubmissionUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | QuizSubmissionCreateWithoutUserInput[] | QuizSubmissionUncheckedCreateWithoutUserInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutUserInput | QuizSubmissionCreateOrConnectWithoutUserInput[] + createMany?: QuizSubmissionCreateManyUserInputEnvelope + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + } + + export type GoldenCardUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | GoldenCardCreateWithoutUserInput[] | GoldenCardUncheckedCreateWithoutUserInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutUserInput | GoldenCardCreateOrConnectWithoutUserInput[] + createMany?: GoldenCardCreateManyUserInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type EnumRoleFieldUpdateOperationsInput = { + set?: $Enums.Role + } + + export type TeamUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutUserInput + upsert?: TeamUpsertWithoutUserInput + disconnect?: TeamWhereInput | boolean + delete?: TeamWhereInput | boolean + connect?: TeamWhereUniqueInput + update?: XOR, TeamUncheckedUpdateWithoutUserInput> + } + + export type SessionUpdateManyWithoutUserNestedInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] + } + + export type PaymentUpdateManyWithoutUserNestedInput = { + create?: XOR | PaymentCreateWithoutUserInput[] | PaymentUncheckedCreateWithoutUserInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutUserInput | PaymentCreateOrConnectWithoutUserInput[] + upsert?: PaymentUpsertWithWhereUniqueWithoutUserInput | PaymentUpsertWithWhereUniqueWithoutUserInput[] + createMany?: PaymentCreateManyUserInputEnvelope + set?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + disconnect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + delete?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + update?: PaymentUpdateWithWhereUniqueWithoutUserInput | PaymentUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: PaymentUpdateManyWithWhereWithoutUserInput | PaymentUpdateManyWithWhereWithoutUserInput[] + deleteMany?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + } + + export type QuizSubmissionUpdateManyWithoutUserNestedInput = { + create?: XOR | QuizSubmissionCreateWithoutUserInput[] | QuizSubmissionUncheckedCreateWithoutUserInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutUserInput | QuizSubmissionCreateOrConnectWithoutUserInput[] + upsert?: QuizSubmissionUpsertWithWhereUniqueWithoutUserInput | QuizSubmissionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: QuizSubmissionCreateManyUserInputEnvelope + set?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + disconnect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + delete?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + update?: QuizSubmissionUpdateWithWhereUniqueWithoutUserInput | QuizSubmissionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: QuizSubmissionUpdateManyWithWhereWithoutUserInput | QuizSubmissionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + } + + export type GoldenCardUpdateManyWithoutUserNestedInput = { + create?: XOR | GoldenCardCreateWithoutUserInput[] | GoldenCardUncheckedCreateWithoutUserInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutUserInput | GoldenCardCreateOrConnectWithoutUserInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutUserInput | GoldenCardUpsertWithWhereUniqueWithoutUserInput[] + createMany?: GoldenCardCreateManyUserInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutUserInput | GoldenCardUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutUserInput | GoldenCardUpdateManyWithWhereWithoutUserInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type TeamUncheckedUpdateOneWithoutUserNestedInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutUserInput + upsert?: TeamUpsertWithoutUserInput + disconnect?: TeamWhereInput | boolean + delete?: TeamWhereInput | boolean + connect?: TeamWhereUniqueInput + update?: XOR, TeamUncheckedUpdateWithoutUserInput> + } + + export type SessionUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] + connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] + upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SessionCreateManyUserInputEnvelope + set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] + update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] + } + + export type PaymentUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | PaymentCreateWithoutUserInput[] | PaymentUncheckedCreateWithoutUserInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutUserInput | PaymentCreateOrConnectWithoutUserInput[] + upsert?: PaymentUpsertWithWhereUniqueWithoutUserInput | PaymentUpsertWithWhereUniqueWithoutUserInput[] + createMany?: PaymentCreateManyUserInputEnvelope + set?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + disconnect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + delete?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + update?: PaymentUpdateWithWhereUniqueWithoutUserInput | PaymentUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: PaymentUpdateManyWithWhereWithoutUserInput | PaymentUpdateManyWithWhereWithoutUserInput[] + deleteMany?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + } + + export type QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | QuizSubmissionCreateWithoutUserInput[] | QuizSubmissionUncheckedCreateWithoutUserInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutUserInput | QuizSubmissionCreateOrConnectWithoutUserInput[] + upsert?: QuizSubmissionUpsertWithWhereUniqueWithoutUserInput | QuizSubmissionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: QuizSubmissionCreateManyUserInputEnvelope + set?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + disconnect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + delete?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + update?: QuizSubmissionUpdateWithWhereUniqueWithoutUserInput | QuizSubmissionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: QuizSubmissionUpdateManyWithWhereWithoutUserInput | QuizSubmissionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + } + + export type GoldenCardUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | GoldenCardCreateWithoutUserInput[] | GoldenCardUncheckedCreateWithoutUserInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutUserInput | GoldenCardCreateOrConnectWithoutUserInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutUserInput | GoldenCardUpsertWithWhereUniqueWithoutUserInput[] + createMany?: GoldenCardCreateManyUserInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutUserInput | GoldenCardUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutUserInput | GoldenCardUpdateManyWithWhereWithoutUserInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type QuizQuestionCreateNestedManyWithoutQuizInput = { + create?: XOR | QuizQuestionCreateWithoutQuizInput[] | QuizQuestionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizQuestionCreateOrConnectWithoutQuizInput | QuizQuestionCreateOrConnectWithoutQuizInput[] + createMany?: QuizQuestionCreateManyQuizInputEnvelope + connect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + } + + export type QuizSubmissionCreateNestedManyWithoutQuizInput = { + create?: XOR | QuizSubmissionCreateWithoutQuizInput[] | QuizSubmissionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutQuizInput | QuizSubmissionCreateOrConnectWithoutQuizInput[] + createMany?: QuizSubmissionCreateManyQuizInputEnvelope + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + } + + export type GoldenCardCreateNestedManyWithoutQuizInput = { + create?: XOR | GoldenCardCreateWithoutQuizInput[] | GoldenCardUncheckedCreateWithoutQuizInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutQuizInput | GoldenCardCreateOrConnectWithoutQuizInput[] + createMany?: GoldenCardCreateManyQuizInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type QuizQuestionUncheckedCreateNestedManyWithoutQuizInput = { + create?: XOR | QuizQuestionCreateWithoutQuizInput[] | QuizQuestionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizQuestionCreateOrConnectWithoutQuizInput | QuizQuestionCreateOrConnectWithoutQuizInput[] + createMany?: QuizQuestionCreateManyQuizInputEnvelope + connect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + } + + export type QuizSubmissionUncheckedCreateNestedManyWithoutQuizInput = { + create?: XOR | QuizSubmissionCreateWithoutQuizInput[] | QuizSubmissionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutQuizInput | QuizSubmissionCreateOrConnectWithoutQuizInput[] + createMany?: QuizSubmissionCreateManyQuizInputEnvelope + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + } + + export type GoldenCardUncheckedCreateNestedManyWithoutQuizInput = { + create?: XOR | GoldenCardCreateWithoutQuizInput[] | GoldenCardUncheckedCreateWithoutQuizInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutQuizInput | GoldenCardCreateOrConnectWithoutQuizInput[] + createMany?: GoldenCardCreateManyQuizInputEnvelope + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + } + + export type QuizQuestionUpdateManyWithoutQuizNestedInput = { + create?: XOR | QuizQuestionCreateWithoutQuizInput[] | QuizQuestionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizQuestionCreateOrConnectWithoutQuizInput | QuizQuestionCreateOrConnectWithoutQuizInput[] + upsert?: QuizQuestionUpsertWithWhereUniqueWithoutQuizInput | QuizQuestionUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: QuizQuestionCreateManyQuizInputEnvelope + set?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + disconnect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + delete?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + connect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + update?: QuizQuestionUpdateWithWhereUniqueWithoutQuizInput | QuizQuestionUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: QuizQuestionUpdateManyWithWhereWithoutQuizInput | QuizQuestionUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: QuizQuestionScalarWhereInput | QuizQuestionScalarWhereInput[] + } + + export type QuizSubmissionUpdateManyWithoutQuizNestedInput = { + create?: XOR | QuizSubmissionCreateWithoutQuizInput[] | QuizSubmissionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutQuizInput | QuizSubmissionCreateOrConnectWithoutQuizInput[] + upsert?: QuizSubmissionUpsertWithWhereUniqueWithoutQuizInput | QuizSubmissionUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: QuizSubmissionCreateManyQuizInputEnvelope + set?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + disconnect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + delete?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + update?: QuizSubmissionUpdateWithWhereUniqueWithoutQuizInput | QuizSubmissionUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: QuizSubmissionUpdateManyWithWhereWithoutQuizInput | QuizSubmissionUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + } + + export type GoldenCardUpdateManyWithoutQuizNestedInput = { + create?: XOR | GoldenCardCreateWithoutQuizInput[] | GoldenCardUncheckedCreateWithoutQuizInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutQuizInput | GoldenCardCreateOrConnectWithoutQuizInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutQuizInput | GoldenCardUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: GoldenCardCreateManyQuizInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutQuizInput | GoldenCardUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutQuizInput | GoldenCardUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type QuizQuestionUncheckedUpdateManyWithoutQuizNestedInput = { + create?: XOR | QuizQuestionCreateWithoutQuizInput[] | QuizQuestionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizQuestionCreateOrConnectWithoutQuizInput | QuizQuestionCreateOrConnectWithoutQuizInput[] + upsert?: QuizQuestionUpsertWithWhereUniqueWithoutQuizInput | QuizQuestionUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: QuizQuestionCreateManyQuizInputEnvelope + set?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + disconnect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + delete?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + connect?: QuizQuestionWhereUniqueInput | QuizQuestionWhereUniqueInput[] + update?: QuizQuestionUpdateWithWhereUniqueWithoutQuizInput | QuizQuestionUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: QuizQuestionUpdateManyWithWhereWithoutQuizInput | QuizQuestionUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: QuizQuestionScalarWhereInput | QuizQuestionScalarWhereInput[] + } + + export type QuizSubmissionUncheckedUpdateManyWithoutQuizNestedInput = { + create?: XOR | QuizSubmissionCreateWithoutQuizInput[] | QuizSubmissionUncheckedCreateWithoutQuizInput[] + connectOrCreate?: QuizSubmissionCreateOrConnectWithoutQuizInput | QuizSubmissionCreateOrConnectWithoutQuizInput[] + upsert?: QuizSubmissionUpsertWithWhereUniqueWithoutQuizInput | QuizSubmissionUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: QuizSubmissionCreateManyQuizInputEnvelope + set?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + disconnect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + delete?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + connect?: QuizSubmissionWhereUniqueInput | QuizSubmissionWhereUniqueInput[] + update?: QuizSubmissionUpdateWithWhereUniqueWithoutQuizInput | QuizSubmissionUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: QuizSubmissionUpdateManyWithWhereWithoutQuizInput | QuizSubmissionUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + } + + export type GoldenCardUncheckedUpdateManyWithoutQuizNestedInput = { + create?: XOR | GoldenCardCreateWithoutQuizInput[] | GoldenCardUncheckedCreateWithoutQuizInput[] + connectOrCreate?: GoldenCardCreateOrConnectWithoutQuizInput | GoldenCardCreateOrConnectWithoutQuizInput[] + upsert?: GoldenCardUpsertWithWhereUniqueWithoutQuizInput | GoldenCardUpsertWithWhereUniqueWithoutQuizInput[] + createMany?: GoldenCardCreateManyQuizInputEnvelope + set?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + disconnect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + delete?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + connect?: GoldenCardWhereUniqueInput | GoldenCardWhereUniqueInput[] + update?: GoldenCardUpdateWithWhereUniqueWithoutQuizInput | GoldenCardUpdateWithWhereUniqueWithoutQuizInput[] + updateMany?: GoldenCardUpdateManyWithWhereWithoutQuizInput | GoldenCardUpdateManyWithWhereWithoutQuizInput[] + deleteMany?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + } + + export type QuizQuestionCreateoptionsInput = { + set: string[] + } + + export type DailyQuizCreateNestedOneWithoutQuestionsInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutQuestionsInput + connect?: DailyQuizWhereUniqueInput + } + + export type QuizQuestionUpdateoptionsInput = { + set?: string[] + push?: string | string[] + } + + export type DailyQuizUpdateOneRequiredWithoutQuestionsNestedInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutQuestionsInput + upsert?: DailyQuizUpsertWithoutQuestionsInput + connect?: DailyQuizWhereUniqueInput + update?: XOR, DailyQuizUncheckedUpdateWithoutQuestionsInput> + } + + export type QuizSubmissionCreateanswersInput = { + set: number[] + } + + export type UserCreateNestedOneWithoutQuizSubmissionsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutQuizSubmissionsInput + connect?: UserWhereUniqueInput + } + + export type DailyQuizCreateNestedOneWithoutSubmissionsInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutSubmissionsInput + connect?: DailyQuizWhereUniqueInput + } + + export type QuizSubmissionUpdateanswersInput = { + set?: number[] + push?: number | number[] + } + + export type UserUpdateOneRequiredWithoutQuizSubmissionsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutQuizSubmissionsInput + upsert?: UserUpsertWithoutQuizSubmissionsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutQuizSubmissionsInput> + } + + export type DailyQuizUpdateOneRequiredWithoutSubmissionsNestedInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutSubmissionsInput + upsert?: DailyQuizUpsertWithoutSubmissionsInput + connect?: DailyQuizWhereUniqueInput + update?: XOR, DailyQuizUncheckedUpdateWithoutSubmissionsInput> + } + + export type UserCreateNestedOneWithoutGoldenCardsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutGoldenCardsInput + connect?: UserWhereUniqueInput + } + + export type DailyQuizCreateNestedOneWithoutAwardedCardsInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutAwardedCardsInput + connect?: DailyQuizWhereUniqueInput + } + + export type PlayerCreateNestedOneWithoutGoldenCardsInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutGoldenCardsInput + connect?: PlayerWhereUniqueInput + } + + export type TeamPlayerCreateNestedOneWithoutGoldenCardInput = { + create?: XOR + connectOrCreate?: TeamPlayerCreateOrConnectWithoutGoldenCardInput + connect?: TeamPlayerWhereUniqueInput + } + + export type TeamPlayerUncheckedCreateNestedOneWithoutGoldenCardInput = { + create?: XOR + connectOrCreate?: TeamPlayerCreateOrConnectWithoutGoldenCardInput + connect?: TeamPlayerWhereUniqueInput + } + + export type EnumGoldenCardStatusFieldUpdateOperationsInput = { + set?: $Enums.GoldenCardStatus + } + + export type EnumSpecialCardStateFieldUpdateOperationsInput = { + set?: $Enums.SpecialCardState + } + + export type UserUpdateOneRequiredWithoutGoldenCardsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutGoldenCardsInput + upsert?: UserUpsertWithoutGoldenCardsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutGoldenCardsInput> + } + + export type DailyQuizUpdateOneWithoutAwardedCardsNestedInput = { + create?: XOR + connectOrCreate?: DailyQuizCreateOrConnectWithoutAwardedCardsInput + upsert?: DailyQuizUpsertWithoutAwardedCardsInput + disconnect?: DailyQuizWhereInput | boolean + delete?: DailyQuizWhereInput | boolean + connect?: DailyQuizWhereUniqueInput + update?: XOR, DailyQuizUncheckedUpdateWithoutAwardedCardsInput> + } + + export type PlayerUpdateOneRequiredWithoutGoldenCardsNestedInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutGoldenCardsInput + upsert?: PlayerUpsertWithoutGoldenCardsInput + connect?: PlayerWhereUniqueInput + update?: XOR, PlayerUncheckedUpdateWithoutGoldenCardsInput> + } + + export type TeamPlayerUpdateOneWithoutGoldenCardNestedInput = { + create?: XOR + connectOrCreate?: TeamPlayerCreateOrConnectWithoutGoldenCardInput + upsert?: TeamPlayerUpsertWithoutGoldenCardInput + disconnect?: TeamPlayerWhereInput | boolean + delete?: TeamPlayerWhereInput | boolean + connect?: TeamPlayerWhereUniqueInput + update?: XOR, TeamPlayerUncheckedUpdateWithoutGoldenCardInput> + } + + export type TeamPlayerUncheckedUpdateOneWithoutGoldenCardNestedInput = { + create?: XOR + connectOrCreate?: TeamPlayerCreateOrConnectWithoutGoldenCardInput + upsert?: TeamPlayerUpsertWithoutGoldenCardInput + disconnect?: TeamPlayerWhereInput | boolean + delete?: TeamPlayerWhereInput | boolean + connect?: TeamPlayerWhereUniqueInput + update?: XOR, TeamPlayerUncheckedUpdateWithoutGoldenCardInput> + } + + export type UserCreateNestedOneWithoutSessionsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSessionsInput + connect?: UserWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutSessionsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSessionsInput + upsert?: UserUpsertWithoutSessionsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutSessionsInput> + } + + export type UserCreateNestedOneWithoutTeamInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutTeamInput + connect?: UserWhereUniqueInput + } + + export type TeamPlayerCreateNestedManyWithoutTeamInput = { + create?: XOR | TeamPlayerCreateWithoutTeamInput[] | TeamPlayerUncheckedCreateWithoutTeamInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutTeamInput | TeamPlayerCreateOrConnectWithoutTeamInput[] + createMany?: TeamPlayerCreateManyTeamInputEnvelope + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + } + + export type TeamPlayerUncheckedCreateNestedManyWithoutTeamInput = { + create?: XOR | TeamPlayerCreateWithoutTeamInput[] | TeamPlayerUncheckedCreateWithoutTeamInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutTeamInput | TeamPlayerCreateOrConnectWithoutTeamInput[] + createMany?: TeamPlayerCreateManyTeamInputEnvelope + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + } + + export type EnumTeamStatusFieldUpdateOperationsInput = { + set?: $Enums.TeamStatus + } + + export type UserUpdateOneRequiredWithoutTeamNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutTeamInput + upsert?: UserUpsertWithoutTeamInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutTeamInput> + } + + export type TeamPlayerUpdateManyWithoutTeamNestedInput = { + create?: XOR | TeamPlayerCreateWithoutTeamInput[] | TeamPlayerUncheckedCreateWithoutTeamInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutTeamInput | TeamPlayerCreateOrConnectWithoutTeamInput[] + upsert?: TeamPlayerUpsertWithWhereUniqueWithoutTeamInput | TeamPlayerUpsertWithWhereUniqueWithoutTeamInput[] + createMany?: TeamPlayerCreateManyTeamInputEnvelope + set?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + disconnect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + delete?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + update?: TeamPlayerUpdateWithWhereUniqueWithoutTeamInput | TeamPlayerUpdateWithWhereUniqueWithoutTeamInput[] + updateMany?: TeamPlayerUpdateManyWithWhereWithoutTeamInput | TeamPlayerUpdateManyWithWhereWithoutTeamInput[] + deleteMany?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + } + + export type TeamPlayerUncheckedUpdateManyWithoutTeamNestedInput = { + create?: XOR | TeamPlayerCreateWithoutTeamInput[] | TeamPlayerUncheckedCreateWithoutTeamInput[] + connectOrCreate?: TeamPlayerCreateOrConnectWithoutTeamInput | TeamPlayerCreateOrConnectWithoutTeamInput[] + upsert?: TeamPlayerUpsertWithWhereUniqueWithoutTeamInput | TeamPlayerUpsertWithWhereUniqueWithoutTeamInput[] + createMany?: TeamPlayerCreateManyTeamInputEnvelope + set?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + disconnect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + delete?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + connect?: TeamPlayerWhereUniqueInput | TeamPlayerWhereUniqueInput[] + update?: TeamPlayerUpdateWithWhereUniqueWithoutTeamInput | TeamPlayerUpdateWithWhereUniqueWithoutTeamInput[] + updateMany?: TeamPlayerUpdateManyWithWhereWithoutTeamInput | TeamPlayerUpdateManyWithWhereWithoutTeamInput[] + deleteMany?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + } + + export type TeamCreateNestedOneWithoutPlayersInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutPlayersInput + connect?: TeamWhereUniqueInput + } + + export type PlayerCreateNestedOneWithoutTeamPlayersInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutTeamPlayersInput + connect?: PlayerWhereUniqueInput + } + + export type GoldenCardCreateNestedOneWithoutTeamPlayerInput = { + create?: XOR + connectOrCreate?: GoldenCardCreateOrConnectWithoutTeamPlayerInput + connect?: GoldenCardWhereUniqueInput + } + + export type TeamUpdateOneRequiredWithoutPlayersNestedInput = { + create?: XOR + connectOrCreate?: TeamCreateOrConnectWithoutPlayersInput + upsert?: TeamUpsertWithoutPlayersInput + connect?: TeamWhereUniqueInput + update?: XOR, TeamUncheckedUpdateWithoutPlayersInput> + } + + export type PlayerUpdateOneRequiredWithoutTeamPlayersNestedInput = { + create?: XOR + connectOrCreate?: PlayerCreateOrConnectWithoutTeamPlayersInput + upsert?: PlayerUpsertWithoutTeamPlayersInput + connect?: PlayerWhereUniqueInput + update?: XOR, PlayerUncheckedUpdateWithoutTeamPlayersInput> + } + + export type GoldenCardUpdateOneWithoutTeamPlayerNestedInput = { + create?: XOR + connectOrCreate?: GoldenCardCreateOrConnectWithoutTeamPlayerInput + upsert?: GoldenCardUpsertWithoutTeamPlayerInput + disconnect?: GoldenCardWhereInput | boolean + delete?: GoldenCardWhereInput | boolean + connect?: GoldenCardWhereUniqueInput + update?: XOR, GoldenCardUncheckedUpdateWithoutTeamPlayerInput> + } + + export type PaymentCreateNestedManyWithoutPackageInput = { + create?: XOR | PaymentCreateWithoutPackageInput[] | PaymentUncheckedCreateWithoutPackageInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutPackageInput | PaymentCreateOrConnectWithoutPackageInput[] + createMany?: PaymentCreateManyPackageInputEnvelope + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + } + + export type PaymentUncheckedCreateNestedManyWithoutPackageInput = { + create?: XOR | PaymentCreateWithoutPackageInput[] | PaymentUncheckedCreateWithoutPackageInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutPackageInput | PaymentCreateOrConnectWithoutPackageInput[] + createMany?: PaymentCreateManyPackageInputEnvelope + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + } + + export type PaymentUpdateManyWithoutPackageNestedInput = { + create?: XOR | PaymentCreateWithoutPackageInput[] | PaymentUncheckedCreateWithoutPackageInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutPackageInput | PaymentCreateOrConnectWithoutPackageInput[] + upsert?: PaymentUpsertWithWhereUniqueWithoutPackageInput | PaymentUpsertWithWhereUniqueWithoutPackageInput[] + createMany?: PaymentCreateManyPackageInputEnvelope + set?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + disconnect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + delete?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + update?: PaymentUpdateWithWhereUniqueWithoutPackageInput | PaymentUpdateWithWhereUniqueWithoutPackageInput[] + updateMany?: PaymentUpdateManyWithWhereWithoutPackageInput | PaymentUpdateManyWithWhereWithoutPackageInput[] + deleteMany?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + } + + export type PaymentUncheckedUpdateManyWithoutPackageNestedInput = { + create?: XOR | PaymentCreateWithoutPackageInput[] | PaymentUncheckedCreateWithoutPackageInput[] + connectOrCreate?: PaymentCreateOrConnectWithoutPackageInput | PaymentCreateOrConnectWithoutPackageInput[] + upsert?: PaymentUpsertWithWhereUniqueWithoutPackageInput | PaymentUpsertWithWhereUniqueWithoutPackageInput[] + createMany?: PaymentCreateManyPackageInputEnvelope + set?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + disconnect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + delete?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + connect?: PaymentWhereUniqueInput | PaymentWhereUniqueInput[] + update?: PaymentUpdateWithWhereUniqueWithoutPackageInput | PaymentUpdateWithWhereUniqueWithoutPackageInput[] + updateMany?: PaymentUpdateManyWithWhereWithoutPackageInput | PaymentUpdateManyWithWhereWithoutPackageInput[] + deleteMany?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + } + + export type UserCreateNestedOneWithoutPaymentsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutPaymentsInput + connect?: UserWhereUniqueInput + } + + export type PackageCreateNestedOneWithoutPaymentsInput = { + create?: XOR + connectOrCreate?: PackageCreateOrConnectWithoutPaymentsInput + connect?: PackageWhereUniqueInput + } + + export type EnumPaymentStatusFieldUpdateOperationsInput = { + set?: $Enums.PaymentStatus + } + + export type UserUpdateOneRequiredWithoutPaymentsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutPaymentsInput + upsert?: UserUpsertWithoutPaymentsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutPaymentsInput> + } + + export type PackageUpdateOneRequiredWithoutPaymentsNestedInput = { + create?: XOR + connectOrCreate?: PackageCreateOrConnectWithoutPaymentsInput + upsert?: PackageUpsertWithoutPaymentsInput + connect?: PackageWhereUniqueInput + update?: XOR, PackageUncheckedUpdateWithoutPaymentsInput> + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringFilter<$PrismaModel> | string + } + + export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedEnumPositionFilter<$PrismaModel = never> = { + equals?: $Enums.Position | EnumPositionFieldRefInput<$PrismaModel> + in?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + notIn?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + not?: NestedEnumPositionFilter<$PrismaModel> | $Enums.Position + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedEnumCardTierFilter<$PrismaModel = never> = { + equals?: $Enums.CardTier | EnumCardTierFieldRefInput<$PrismaModel> + in?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + notIn?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + not?: NestedEnumCardTierFilter<$PrismaModel> | $Enums.CardTier + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type NestedEnumPositionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Position | EnumPositionFieldRefInput<$PrismaModel> + in?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + notIn?: $Enums.Position[] | ListEnumPositionFieldRefInput<$PrismaModel> + not?: NestedEnumPositionWithAggregatesFilter<$PrismaModel> | $Enums.Position + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPositionFilter<$PrismaModel> + _max?: NestedEnumPositionFilter<$PrismaModel> + } + + export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedEnumCardTierWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.CardTier | EnumCardTierFieldRefInput<$PrismaModel> + in?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + notIn?: $Enums.CardTier[] | ListEnumCardTierFieldRefInput<$PrismaModel> + not?: NestedEnumCardTierWithAggregatesFilter<$PrismaModel> | $Enums.CardTier + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumCardTierFilter<$PrismaModel> + _max?: NestedEnumCardTierFilter<$PrismaModel> + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type NestedEnumMatchStageFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStage | EnumMatchStageFieldRefInput<$PrismaModel> + in?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStageFilter<$PrismaModel> | $Enums.MatchStage + } + + export type NestedEnumMatchStatusFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStatus | EnumMatchStatusFieldRefInput<$PrismaModel> + in?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStatusFilter<$PrismaModel> | $Enums.MatchStatus + } + + export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NestedEnumMatchStageWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStage | EnumMatchStageFieldRefInput<$PrismaModel> + in?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStage[] | ListEnumMatchStageFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStageWithAggregatesFilter<$PrismaModel> | $Enums.MatchStage + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumMatchStageFilter<$PrismaModel> + _max?: NestedEnumMatchStageFilter<$PrismaModel> + } + + export type NestedEnumMatchStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.MatchStatus | EnumMatchStatusFieldRefInput<$PrismaModel> + in?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.MatchStatus[] | ListEnumMatchStatusFieldRefInput<$PrismaModel> + not?: NestedEnumMatchStatusWithAggregatesFilter<$PrismaModel> | $Enums.MatchStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumMatchStatusFilter<$PrismaModel> + _max?: NestedEnumMatchStatusFilter<$PrismaModel> + } + + export type NestedEnumEventTypeFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + not?: NestedEnumEventTypeFilter<$PrismaModel> | $Enums.EventType + } + + export type NestedEnumEventTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.EventType[] | ListEnumEventTypeFieldRefInput<$PrismaModel> + not?: NestedEnumEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumEventTypeFilter<$PrismaModel> + _max?: NestedEnumEventTypeFilter<$PrismaModel> + } + + export type NestedEnumRoleFilter<$PrismaModel = never> = { + equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + not?: NestedEnumRoleFilter<$PrismaModel> | $Enums.Role + } + + export type NestedEnumRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.Role[] | ListEnumRoleFieldRefInput<$PrismaModel> + not?: NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumRoleFilter<$PrismaModel> + _max?: NestedEnumRoleFilter<$PrismaModel> + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type NestedEnumGoldenCardStatusFilter<$PrismaModel = never> = { + equals?: $Enums.GoldenCardStatus | EnumGoldenCardStatusFieldRefInput<$PrismaModel> + in?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + not?: NestedEnumGoldenCardStatusFilter<$PrismaModel> | $Enums.GoldenCardStatus + } + + export type NestedEnumSpecialCardStateFilter<$PrismaModel = never> = { + equals?: $Enums.SpecialCardState | EnumSpecialCardStateFieldRefInput<$PrismaModel> + in?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + notIn?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + not?: NestedEnumSpecialCardStateFilter<$PrismaModel> | $Enums.SpecialCardState + } + + export type NestedEnumGoldenCardStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.GoldenCardStatus | EnumGoldenCardStatusFieldRefInput<$PrismaModel> + in?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.GoldenCardStatus[] | ListEnumGoldenCardStatusFieldRefInput<$PrismaModel> + not?: NestedEnumGoldenCardStatusWithAggregatesFilter<$PrismaModel> | $Enums.GoldenCardStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumGoldenCardStatusFilter<$PrismaModel> + _max?: NestedEnumGoldenCardStatusFilter<$PrismaModel> + } + + export type NestedEnumSpecialCardStateWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SpecialCardState | EnumSpecialCardStateFieldRefInput<$PrismaModel> + in?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + notIn?: $Enums.SpecialCardState[] | ListEnumSpecialCardStateFieldRefInput<$PrismaModel> + not?: NestedEnumSpecialCardStateWithAggregatesFilter<$PrismaModel> | $Enums.SpecialCardState + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSpecialCardStateFilter<$PrismaModel> + _max?: NestedEnumSpecialCardStateFilter<$PrismaModel> + } + + export type NestedEnumTeamStatusFilter<$PrismaModel = never> = { + equals?: $Enums.TeamStatus | EnumTeamStatusFieldRefInput<$PrismaModel> + in?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + not?: NestedEnumTeamStatusFilter<$PrismaModel> | $Enums.TeamStatus + } + + export type NestedEnumTeamStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.TeamStatus | EnumTeamStatusFieldRefInput<$PrismaModel> + in?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.TeamStatus[] | ListEnumTeamStatusFieldRefInput<$PrismaModel> + not?: NestedEnumTeamStatusWithAggregatesFilter<$PrismaModel> | $Enums.TeamStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumTeamStatusFilter<$PrismaModel> + _max?: NestedEnumTeamStatusFilter<$PrismaModel> + } + + export type NestedEnumPaymentStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PaymentStatus | EnumPaymentStatusFieldRefInput<$PrismaModel> + in?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPaymentStatusFilter<$PrismaModel> | $Enums.PaymentStatus + } + + export type NestedEnumPaymentStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PaymentStatus | EnumPaymentStatusFieldRefInput<$PrismaModel> + in?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PaymentStatus[] | ListEnumPaymentStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPaymentStatusWithAggregatesFilter<$PrismaModel> | $Enums.PaymentStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPaymentStatusFilter<$PrismaModel> + _max?: NestedEnumPaymentStatusFilter<$PrismaModel> + } + + export type GroupCreateWithoutCountriesInput = { + id?: string + name: string + } + + export type GroupUncheckedCreateWithoutCountriesInput = { + id?: string + name: string + } + + export type GroupCreateOrConnectWithoutCountriesInput = { + where: GroupWhereUniqueInput + create: XOR + } + + export type PlayerCreateWithoutCountryInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerCreateNestedManyWithoutPlayerInput + events?: MatchEventCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateWithoutCountryInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput + events?: MatchEventUncheckedCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerCreateOrConnectWithoutCountryInput = { + where: PlayerWhereUniqueInput + create: XOR + } + + export type PlayerCreateManyCountryInputEnvelope = { + data: PlayerCreateManyCountryInput | PlayerCreateManyCountryInput[] + skipDuplicates?: boolean + } + + export type MatchCreateWithoutHomeTeamInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + events?: MatchEventCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutHomeTeamInput = { + id?: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutHomeTeamInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type MatchCreateManyHomeTeamInputEnvelope = { + data: MatchCreateManyHomeTeamInput | MatchCreateManyHomeTeamInput[] + skipDuplicates?: boolean + } + + export type MatchCreateWithoutAwayTeamInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + events?: MatchEventCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutAwayTeamInput = { + id?: string + homeTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutAwayTeamInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type MatchCreateManyAwayTeamInputEnvelope = { + data: MatchCreateManyAwayTeamInput | MatchCreateManyAwayTeamInput[] + skipDuplicates?: boolean + } + + export type GroupUpsertWithoutCountriesInput = { + update: XOR + create: XOR + where?: GroupWhereInput + } + + export type GroupUpdateToOneWithWhereWithoutCountriesInput = { + where?: GroupWhereInput + data: XOR + } + + export type GroupUpdateWithoutCountriesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type GroupUncheckedUpdateWithoutCountriesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type PlayerUpsertWithWhereUniqueWithoutCountryInput = { + where: PlayerWhereUniqueInput + update: XOR + create: XOR + } + + export type PlayerUpdateWithWhereUniqueWithoutCountryInput = { + where: PlayerWhereUniqueInput + data: XOR + } + + export type PlayerUpdateManyWithWhereWithoutCountryInput = { + where: PlayerScalarWhereInput + data: XOR + } + + export type PlayerScalarWhereInput = { + AND?: PlayerScalarWhereInput | PlayerScalarWhereInput[] + OR?: PlayerScalarWhereInput[] + NOT?: PlayerScalarWhereInput | PlayerScalarWhereInput[] + id?: StringFilter<"Player"> | string + name?: StringFilter<"Player"> | string + image?: StringNullableFilter<"Player"> | string | null + position?: EnumPositionFilter<"Player"> | $Enums.Position + countryId?: StringFilter<"Player"> | string + price?: FloatFilter<"Player"> | number + totalPoints?: IntFilter<"Player"> | number + isActive?: BoolFilter<"Player"> | boolean + isGoldenCardEligible?: BoolFilter<"Player"> | boolean + cardTier?: EnumCardTierFilter<"Player"> | $Enums.CardTier + createdAt?: DateTimeFilter<"Player"> | Date | string + updatedAt?: DateTimeFilter<"Player"> | Date | string + } + + export type MatchUpsertWithWhereUniqueWithoutHomeTeamInput = { + where: MatchWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchUpdateWithWhereUniqueWithoutHomeTeamInput = { + where: MatchWhereUniqueInput + data: XOR + } + + export type MatchUpdateManyWithWhereWithoutHomeTeamInput = { + where: MatchScalarWhereInput + data: XOR + } + + export type MatchScalarWhereInput = { + AND?: MatchScalarWhereInput | MatchScalarWhereInput[] + OR?: MatchScalarWhereInput[] + NOT?: MatchScalarWhereInput | MatchScalarWhereInput[] + id?: StringFilter<"Match"> | string + homeTeamId?: StringFilter<"Match"> | string + awayTeamId?: StringFilter<"Match"> | string + homeScore?: IntNullableFilter<"Match"> | number | null + awayScore?: IntNullableFilter<"Match"> | number | null + stage?: EnumMatchStageFilter<"Match"> | $Enums.MatchStage + status?: EnumMatchStatusFilter<"Match"> | $Enums.MatchStatus + matchDate?: DateTimeFilter<"Match"> | Date | string + matchDatePersian?: StringNullableFilter<"Match"> | string | null + stadium?: StringNullableFilter<"Match"> | string | null + city?: StringNullableFilter<"Match"> | string | null + referee?: StringNullableFilter<"Match"> | string | null + assistant1?: StringNullableFilter<"Match"> | string | null + assistant2?: StringNullableFilter<"Match"> | string | null + fourthOfficial?: StringNullableFilter<"Match"> | string | null + attendance?: IntNullableFilter<"Match"> | number | null + weather?: StringNullableFilter<"Match"> | string | null + description?: StringNullableFilter<"Match"> | string | null + roundId?: StringNullableFilter<"Match"> | string | null + createdAt?: DateTimeFilter<"Match"> | Date | string + } + + export type MatchUpsertWithWhereUniqueWithoutAwayTeamInput = { + where: MatchWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchUpdateWithWhereUniqueWithoutAwayTeamInput = { + where: MatchWhereUniqueInput + data: XOR + } + + export type MatchUpdateManyWithWhereWithoutAwayTeamInput = { + where: MatchScalarWhereInput + data: XOR + } + + export type CountryCreateWithoutGroupInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + players?: PlayerCreateNestedManyWithoutCountryInput + homeMatches?: MatchCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchCreateNestedManyWithoutAwayTeamInput + } + + export type CountryUncheckedCreateWithoutGroupInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + players?: PlayerUncheckedCreateNestedManyWithoutCountryInput + homeMatches?: MatchUncheckedCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchUncheckedCreateNestedManyWithoutAwayTeamInput + } + + export type CountryCreateOrConnectWithoutGroupInput = { + where: CountryWhereUniqueInput + create: XOR + } + + export type CountryCreateManyGroupInputEnvelope = { + data: CountryCreateManyGroupInput | CountryCreateManyGroupInput[] + skipDuplicates?: boolean + } + + export type CountryUpsertWithWhereUniqueWithoutGroupInput = { + where: CountryWhereUniqueInput + update: XOR + create: XOR + } + + export type CountryUpdateWithWhereUniqueWithoutGroupInput = { + where: CountryWhereUniqueInput + data: XOR + } + + export type CountryUpdateManyWithWhereWithoutGroupInput = { + where: CountryScalarWhereInput + data: XOR + } + + export type CountryScalarWhereInput = { + AND?: CountryScalarWhereInput | CountryScalarWhereInput[] + OR?: CountryScalarWhereInput[] + NOT?: CountryScalarWhereInput | CountryScalarWhereInput[] + id?: StringFilter<"Country"> | string + name?: StringFilter<"Country"> | string + code?: StringFilter<"Country"> | string + flagUrl?: StringNullableFilter<"Country"> | string | null + flagImage?: StringNullableFilter<"Country"> | string | null + confederation?: StringNullableFilter<"Country"> | string | null + qualificationMethod?: StringNullableFilter<"Country"> | string | null + qualificationDate?: StringNullableFilter<"Country"> | string | null + participationHistory?: StringNullableFilter<"Country"> | string | null + bestResult?: StringNullableFilter<"Country"> | string | null + description?: StringNullableFilter<"Country"> | string | null + defaultFormation?: StringFilter<"Country"> | string + defaultLineupPlayerIds?: StringNullableListFilter<"Country"> + defaultCaptainId?: StringNullableFilter<"Country"> | string | null + groupId?: StringNullableFilter<"Country"> | string | null + isEliminated?: BoolFilter<"Country"> | boolean + } + + export type CountryCreateWithoutPlayersInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + group?: GroupCreateNestedOneWithoutCountriesInput + homeMatches?: MatchCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchCreateNestedManyWithoutAwayTeamInput + } + + export type CountryUncheckedCreateWithoutPlayersInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + groupId?: string | null + isEliminated?: boolean + homeMatches?: MatchUncheckedCreateNestedManyWithoutHomeTeamInput + awayMatches?: MatchUncheckedCreateNestedManyWithoutAwayTeamInput + } + + export type CountryCreateOrConnectWithoutPlayersInput = { + where: CountryWhereUniqueInput + create: XOR + } + + export type PlayerMatchStatCreateWithoutPlayerInput = { + id?: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + match: MatchCreateNestedOneWithoutPlayerStatsInput + } + + export type PlayerMatchStatUncheckedCreateWithoutPlayerInput = { + id?: string + matchId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type PlayerMatchStatCreateOrConnectWithoutPlayerInput = { + where: PlayerMatchStatWhereUniqueInput + create: XOR + } + + export type PlayerMatchStatCreateManyPlayerInputEnvelope = { + data: PlayerMatchStatCreateManyPlayerInput | PlayerMatchStatCreateManyPlayerInput[] + skipDuplicates?: boolean + } + + export type TeamPlayerCreateWithoutPlayerInput = { + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + team: TeamCreateNestedOneWithoutPlayersInput + goldenCard?: GoldenCardCreateNestedOneWithoutTeamPlayerInput + } + + export type TeamPlayerUncheckedCreateWithoutPlayerInput = { + teamId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerCreateOrConnectWithoutPlayerInput = { + where: TeamPlayerWhereUniqueInput + create: XOR + } + + export type TeamPlayerCreateManyPlayerInputEnvelope = { + data: TeamPlayerCreateManyPlayerInput | TeamPlayerCreateManyPlayerInput[] + skipDuplicates?: boolean + } + + export type MatchEventCreateWithoutPlayerInput = { + id?: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + match: MatchCreateNestedOneWithoutEventsInput + } + + export type MatchEventUncheckedCreateWithoutPlayerInput = { + id?: string + matchId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type MatchEventCreateOrConnectWithoutPlayerInput = { + where: MatchEventWhereUniqueInput + create: XOR + } + + export type MatchEventCreateManyPlayerInputEnvelope = { + data: MatchEventCreateManyPlayerInput | MatchEventCreateManyPlayerInput[] + skipDuplicates?: boolean + } + + export type GoldenCardCreateWithoutPlayerInput = { + id?: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + user: UserCreateNestedOneWithoutGoldenCardsInput + quiz?: DailyQuizCreateNestedOneWithoutAwardedCardsInput + teamPlayer?: TeamPlayerCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardUncheckedCreateWithoutPlayerInput = { + id?: string + userId: string + quizId?: string | null + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + teamPlayer?: TeamPlayerUncheckedCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardCreateOrConnectWithoutPlayerInput = { + where: GoldenCardWhereUniqueInput + create: XOR + } + + export type GoldenCardCreateManyPlayerInputEnvelope = { + data: GoldenCardCreateManyPlayerInput | GoldenCardCreateManyPlayerInput[] + skipDuplicates?: boolean + } + + export type CountryUpsertWithoutPlayersInput = { + update: XOR + create: XOR + where?: CountryWhereInput + } + + export type CountryUpdateToOneWithWhereWithoutPlayersInput = { + where?: CountryWhereInput + data: XOR + } + + export type CountryUpdateWithoutPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + group?: GroupUpdateOneWithoutCountriesNestedInput + homeMatches?: MatchUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUncheckedUpdateWithoutPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + groupId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + homeMatches?: MatchUncheckedUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUncheckedUpdateManyWithoutAwayTeamNestedInput + } + + export type PlayerMatchStatUpsertWithWhereUniqueWithoutPlayerInput = { + where: PlayerMatchStatWhereUniqueInput + update: XOR + create: XOR + } + + export type PlayerMatchStatUpdateWithWhereUniqueWithoutPlayerInput = { + where: PlayerMatchStatWhereUniqueInput + data: XOR + } + + export type PlayerMatchStatUpdateManyWithWhereWithoutPlayerInput = { + where: PlayerMatchStatScalarWhereInput + data: XOR + } + + export type PlayerMatchStatScalarWhereInput = { + AND?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + OR?: PlayerMatchStatScalarWhereInput[] + NOT?: PlayerMatchStatScalarWhereInput | PlayerMatchStatScalarWhereInput[] + id?: StringFilter<"PlayerMatchStat"> | string + playerId?: StringFilter<"PlayerMatchStat"> | string + matchId?: StringFilter<"PlayerMatchStat"> | string + goals?: IntFilter<"PlayerMatchStat"> | number + assists?: IntFilter<"PlayerMatchStat"> | number + yellowCards?: IntFilter<"PlayerMatchStat"> | number + redCards?: IntFilter<"PlayerMatchStat"> | number + minutesPlayed?: IntFilter<"PlayerMatchStat"> | number + cleanSheet?: BoolFilter<"PlayerMatchStat"> | boolean + penaltySaved?: IntFilter<"PlayerMatchStat"> | number + penaltyMissed?: IntFilter<"PlayerMatchStat"> | number + ownGoals?: IntFilter<"PlayerMatchStat"> | number + isMotm?: BoolFilter<"PlayerMatchStat"> | boolean + extraTimeBonus?: IntFilter<"PlayerMatchStat"> | number + points?: IntFilter<"PlayerMatchStat"> | number + } + + export type TeamPlayerUpsertWithWhereUniqueWithoutPlayerInput = { + where: TeamPlayerWhereUniqueInput + update: XOR + create: XOR + } + + export type TeamPlayerUpdateWithWhereUniqueWithoutPlayerInput = { + where: TeamPlayerWhereUniqueInput + data: XOR + } + + export type TeamPlayerUpdateManyWithWhereWithoutPlayerInput = { + where: TeamPlayerScalarWhereInput + data: XOR + } + + export type TeamPlayerScalarWhereInput = { + AND?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + OR?: TeamPlayerScalarWhereInput[] + NOT?: TeamPlayerScalarWhereInput | TeamPlayerScalarWhereInput[] + teamId?: StringFilter<"TeamPlayer"> | string + playerId?: StringFilter<"TeamPlayer"> | string + goldenCardId?: StringNullableFilter<"TeamPlayer"> | string | null + isCaptain?: BoolFilter<"TeamPlayer"> | boolean + isViceCaptain?: BoolFilter<"TeamPlayer"> | boolean + isBench?: BoolFilter<"TeamPlayer"> | boolean + positionIndex?: IntFilter<"TeamPlayer"> | number + } + + export type MatchEventUpsertWithWhereUniqueWithoutPlayerInput = { + where: MatchEventWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchEventUpdateWithWhereUniqueWithoutPlayerInput = { + where: MatchEventWhereUniqueInput + data: XOR + } + + export type MatchEventUpdateManyWithWhereWithoutPlayerInput = { + where: MatchEventScalarWhereInput + data: XOR + } + + export type MatchEventScalarWhereInput = { + AND?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + OR?: MatchEventScalarWhereInput[] + NOT?: MatchEventScalarWhereInput | MatchEventScalarWhereInput[] + id?: StringFilter<"MatchEvent"> | string + matchId?: StringFilter<"MatchEvent"> | string + playerId?: StringFilter<"MatchEvent"> | string + type?: EnumEventTypeFilter<"MatchEvent"> | $Enums.EventType + minute?: IntNullableFilter<"MatchEvent"> | number | null + extraInfo?: StringNullableFilter<"MatchEvent"> | string | null + createdAt?: DateTimeFilter<"MatchEvent"> | Date | string + } + + export type GoldenCardUpsertWithWhereUniqueWithoutPlayerInput = { + where: GoldenCardWhereUniqueInput + update: XOR + create: XOR + } + + export type GoldenCardUpdateWithWhereUniqueWithoutPlayerInput = { + where: GoldenCardWhereUniqueInput + data: XOR + } + + export type GoldenCardUpdateManyWithWhereWithoutPlayerInput = { + where: GoldenCardScalarWhereInput + data: XOR + } + + export type GoldenCardScalarWhereInput = { + AND?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + OR?: GoldenCardScalarWhereInput[] + NOT?: GoldenCardScalarWhereInput | GoldenCardScalarWhereInput[] + id?: StringFilter<"GoldenCard"> | string + userId?: StringFilter<"GoldenCard"> | string + quizId?: StringNullableFilter<"GoldenCard"> | string | null + playerId?: StringFilter<"GoldenCard"> | string + cardTier?: EnumCardTierFilter<"GoldenCard"> | $Enums.CardTier + status?: EnumGoldenCardStatusFilter<"GoldenCard"> | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFilter<"GoldenCard"> | $Enums.SpecialCardState + acquiredDate?: DateTimeFilter<"GoldenCard"> | Date | string + openedAt?: DateTimeNullableFilter<"GoldenCard"> | Date | string | null + } + + export type CountryCreateWithoutHomeMatchesInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + group?: GroupCreateNestedOneWithoutCountriesInput + players?: PlayerCreateNestedManyWithoutCountryInput + awayMatches?: MatchCreateNestedManyWithoutAwayTeamInput + } + + export type CountryUncheckedCreateWithoutHomeMatchesInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + groupId?: string | null + isEliminated?: boolean + players?: PlayerUncheckedCreateNestedManyWithoutCountryInput + awayMatches?: MatchUncheckedCreateNestedManyWithoutAwayTeamInput + } + + export type CountryCreateOrConnectWithoutHomeMatchesInput = { + where: CountryWhereUniqueInput + create: XOR + } + + export type CountryCreateWithoutAwayMatchesInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + group?: GroupCreateNestedOneWithoutCountriesInput + players?: PlayerCreateNestedManyWithoutCountryInput + homeMatches?: MatchCreateNestedManyWithoutHomeTeamInput + } + + export type CountryUncheckedCreateWithoutAwayMatchesInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + groupId?: string | null + isEliminated?: boolean + players?: PlayerUncheckedCreateNestedManyWithoutCountryInput + homeMatches?: MatchUncheckedCreateNestedManyWithoutHomeTeamInput + } + + export type CountryCreateOrConnectWithoutAwayMatchesInput = { + where: CountryWhereUniqueInput + create: XOR + } + + export type RoundCreateWithoutMatchesInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type RoundUncheckedCreateWithoutMatchesInput = { + id?: string + number: number + name: string + isActive?: boolean + deadline: Date | string + createdAt?: Date | string + } + + export type RoundCreateOrConnectWithoutMatchesInput = { + where: RoundWhereUniqueInput + create: XOR + } + + export type PlayerMatchStatCreateWithoutMatchInput = { + id?: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + player: PlayerCreateNestedOneWithoutMatchStatsInput + } + + export type PlayerMatchStatUncheckedCreateWithoutMatchInput = { + id?: string + playerId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type PlayerMatchStatCreateOrConnectWithoutMatchInput = { + where: PlayerMatchStatWhereUniqueInput + create: XOR + } + + export type PlayerMatchStatCreateManyMatchInputEnvelope = { + data: PlayerMatchStatCreateManyMatchInput | PlayerMatchStatCreateManyMatchInput[] + skipDuplicates?: boolean + } + + export type MatchEventCreateWithoutMatchInput = { + id?: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + player: PlayerCreateNestedOneWithoutEventsInput + } + + export type MatchEventUncheckedCreateWithoutMatchInput = { + id?: string + playerId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type MatchEventCreateOrConnectWithoutMatchInput = { + where: MatchEventWhereUniqueInput + create: XOR + } + + export type MatchEventCreateManyMatchInputEnvelope = { + data: MatchEventCreateManyMatchInput | MatchEventCreateManyMatchInput[] + skipDuplicates?: boolean + } + + export type MatchLineupCreateWithoutMatchInput = { + id?: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + } + + export type MatchLineupUncheckedCreateWithoutMatchInput = { + id?: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + } + + export type MatchLineupCreateOrConnectWithoutMatchInput = { + where: MatchLineupWhereUniqueInput + create: XOR + } + + export type MatchLineupCreateManyMatchInputEnvelope = { + data: MatchLineupCreateManyMatchInput | MatchLineupCreateManyMatchInput[] + skipDuplicates?: boolean + } + + export type CountryUpsertWithoutHomeMatchesInput = { + update: XOR + create: XOR + where?: CountryWhereInput + } + + export type CountryUpdateToOneWithWhereWithoutHomeMatchesInput = { + where?: CountryWhereInput + data: XOR + } + + export type CountryUpdateWithoutHomeMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + group?: GroupUpdateOneWithoutCountriesNestedInput + players?: PlayerUpdateManyWithoutCountryNestedInput + awayMatches?: MatchUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUncheckedUpdateWithoutHomeMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + groupId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + players?: PlayerUncheckedUpdateManyWithoutCountryNestedInput + awayMatches?: MatchUncheckedUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUpsertWithoutAwayMatchesInput = { + update: XOR + create: XOR + where?: CountryWhereInput + } + + export type CountryUpdateToOneWithWhereWithoutAwayMatchesInput = { + where?: CountryWhereInput + data: XOR + } + + export type CountryUpdateWithoutAwayMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + group?: GroupUpdateOneWithoutCountriesNestedInput + players?: PlayerUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUpdateManyWithoutHomeTeamNestedInput + } + + export type CountryUncheckedUpdateWithoutAwayMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + groupId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + players?: PlayerUncheckedUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUncheckedUpdateManyWithoutHomeTeamNestedInput + } + + export type RoundUpsertWithoutMatchesInput = { + update: XOR + create: XOR + where?: RoundWhereInput + } + + export type RoundUpdateToOneWithWhereWithoutMatchesInput = { + where?: RoundWhereInput + data: XOR + } + + export type RoundUpdateWithoutMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type RoundUncheckedUpdateWithoutMatchesInput = { + id?: StringFieldUpdateOperationsInput | string + number?: IntFieldUpdateOperationsInput | number + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + deadline?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PlayerMatchStatUpsertWithWhereUniqueWithoutMatchInput = { + where: PlayerMatchStatWhereUniqueInput + update: XOR + create: XOR + } + + export type PlayerMatchStatUpdateWithWhereUniqueWithoutMatchInput = { + where: PlayerMatchStatWhereUniqueInput + data: XOR + } + + export type PlayerMatchStatUpdateManyWithWhereWithoutMatchInput = { + where: PlayerMatchStatScalarWhereInput + data: XOR + } + + export type MatchEventUpsertWithWhereUniqueWithoutMatchInput = { + where: MatchEventWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchEventUpdateWithWhereUniqueWithoutMatchInput = { + where: MatchEventWhereUniqueInput + data: XOR + } + + export type MatchEventUpdateManyWithWhereWithoutMatchInput = { + where: MatchEventScalarWhereInput + data: XOR + } + + export type MatchLineupUpsertWithWhereUniqueWithoutMatchInput = { + where: MatchLineupWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchLineupUpdateWithWhereUniqueWithoutMatchInput = { + where: MatchLineupWhereUniqueInput + data: XOR + } + + export type MatchLineupUpdateManyWithWhereWithoutMatchInput = { + where: MatchLineupScalarWhereInput + data: XOR + } + + export type MatchLineupScalarWhereInput = { + AND?: MatchLineupScalarWhereInput | MatchLineupScalarWhereInput[] + OR?: MatchLineupScalarWhereInput[] + NOT?: MatchLineupScalarWhereInput | MatchLineupScalarWhereInput[] + id?: StringFilter<"MatchLineup"> | string + matchId?: StringFilter<"MatchLineup"> | string + countryId?: StringFilter<"MatchLineup"> | string + formation?: StringFilter<"MatchLineup"> | string + playerIds?: StringNullableListFilter<"MatchLineup"> + } + + export type MatchCreateWithoutRoundInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + events?: MatchEventCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutRoundInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutRoundInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type MatchCreateManyRoundInputEnvelope = { + data: MatchCreateManyRoundInput | MatchCreateManyRoundInput[] + skipDuplicates?: boolean + } + + export type MatchUpsertWithWhereUniqueWithoutRoundInput = { + where: MatchWhereUniqueInput + update: XOR + create: XOR + } + + export type MatchUpdateWithWhereUniqueWithoutRoundInput = { + where: MatchWhereUniqueInput + data: XOR + } + + export type MatchUpdateManyWithWhereWithoutRoundInput = { + where: MatchScalarWhereInput + data: XOR + } + + export type MatchCreateWithoutEventsInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutEventsInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutEventsInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type PlayerCreateWithoutEventsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + country: CountryCreateNestedOneWithoutPlayersInput + matchStats?: PlayerMatchStatCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateWithoutEventsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerCreateOrConnectWithoutEventsInput = { + where: PlayerWhereUniqueInput + create: XOR + } + + export type MatchUpsertWithoutEventsInput = { + update: XOR + create: XOR + where?: MatchWhereInput + } + + export type MatchUpdateToOneWithWhereWithoutEventsInput = { + where?: MatchWhereInput + data: XOR + } + + export type MatchUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type PlayerUpsertWithoutEventsInput = { + update: XOR + create: XOR + where?: PlayerWhereInput + } + + export type PlayerUpdateToOneWithWhereWithoutEventsInput = { + where?: PlayerWhereInput + data: XOR + } + + export type PlayerUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + country?: CountryUpdateOneRequiredWithoutPlayersNestedInput + matchStats?: PlayerMatchStatUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateWithoutEventsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type MatchCreateWithoutLineupsInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + playerStats?: PlayerMatchStatCreateNestedManyWithoutMatchInput + events?: MatchEventCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutLineupsInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + playerStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutMatchInput + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutLineupsInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type MatchUpsertWithoutLineupsInput = { + update: XOR + create: XOR + where?: MatchWhereInput + } + + export type MatchUpdateToOneWithWhereWithoutLineupsInput = { + where?: MatchWhereInput + data: XOR + } + + export type MatchUpdateWithoutLineupsInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutLineupsInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + } + + export type PlayerCreateWithoutMatchStatsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + country: CountryCreateNestedOneWithoutPlayersInput + teamPlayers?: TeamPlayerCreateNestedManyWithoutPlayerInput + events?: MatchEventCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateWithoutMatchStatsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + teamPlayers?: TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput + events?: MatchEventUncheckedCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerCreateOrConnectWithoutMatchStatsInput = { + where: PlayerWhereUniqueInput + create: XOR + } + + export type MatchCreateWithoutPlayerStatsInput = { + id?: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + homeTeam: CountryCreateNestedOneWithoutHomeMatchesInput + awayTeam: CountryCreateNestedOneWithoutAwayMatchesInput + round?: RoundCreateNestedOneWithoutMatchesInput + events?: MatchEventCreateNestedManyWithoutMatchInput + lineups?: MatchLineupCreateNestedManyWithoutMatchInput + } + + export type MatchUncheckedCreateWithoutPlayerStatsInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + events?: MatchEventUncheckedCreateNestedManyWithoutMatchInput + lineups?: MatchLineupUncheckedCreateNestedManyWithoutMatchInput + } + + export type MatchCreateOrConnectWithoutPlayerStatsInput = { + where: MatchWhereUniqueInput + create: XOR + } + + export type PlayerUpsertWithoutMatchStatsInput = { + update: XOR + create: XOR + where?: PlayerWhereInput + } + + export type PlayerUpdateToOneWithWhereWithoutMatchStatsInput = { + where?: PlayerWhereInput + data: XOR + } + + export type PlayerUpdateWithoutMatchStatsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + country?: CountryUpdateOneRequiredWithoutPlayersNestedInput + teamPlayers?: TeamPlayerUpdateManyWithoutPlayerNestedInput + events?: MatchEventUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateWithoutMatchStatsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + teamPlayers?: TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput + events?: MatchEventUncheckedUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type MatchUpsertWithoutPlayerStatsInput = { + update: XOR + create: XOR + where?: MatchWhereInput + } + + export type MatchUpdateToOneWithWhereWithoutPlayerStatsInput = { + where?: MatchWhereInput + data: XOR + } + + export type MatchUpdateWithoutPlayerStatsInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutPlayerStatsInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type TeamCreateWithoutUserInput = { + id?: string + name: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + players?: TeamPlayerCreateNestedManyWithoutTeamInput + } + + export type TeamUncheckedCreateWithoutUserInput = { + id?: string + name: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + players?: TeamPlayerUncheckedCreateNestedManyWithoutTeamInput + } + + export type TeamCreateOrConnectWithoutUserInput = { + where: TeamWhereUniqueInput + create: XOR + } + + export type SessionCreateWithoutUserInput = { + id?: string + sessionToken: string + expires: Date | string + } + + export type SessionUncheckedCreateWithoutUserInput = { + id?: string + sessionToken: string + expires: Date | string + } + + export type SessionCreateOrConnectWithoutUserInput = { + where: SessionWhereUniqueInput + create: XOR + } + + export type SessionCreateManyUserInputEnvelope = { + data: SessionCreateManyUserInput | SessionCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type PaymentCreateWithoutUserInput = { + id?: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + package: PackageCreateNestedOneWithoutPaymentsInput + } + + export type PaymentUncheckedCreateWithoutUserInput = { + id?: string + packageId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PaymentCreateOrConnectWithoutUserInput = { + where: PaymentWhereUniqueInput + create: XOR + } + + export type PaymentCreateManyUserInputEnvelope = { + data: PaymentCreateManyUserInput | PaymentCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type QuizSubmissionCreateWithoutUserInput = { + id?: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + quiz: DailyQuizCreateNestedOneWithoutSubmissionsInput + } + + export type QuizSubmissionUncheckedCreateWithoutUserInput = { + id?: string + quizId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type QuizSubmissionCreateOrConnectWithoutUserInput = { + where: QuizSubmissionWhereUniqueInput + create: XOR + } + + export type QuizSubmissionCreateManyUserInputEnvelope = { + data: QuizSubmissionCreateManyUserInput | QuizSubmissionCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type GoldenCardCreateWithoutUserInput = { + id?: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + quiz?: DailyQuizCreateNestedOneWithoutAwardedCardsInput + player: PlayerCreateNestedOneWithoutGoldenCardsInput + teamPlayer?: TeamPlayerCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardUncheckedCreateWithoutUserInput = { + id?: string + quizId?: string | null + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + teamPlayer?: TeamPlayerUncheckedCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardCreateOrConnectWithoutUserInput = { + where: GoldenCardWhereUniqueInput + create: XOR + } + + export type GoldenCardCreateManyUserInputEnvelope = { + data: GoldenCardCreateManyUserInput | GoldenCardCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type TeamUpsertWithoutUserInput = { + update: XOR + create: XOR + where?: TeamWhereInput + } + + export type TeamUpdateToOneWithWhereWithoutUserInput = { + where?: TeamWhereInput + data: XOR + } + + export type TeamUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + players?: TeamPlayerUpdateManyWithoutTeamNestedInput + } + + export type TeamUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + players?: TeamPlayerUncheckedUpdateManyWithoutTeamNestedInput + } + + export type SessionUpsertWithWhereUniqueWithoutUserInput = { + where: SessionWhereUniqueInput + update: XOR + create: XOR + } + + export type SessionUpdateWithWhereUniqueWithoutUserInput = { + where: SessionWhereUniqueInput + data: XOR + } + + export type SessionUpdateManyWithWhereWithoutUserInput = { + where: SessionScalarWhereInput + data: XOR + } + + export type SessionScalarWhereInput = { + AND?: SessionScalarWhereInput | SessionScalarWhereInput[] + OR?: SessionScalarWhereInput[] + NOT?: SessionScalarWhereInput | SessionScalarWhereInput[] + id?: StringFilter<"Session"> | string + sessionToken?: StringFilter<"Session"> | string + userId?: StringFilter<"Session"> | string + expires?: DateTimeFilter<"Session"> | Date | string + } + + export type PaymentUpsertWithWhereUniqueWithoutUserInput = { + where: PaymentWhereUniqueInput + update: XOR + create: XOR + } + + export type PaymentUpdateWithWhereUniqueWithoutUserInput = { + where: PaymentWhereUniqueInput + data: XOR + } + + export type PaymentUpdateManyWithWhereWithoutUserInput = { + where: PaymentScalarWhereInput + data: XOR + } + + export type PaymentScalarWhereInput = { + AND?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + OR?: PaymentScalarWhereInput[] + NOT?: PaymentScalarWhereInput | PaymentScalarWhereInput[] + id?: StringFilter<"Payment"> | string + userId?: StringFilter<"Payment"> | string + packageId?: StringFilter<"Payment"> | string + amount?: IntFilter<"Payment"> | number + authority?: StringNullableFilter<"Payment"> | string | null + refId?: StringNullableFilter<"Payment"> | string | null + status?: EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus + createdAt?: DateTimeFilter<"Payment"> | Date | string + updatedAt?: DateTimeFilter<"Payment"> | Date | string + } + + export type QuizSubmissionUpsertWithWhereUniqueWithoutUserInput = { + where: QuizSubmissionWhereUniqueInput + update: XOR + create: XOR + } + + export type QuizSubmissionUpdateWithWhereUniqueWithoutUserInput = { + where: QuizSubmissionWhereUniqueInput + data: XOR + } + + export type QuizSubmissionUpdateManyWithWhereWithoutUserInput = { + where: QuizSubmissionScalarWhereInput + data: XOR + } + + export type QuizSubmissionScalarWhereInput = { + AND?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + OR?: QuizSubmissionScalarWhereInput[] + NOT?: QuizSubmissionScalarWhereInput | QuizSubmissionScalarWhereInput[] + id?: StringFilter<"QuizSubmission"> | string + userId?: StringFilter<"QuizSubmission"> | string + quizId?: StringFilter<"QuizSubmission"> | string + answers?: IntNullableListFilter<"QuizSubmission"> + correctAnswers?: IntFilter<"QuizSubmission"> | number + score?: IntFilter<"QuizSubmission"> | number + submittedAt?: DateTimeFilter<"QuizSubmission"> | Date | string + } + + export type GoldenCardUpsertWithWhereUniqueWithoutUserInput = { + where: GoldenCardWhereUniqueInput + update: XOR + create: XOR + } + + export type GoldenCardUpdateWithWhereUniqueWithoutUserInput = { + where: GoldenCardWhereUniqueInput + data: XOR + } + + export type GoldenCardUpdateManyWithWhereWithoutUserInput = { + where: GoldenCardScalarWhereInput + data: XOR + } + + export type QuizQuestionCreateWithoutQuizInput = { + id?: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + } + + export type QuizQuestionUncheckedCreateWithoutQuizInput = { + id?: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + } + + export type QuizQuestionCreateOrConnectWithoutQuizInput = { + where: QuizQuestionWhereUniqueInput + create: XOR + } + + export type QuizQuestionCreateManyQuizInputEnvelope = { + data: QuizQuestionCreateManyQuizInput | QuizQuestionCreateManyQuizInput[] + skipDuplicates?: boolean + } + + export type QuizSubmissionCreateWithoutQuizInput = { + id?: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + user: UserCreateNestedOneWithoutQuizSubmissionsInput + } + + export type QuizSubmissionUncheckedCreateWithoutQuizInput = { + id?: string + userId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type QuizSubmissionCreateOrConnectWithoutQuizInput = { + where: QuizSubmissionWhereUniqueInput + create: XOR + } + + export type QuizSubmissionCreateManyQuizInputEnvelope = { + data: QuizSubmissionCreateManyQuizInput | QuizSubmissionCreateManyQuizInput[] + skipDuplicates?: boolean + } + + export type GoldenCardCreateWithoutQuizInput = { + id?: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + user: UserCreateNestedOneWithoutGoldenCardsInput + player: PlayerCreateNestedOneWithoutGoldenCardsInput + teamPlayer?: TeamPlayerCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardUncheckedCreateWithoutQuizInput = { + id?: string + userId: string + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + teamPlayer?: TeamPlayerUncheckedCreateNestedOneWithoutGoldenCardInput + } + + export type GoldenCardCreateOrConnectWithoutQuizInput = { + where: GoldenCardWhereUniqueInput + create: XOR + } + + export type GoldenCardCreateManyQuizInputEnvelope = { + data: GoldenCardCreateManyQuizInput | GoldenCardCreateManyQuizInput[] + skipDuplicates?: boolean + } + + export type QuizQuestionUpsertWithWhereUniqueWithoutQuizInput = { + where: QuizQuestionWhereUniqueInput + update: XOR + create: XOR + } + + export type QuizQuestionUpdateWithWhereUniqueWithoutQuizInput = { + where: QuizQuestionWhereUniqueInput + data: XOR + } + + export type QuizQuestionUpdateManyWithWhereWithoutQuizInput = { + where: QuizQuestionScalarWhereInput + data: XOR + } + + export type QuizQuestionScalarWhereInput = { + AND?: QuizQuestionScalarWhereInput | QuizQuestionScalarWhereInput[] + OR?: QuizQuestionScalarWhereInput[] + NOT?: QuizQuestionScalarWhereInput | QuizQuestionScalarWhereInput[] + id?: StringFilter<"QuizQuestion"> | string + quizId?: StringFilter<"QuizQuestion"> | string + questionText?: StringFilter<"QuizQuestion"> | string + options?: StringNullableListFilter<"QuizQuestion"> + correctAnswer?: IntFilter<"QuizQuestion"> | number + order?: IntFilter<"QuizQuestion"> | number + } + + export type QuizSubmissionUpsertWithWhereUniqueWithoutQuizInput = { + where: QuizSubmissionWhereUniqueInput + update: XOR + create: XOR + } + + export type QuizSubmissionUpdateWithWhereUniqueWithoutQuizInput = { + where: QuizSubmissionWhereUniqueInput + data: XOR + } + + export type QuizSubmissionUpdateManyWithWhereWithoutQuizInput = { + where: QuizSubmissionScalarWhereInput + data: XOR + } + + export type GoldenCardUpsertWithWhereUniqueWithoutQuizInput = { + where: GoldenCardWhereUniqueInput + update: XOR + create: XOR + } + + export type GoldenCardUpdateWithWhereUniqueWithoutQuizInput = { + where: GoldenCardWhereUniqueInput + data: XOR + } + + export type GoldenCardUpdateManyWithWhereWithoutQuizInput = { + where: GoldenCardScalarWhereInput + data: XOR + } + + export type DailyQuizCreateWithoutQuestionsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + submissions?: QuizSubmissionCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardCreateNestedManyWithoutQuizInput + } + + export type DailyQuizUncheckedCreateWithoutQuestionsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + submissions?: QuizSubmissionUncheckedCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardUncheckedCreateNestedManyWithoutQuizInput + } + + export type DailyQuizCreateOrConnectWithoutQuestionsInput = { + where: DailyQuizWhereUniqueInput + create: XOR + } + + export type DailyQuizUpsertWithoutQuestionsInput = { + update: XOR + create: XOR + where?: DailyQuizWhereInput + } + + export type DailyQuizUpdateToOneWithWhereWithoutQuestionsInput = { + where?: DailyQuizWhereInput + data: XOR + } + + export type DailyQuizUpdateWithoutQuestionsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + submissions?: QuizSubmissionUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUpdateManyWithoutQuizNestedInput + } + + export type DailyQuizUncheckedUpdateWithoutQuestionsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + submissions?: QuizSubmissionUncheckedUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUncheckedUpdateManyWithoutQuizNestedInput + } + + export type UserCreateWithoutQuizSubmissionsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamCreateNestedOneWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + payments?: PaymentCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutQuizSubmissionsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamUncheckedCreateNestedOneWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + payments?: PaymentUncheckedCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutQuizSubmissionsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type DailyQuizCreateWithoutSubmissionsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardCreateNestedManyWithoutQuizInput + } + + export type DailyQuizUncheckedCreateWithoutSubmissionsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionUncheckedCreateNestedManyWithoutQuizInput + awardedCards?: GoldenCardUncheckedCreateNestedManyWithoutQuizInput + } + + export type DailyQuizCreateOrConnectWithoutSubmissionsInput = { + where: DailyQuizWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutQuizSubmissionsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutQuizSubmissionsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutQuizSubmissionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUpdateOneWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + payments?: PaymentUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutQuizSubmissionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUncheckedUpdateOneWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + payments?: PaymentUncheckedUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutUserNestedInput + } + + export type DailyQuizUpsertWithoutSubmissionsInput = { + update: XOR + create: XOR + where?: DailyQuizWhereInput + } + + export type DailyQuizUpdateToOneWithWhereWithoutSubmissionsInput = { + where?: DailyQuizWhereInput + data: XOR + } + + export type DailyQuizUpdateWithoutSubmissionsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUpdateManyWithoutQuizNestedInput + } + + export type DailyQuizUncheckedUpdateWithoutSubmissionsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUncheckedUpdateManyWithoutQuizNestedInput + awardedCards?: GoldenCardUncheckedUpdateManyWithoutQuizNestedInput + } + + export type UserCreateWithoutGoldenCardsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamCreateNestedOneWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + payments?: PaymentCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutGoldenCardsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamUncheckedCreateNestedOneWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + payments?: PaymentUncheckedCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutGoldenCardsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type DailyQuizCreateWithoutAwardedCardsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionCreateNestedManyWithoutQuizInput + submissions?: QuizSubmissionCreateNestedManyWithoutQuizInput + } + + export type DailyQuizUncheckedCreateWithoutAwardedCardsInput = { + id?: string + date: Date | string + windowStart: Date | string + windowEnd: Date | string + goldWinnersCount?: number + silverWinnersCount?: number + bronzeWinnersCount?: number + goldMinCorrect?: number | null + silverMinCorrect?: number | null + bronzeMinCorrect?: number | null + isProcessed?: boolean + createdAt?: Date | string + questions?: QuizQuestionUncheckedCreateNestedManyWithoutQuizInput + submissions?: QuizSubmissionUncheckedCreateNestedManyWithoutQuizInput + } + + export type DailyQuizCreateOrConnectWithoutAwardedCardsInput = { + where: DailyQuizWhereUniqueInput + create: XOR + } + + export type PlayerCreateWithoutGoldenCardsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + country: CountryCreateNestedOneWithoutPlayersInput + matchStats?: PlayerMatchStatCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerCreateNestedManyWithoutPlayerInput + events?: MatchEventCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateWithoutGoldenCardsInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput + teamPlayers?: TeamPlayerUncheckedCreateNestedManyWithoutPlayerInput + events?: MatchEventUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerCreateOrConnectWithoutGoldenCardsInput = { + where: PlayerWhereUniqueInput + create: XOR + } + + export type TeamPlayerCreateWithoutGoldenCardInput = { + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + team: TeamCreateNestedOneWithoutPlayersInput + player: PlayerCreateNestedOneWithoutTeamPlayersInput + } + + export type TeamPlayerUncheckedCreateWithoutGoldenCardInput = { + teamId: string + playerId: string + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerCreateOrConnectWithoutGoldenCardInput = { + where: TeamPlayerWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutGoldenCardsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutGoldenCardsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutGoldenCardsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUpdateOneWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + payments?: PaymentUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutGoldenCardsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUncheckedUpdateOneWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + payments?: PaymentUncheckedUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput + } + + export type DailyQuizUpsertWithoutAwardedCardsInput = { + update: XOR + create: XOR + where?: DailyQuizWhereInput + } + + export type DailyQuizUpdateToOneWithWhereWithoutAwardedCardsInput = { + where?: DailyQuizWhereInput + data: XOR + } + + export type DailyQuizUpdateWithoutAwardedCardsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUpdateManyWithoutQuizNestedInput + submissions?: QuizSubmissionUpdateManyWithoutQuizNestedInput + } + + export type DailyQuizUncheckedUpdateWithoutAwardedCardsInput = { + id?: StringFieldUpdateOperationsInput | string + date?: DateTimeFieldUpdateOperationsInput | Date | string + windowStart?: DateTimeFieldUpdateOperationsInput | Date | string + windowEnd?: DateTimeFieldUpdateOperationsInput | Date | string + goldWinnersCount?: IntFieldUpdateOperationsInput | number + silverWinnersCount?: IntFieldUpdateOperationsInput | number + bronzeWinnersCount?: IntFieldUpdateOperationsInput | number + goldMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + silverMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + bronzeMinCorrect?: NullableIntFieldUpdateOperationsInput | number | null + isProcessed?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + questions?: QuizQuestionUncheckedUpdateManyWithoutQuizNestedInput + submissions?: QuizSubmissionUncheckedUpdateManyWithoutQuizNestedInput + } + + export type PlayerUpsertWithoutGoldenCardsInput = { + update: XOR + create: XOR + where?: PlayerWhereInput + } + + export type PlayerUpdateToOneWithWhereWithoutGoldenCardsInput = { + where?: PlayerWhereInput + data: XOR + } + + export type PlayerUpdateWithoutGoldenCardsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + country?: CountryUpdateOneRequiredWithoutPlayersNestedInput + matchStats?: PlayerMatchStatUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUpdateManyWithoutPlayerNestedInput + events?: MatchEventUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateWithoutGoldenCardsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput + events?: MatchEventUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type TeamPlayerUpsertWithoutGoldenCardInput = { + update: XOR + create: XOR + where?: TeamPlayerWhereInput + } + + export type TeamPlayerUpdateToOneWithWhereWithoutGoldenCardInput = { + where?: TeamPlayerWhereInput + data: XOR + } + + export type TeamPlayerUpdateWithoutGoldenCardInput = { + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + team?: TeamUpdateOneRequiredWithoutPlayersNestedInput + player?: PlayerUpdateOneRequiredWithoutTeamPlayersNestedInput + } + + export type TeamPlayerUncheckedUpdateWithoutGoldenCardInput = { + teamId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type UserCreateWithoutSessionsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamCreateNestedOneWithoutUserInput + payments?: PaymentCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutSessionsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamUncheckedCreateNestedOneWithoutUserInput + payments?: PaymentUncheckedCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionUncheckedCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutSessionsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutSessionsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutSessionsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUpdateOneWithoutUserNestedInput + payments?: PaymentUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUncheckedUpdateOneWithoutUserNestedInput + payments?: PaymentUncheckedUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutUserNestedInput + } + + export type UserCreateWithoutTeamInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + sessions?: SessionCreateNestedManyWithoutUserInput + payments?: PaymentCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutTeamInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + payments?: PaymentUncheckedCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionUncheckedCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutTeamInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type TeamPlayerCreateWithoutTeamInput = { + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + player: PlayerCreateNestedOneWithoutTeamPlayersInput + goldenCard?: GoldenCardCreateNestedOneWithoutTeamPlayerInput + } + + export type TeamPlayerUncheckedCreateWithoutTeamInput = { + playerId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerCreateOrConnectWithoutTeamInput = { + where: TeamPlayerWhereUniqueInput + create: XOR + } + + export type TeamPlayerCreateManyTeamInputEnvelope = { + data: TeamPlayerCreateManyTeamInput | TeamPlayerCreateManyTeamInput[] + skipDuplicates?: boolean + } + + export type UserUpsertWithoutTeamInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutTeamInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutTeamInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + sessions?: SessionUpdateManyWithoutUserNestedInput + payments?: PaymentUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutTeamInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + payments?: PaymentUncheckedUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutUserNestedInput + } + + export type TeamPlayerUpsertWithWhereUniqueWithoutTeamInput = { + where: TeamPlayerWhereUniqueInput + update: XOR + create: XOR + } + + export type TeamPlayerUpdateWithWhereUniqueWithoutTeamInput = { + where: TeamPlayerWhereUniqueInput + data: XOR + } + + export type TeamPlayerUpdateManyWithWhereWithoutTeamInput = { + where: TeamPlayerScalarWhereInput + data: XOR + } + + export type TeamCreateWithoutPlayersInput = { + id?: string + name: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + user: UserCreateNestedOneWithoutTeamInput + } + + export type TeamUncheckedCreateWithoutPlayersInput = { + id?: string + name: string + userId: string + budget?: number + totalPoints?: number + formation?: string + status?: $Enums.TeamStatus + createdAt?: Date | string + } + + export type TeamCreateOrConnectWithoutPlayersInput = { + where: TeamWhereUniqueInput + create: XOR + } + + export type PlayerCreateWithoutTeamPlayersInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + country: CountryCreateNestedOneWithoutPlayersInput + matchStats?: PlayerMatchStatCreateNestedManyWithoutPlayerInput + events?: MatchEventCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardCreateNestedManyWithoutPlayerInput + } + + export type PlayerUncheckedCreateWithoutTeamPlayersInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + countryId: string + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + matchStats?: PlayerMatchStatUncheckedCreateNestedManyWithoutPlayerInput + events?: MatchEventUncheckedCreateNestedManyWithoutPlayerInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutPlayerInput + } + + export type PlayerCreateOrConnectWithoutTeamPlayersInput = { + where: PlayerWhereUniqueInput + create: XOR + } + + export type GoldenCardCreateWithoutTeamPlayerInput = { + id?: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + user: UserCreateNestedOneWithoutGoldenCardsInput + quiz?: DailyQuizCreateNestedOneWithoutAwardedCardsInput + player: PlayerCreateNestedOneWithoutGoldenCardsInput + } + + export type GoldenCardUncheckedCreateWithoutTeamPlayerInput = { + id?: string + userId: string + quizId?: string | null + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + } + + export type GoldenCardCreateOrConnectWithoutTeamPlayerInput = { + where: GoldenCardWhereUniqueInput + create: XOR + } + + export type TeamUpsertWithoutPlayersInput = { + update: XOR + create: XOR + where?: TeamWhereInput + } + + export type TeamUpdateToOneWithWhereWithoutPlayersInput = { + where?: TeamWhereInput + data: XOR + } + + export type TeamUpdateWithoutPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutTeamNestedInput + } + + export type TeamUncheckedUpdateWithoutPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + budget?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + formation?: StringFieldUpdateOperationsInput | string + status?: EnumTeamStatusFieldUpdateOperationsInput | $Enums.TeamStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PlayerUpsertWithoutTeamPlayersInput = { + update: XOR + create: XOR + where?: PlayerWhereInput + } + + export type PlayerUpdateToOneWithWhereWithoutTeamPlayersInput = { + where?: PlayerWhereInput + data: XOR + } + + export type PlayerUpdateWithoutTeamPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + country?: CountryUpdateOneRequiredWithoutPlayersNestedInput + matchStats?: PlayerMatchStatUpdateManyWithoutPlayerNestedInput + events?: MatchEventUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateWithoutTeamPlayersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + countryId?: StringFieldUpdateOperationsInput | string + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput + events?: MatchEventUncheckedUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type GoldenCardUpsertWithoutTeamPlayerInput = { + update: XOR + create: XOR + where?: GoldenCardWhereInput + } + + export type GoldenCardUpdateToOneWithWhereWithoutTeamPlayerInput = { + where?: GoldenCardWhereInput + data: XOR + } + + export type GoldenCardUpdateWithoutTeamPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutGoldenCardsNestedInput + quiz?: DailyQuizUpdateOneWithoutAwardedCardsNestedInput + player?: PlayerUpdateOneRequiredWithoutGoldenCardsNestedInput + } + + export type GoldenCardUncheckedUpdateWithoutTeamPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PaymentCreateWithoutPackageInput = { + id?: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutPaymentsInput + } + + export type PaymentUncheckedCreateWithoutPackageInput = { + id?: string + userId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PaymentCreateOrConnectWithoutPackageInput = { + where: PaymentWhereUniqueInput + create: XOR + } + + export type PaymentCreateManyPackageInputEnvelope = { + data: PaymentCreateManyPackageInput | PaymentCreateManyPackageInput[] + skipDuplicates?: boolean + } + + export type PaymentUpsertWithWhereUniqueWithoutPackageInput = { + where: PaymentWhereUniqueInput + update: XOR + create: XOR + } + + export type PaymentUpdateWithWhereUniqueWithoutPackageInput = { + where: PaymentWhereUniqueInput + data: XOR + } + + export type PaymentUpdateManyWithWhereWithoutPackageInput = { + where: PaymentScalarWhereInput + data: XOR + } + + export type UserCreateWithoutPaymentsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamCreateNestedOneWithoutUserInput + sessions?: SessionCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutPaymentsInput = { + id?: string + name?: string | null + email: string + phone?: string | null + password: string + role?: $Enums.Role + createdAt?: Date | string + team?: TeamUncheckedCreateNestedOneWithoutUserInput + sessions?: SessionUncheckedCreateNestedManyWithoutUserInput + quizSubmissions?: QuizSubmissionUncheckedCreateNestedManyWithoutUserInput + goldenCards?: GoldenCardUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutPaymentsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type PackageCreateWithoutPaymentsInput = { + id?: string + name: string + budgetBonus: number + price: number + description?: string | null + isActive?: boolean + } + + export type PackageUncheckedCreateWithoutPaymentsInput = { + id?: string + name: string + budgetBonus: number + price: number + description?: string | null + isActive?: boolean + } + + export type PackageCreateOrConnectWithoutPaymentsInput = { + where: PackageWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutPaymentsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutPaymentsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutPaymentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUpdateOneWithoutUserNestedInput + sessions?: SessionUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutPaymentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + email?: StringFieldUpdateOperationsInput | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + password?: StringFieldUpdateOperationsInput | string + role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + team?: TeamUncheckedUpdateOneWithoutUserNestedInput + sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput + quizSubmissions?: QuizSubmissionUncheckedUpdateManyWithoutUserNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutUserNestedInput + } + + export type PackageUpsertWithoutPaymentsInput = { + update: XOR + create: XOR + where?: PackageWhereInput + } + + export type PackageUpdateToOneWithWhereWithoutPaymentsInput = { + where?: PackageWhereInput + data: XOR + } + + export type PackageUpdateWithoutPaymentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type PackageUncheckedUpdateWithoutPaymentsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + budgetBonus?: FloatFieldUpdateOperationsInput | number + price?: IntFieldUpdateOperationsInput | number + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type PlayerCreateManyCountryInput = { + id?: string + name: string + image?: string | null + position: $Enums.Position + price?: number + totalPoints?: number + isActive?: boolean + isGoldenCardEligible?: boolean + cardTier?: $Enums.CardTier + createdAt?: Date | string + updatedAt?: Date | string + } + + export type MatchCreateManyHomeTeamInput = { + id?: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + } + + export type MatchCreateManyAwayTeamInput = { + id?: string + homeTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + roundId?: string | null + createdAt?: Date | string + } + + export type PlayerUpdateWithoutCountryInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUpdateManyWithoutPlayerNestedInput + events?: MatchEventUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateWithoutCountryInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + matchStats?: PlayerMatchStatUncheckedUpdateManyWithoutPlayerNestedInput + teamPlayers?: TeamPlayerUncheckedUpdateManyWithoutPlayerNestedInput + events?: MatchEventUncheckedUpdateManyWithoutPlayerNestedInput + goldenCards?: GoldenCardUncheckedUpdateManyWithoutPlayerNestedInput + } + + export type PlayerUncheckedUpdateManyWithoutCountryInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + image?: NullableStringFieldUpdateOperationsInput | string | null + position?: EnumPositionFieldUpdateOperationsInput | $Enums.Position + price?: FloatFieldUpdateOperationsInput | number + totalPoints?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + isGoldenCardEligible?: BoolFieldUpdateOperationsInput | boolean + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchUpdateWithoutHomeTeamInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutHomeTeamInput = { + id?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateManyWithoutHomeTeamInput = { + id?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchUpdateWithoutAwayTeamInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + round?: RoundUpdateOneWithoutMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutAwayTeamInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateManyWithoutAwayTeamInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + roundId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CountryCreateManyGroupInput = { + id?: string + name: string + code: string + flagUrl?: string | null + flagImage?: string | null + confederation?: string | null + qualificationMethod?: string | null + qualificationDate?: string | null + participationHistory?: string | null + bestResult?: string | null + description?: string | null + defaultFormation?: string + defaultLineupPlayerIds?: CountryCreatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: string | null + isEliminated?: boolean + } + + export type CountryUpdateWithoutGroupInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + players?: PlayerUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUncheckedUpdateWithoutGroupInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + players?: PlayerUncheckedUpdateManyWithoutCountryNestedInput + homeMatches?: MatchUncheckedUpdateManyWithoutHomeTeamNestedInput + awayMatches?: MatchUncheckedUpdateManyWithoutAwayTeamNestedInput + } + + export type CountryUncheckedUpdateManyWithoutGroupInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + flagUrl?: NullableStringFieldUpdateOperationsInput | string | null + flagImage?: NullableStringFieldUpdateOperationsInput | string | null + confederation?: NullableStringFieldUpdateOperationsInput | string | null + qualificationMethod?: NullableStringFieldUpdateOperationsInput | string | null + qualificationDate?: NullableStringFieldUpdateOperationsInput | string | null + participationHistory?: NullableStringFieldUpdateOperationsInput | string | null + bestResult?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + defaultFormation?: StringFieldUpdateOperationsInput | string + defaultLineupPlayerIds?: CountryUpdatedefaultLineupPlayerIdsInput | string[] + defaultCaptainId?: NullableStringFieldUpdateOperationsInput | string | null + isEliminated?: BoolFieldUpdateOperationsInput | boolean + } + + export type PlayerMatchStatCreateManyPlayerInput = { + id?: string + matchId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type TeamPlayerCreateManyPlayerInput = { + teamId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type MatchEventCreateManyPlayerInput = { + id?: string + matchId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type GoldenCardCreateManyPlayerInput = { + id?: string + userId: string + quizId?: string | null + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + } + + export type PlayerMatchStatUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + match?: MatchUpdateOneRequiredWithoutPlayerStatsNestedInput + } + + export type PlayerMatchStatUncheckedUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type PlayerMatchStatUncheckedUpdateManyWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type TeamPlayerUpdateWithoutPlayerInput = { + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + team?: TeamUpdateOneRequiredWithoutPlayersNestedInput + goldenCard?: GoldenCardUpdateOneWithoutTeamPlayerNestedInput + } + + export type TeamPlayerUncheckedUpdateWithoutPlayerInput = { + teamId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type TeamPlayerUncheckedUpdateManyWithoutPlayerInput = { + teamId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type MatchEventUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + match?: MatchUpdateOneRequiredWithoutEventsNestedInput + } + + export type MatchEventUncheckedUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchEventUncheckedUpdateManyWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + matchId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldenCardUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutGoldenCardsNestedInput + quiz?: DailyQuizUpdateOneWithoutAwardedCardsNestedInput + teamPlayer?: TeamPlayerUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + teamPlayer?: TeamPlayerUncheckedUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateManyWithoutPlayerInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PlayerMatchStatCreateManyMatchInput = { + id?: string + playerId: string + goals?: number + assists?: number + yellowCards?: number + redCards?: number + minutesPlayed?: number + cleanSheet?: boolean + penaltySaved?: number + penaltyMissed?: number + ownGoals?: number + isMotm?: boolean + extraTimeBonus?: number + points?: number + } + + export type MatchEventCreateManyMatchInput = { + id?: string + playerId: string + type: $Enums.EventType + minute?: number | null + extraInfo?: string | null + createdAt?: Date | string + } + + export type MatchLineupCreateManyMatchInput = { + id?: string + countryId: string + formation: string + playerIds?: MatchLineupCreateplayerIdsInput | string[] + } + + export type PlayerMatchStatUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + player?: PlayerUpdateOneRequiredWithoutMatchStatsNestedInput + } + + export type PlayerMatchStatUncheckedUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type PlayerMatchStatUncheckedUpdateManyWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + goals?: IntFieldUpdateOperationsInput | number + assists?: IntFieldUpdateOperationsInput | number + yellowCards?: IntFieldUpdateOperationsInput | number + redCards?: IntFieldUpdateOperationsInput | number + minutesPlayed?: IntFieldUpdateOperationsInput | number + cleanSheet?: BoolFieldUpdateOperationsInput | boolean + penaltySaved?: IntFieldUpdateOperationsInput | number + penaltyMissed?: IntFieldUpdateOperationsInput | number + ownGoals?: IntFieldUpdateOperationsInput | number + isMotm?: BoolFieldUpdateOperationsInput | boolean + extraTimeBonus?: IntFieldUpdateOperationsInput | number + points?: IntFieldUpdateOperationsInput | number + } + + export type MatchEventUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + player?: PlayerUpdateOneRequiredWithoutEventsNestedInput + } + + export type MatchEventUncheckedUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchEventUncheckedUpdateManyWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + type?: EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + minute?: NullableIntFieldUpdateOperationsInput | number | null + extraInfo?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MatchLineupUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type MatchLineupUncheckedUpdateWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type MatchLineupUncheckedUpdateManyWithoutMatchInput = { + id?: StringFieldUpdateOperationsInput | string + countryId?: StringFieldUpdateOperationsInput | string + formation?: StringFieldUpdateOperationsInput | string + playerIds?: MatchLineupUpdateplayerIdsInput | string[] + } + + export type MatchCreateManyRoundInput = { + id?: string + homeTeamId: string + awayTeamId: string + homeScore?: number | null + awayScore?: number | null + stage?: $Enums.MatchStage + status?: $Enums.MatchStatus + matchDate: Date | string + matchDatePersian?: string | null + stadium?: string | null + city?: string | null + referee?: string | null + assistant1?: string | null + assistant2?: string | null + fourthOfficial?: string | null + attendance?: number | null + weather?: string | null + description?: string | null + createdAt?: Date | string + } + + export type MatchUpdateWithoutRoundInput = { + id?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + homeTeam?: CountryUpdateOneRequiredWithoutHomeMatchesNestedInput + awayTeam?: CountryUpdateOneRequiredWithoutAwayMatchesNestedInput + playerStats?: PlayerMatchStatUpdateManyWithoutMatchNestedInput + events?: MatchEventUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateWithoutRoundInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + playerStats?: PlayerMatchStatUncheckedUpdateManyWithoutMatchNestedInput + events?: MatchEventUncheckedUpdateManyWithoutMatchNestedInput + lineups?: MatchLineupUncheckedUpdateManyWithoutMatchNestedInput + } + + export type MatchUncheckedUpdateManyWithoutRoundInput = { + id?: StringFieldUpdateOperationsInput | string + homeTeamId?: StringFieldUpdateOperationsInput | string + awayTeamId?: StringFieldUpdateOperationsInput | string + homeScore?: NullableIntFieldUpdateOperationsInput | number | null + awayScore?: NullableIntFieldUpdateOperationsInput | number | null + stage?: EnumMatchStageFieldUpdateOperationsInput | $Enums.MatchStage + status?: EnumMatchStatusFieldUpdateOperationsInput | $Enums.MatchStatus + matchDate?: DateTimeFieldUpdateOperationsInput | Date | string + matchDatePersian?: NullableStringFieldUpdateOperationsInput | string | null + stadium?: NullableStringFieldUpdateOperationsInput | string | null + city?: NullableStringFieldUpdateOperationsInput | string | null + referee?: NullableStringFieldUpdateOperationsInput | string | null + assistant1?: NullableStringFieldUpdateOperationsInput | string | null + assistant2?: NullableStringFieldUpdateOperationsInput | string | null + fourthOfficial?: NullableStringFieldUpdateOperationsInput | string | null + attendance?: NullableIntFieldUpdateOperationsInput | number | null + weather?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionCreateManyUserInput = { + id?: string + sessionToken: string + expires: Date | string + } + + export type PaymentCreateManyUserInput = { + id?: string + packageId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type QuizSubmissionCreateManyUserInput = { + id?: string + quizId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type GoldenCardCreateManyUserInput = { + id?: string + quizId?: string | null + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + } + + export type SessionUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SessionUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + sessionToken?: StringFieldUpdateOperationsInput | string + expires?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PaymentUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + package?: PackageUpdateOneRequiredWithoutPaymentsNestedInput + } + + export type PaymentUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + packageId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PaymentUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + packageId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizSubmissionUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + quiz?: DailyQuizUpdateOneRequiredWithoutSubmissionsNestedInput + } + + export type QuizSubmissionUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizSubmissionUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldenCardUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + quiz?: DailyQuizUpdateOneWithoutAwardedCardsNestedInput + player?: PlayerUpdateOneRequiredWithoutGoldenCardsNestedInput + teamPlayer?: TeamPlayerUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + teamPlayer?: TeamPlayerUncheckedUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + quizId?: NullableStringFieldUpdateOperationsInput | string | null + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type QuizQuestionCreateManyQuizInput = { + id?: string + questionText: string + options?: QuizQuestionCreateoptionsInput | string[] + correctAnswer: number + order?: number + } + + export type QuizSubmissionCreateManyQuizInput = { + id?: string + userId: string + answers?: QuizSubmissionCreateanswersInput | number[] + correctAnswers?: number + score?: number + submittedAt?: Date | string + } + + export type GoldenCardCreateManyQuizInput = { + id?: string + userId: string + playerId: string + cardTier?: $Enums.CardTier + status?: $Enums.GoldenCardStatus + state?: $Enums.SpecialCardState + acquiredDate?: Date | string + openedAt?: Date | string | null + } + + export type QuizQuestionUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizQuestionUncheckedUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizQuestionUncheckedUpdateManyWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + questionText?: StringFieldUpdateOperationsInput | string + options?: QuizQuestionUpdateoptionsInput | string[] + correctAnswer?: IntFieldUpdateOperationsInput | number + order?: IntFieldUpdateOperationsInput | number + } + + export type QuizSubmissionUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutQuizSubmissionsNestedInput + } + + export type QuizSubmissionUncheckedUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type QuizSubmissionUncheckedUpdateManyWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + answers?: QuizSubmissionUpdateanswersInput | number[] + correctAnswers?: IntFieldUpdateOperationsInput | number + score?: IntFieldUpdateOperationsInput | number + submittedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldenCardUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutGoldenCardsNestedInput + player?: PlayerUpdateOneRequiredWithoutGoldenCardsNestedInput + teamPlayer?: TeamPlayerUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + teamPlayer?: TeamPlayerUncheckedUpdateOneWithoutGoldenCardNestedInput + } + + export type GoldenCardUncheckedUpdateManyWithoutQuizInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + playerId?: StringFieldUpdateOperationsInput | string + cardTier?: EnumCardTierFieldUpdateOperationsInput | $Enums.CardTier + status?: EnumGoldenCardStatusFieldUpdateOperationsInput | $Enums.GoldenCardStatus + state?: EnumSpecialCardStateFieldUpdateOperationsInput | $Enums.SpecialCardState + acquiredDate?: DateTimeFieldUpdateOperationsInput | Date | string + openedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type TeamPlayerCreateManyTeamInput = { + playerId: string + goldenCardId?: string | null + isCaptain?: boolean + isViceCaptain?: boolean + isBench?: boolean + positionIndex?: number + } + + export type TeamPlayerUpdateWithoutTeamInput = { + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + player?: PlayerUpdateOneRequiredWithoutTeamPlayersNestedInput + goldenCard?: GoldenCardUpdateOneWithoutTeamPlayerNestedInput + } + + export type TeamPlayerUncheckedUpdateWithoutTeamInput = { + playerId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type TeamPlayerUncheckedUpdateManyWithoutTeamInput = { + playerId?: StringFieldUpdateOperationsInput | string + goldenCardId?: NullableStringFieldUpdateOperationsInput | string | null + isCaptain?: BoolFieldUpdateOperationsInput | boolean + isViceCaptain?: BoolFieldUpdateOperationsInput | boolean + isBench?: BoolFieldUpdateOperationsInput | boolean + positionIndex?: IntFieldUpdateOperationsInput | number + } + + export type PaymentCreateManyPackageInput = { + id?: string + userId: string + amount: number + authority?: string | null + refId?: string | null + status?: $Enums.PaymentStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PaymentUpdateWithoutPackageInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutPaymentsNestedInput + } + + export type PaymentUncheckedUpdateWithoutPackageInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PaymentUncheckedUpdateManyWithoutPackageInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + authority?: NullableStringFieldUpdateOperationsInput | string | null + refId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} \ No newline at end of file diff --git a/lib/generated/prisma/index.js b/lib/generated/prisma/index.js new file mode 100644 index 0000000..ead22a5 --- /dev/null +++ b/lib/generated/prisma/index.js @@ -0,0 +1,557 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/client.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ +Prisma.prismaVersion = { + client: "6.19.3", + engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + const path = require('path') + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CountryScalarFieldEnum = { + id: 'id', + name: 'name', + code: 'code', + flagUrl: 'flagUrl', + flagImage: 'flagImage', + confederation: 'confederation', + qualificationMethod: 'qualificationMethod', + qualificationDate: 'qualificationDate', + participationHistory: 'participationHistory', + bestResult: 'bestResult', + description: 'description', + defaultFormation: 'defaultFormation', + defaultLineupPlayerIds: 'defaultLineupPlayerIds', + defaultCaptainId: 'defaultCaptainId', + groupId: 'groupId', + isEliminated: 'isEliminated' +}; + +exports.Prisma.GroupScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.PlayerScalarFieldEnum = { + id: 'id', + name: 'name', + image: 'image', + position: 'position', + countryId: 'countryId', + price: 'price', + totalPoints: 'totalPoints', + isActive: 'isActive', + isGoldenCardEligible: 'isGoldenCardEligible', + cardTier: 'cardTier', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.MatchScalarFieldEnum = { + id: 'id', + homeTeamId: 'homeTeamId', + awayTeamId: 'awayTeamId', + homeScore: 'homeScore', + awayScore: 'awayScore', + stage: 'stage', + status: 'status', + matchDate: 'matchDate', + matchDatePersian: 'matchDatePersian', + stadium: 'stadium', + city: 'city', + referee: 'referee', + assistant1: 'assistant1', + assistant2: 'assistant2', + fourthOfficial: 'fourthOfficial', + attendance: 'attendance', + weather: 'weather', + description: 'description', + roundId: 'roundId', + createdAt: 'createdAt' +}; + +exports.Prisma.RoundScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.GameweekScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchEventScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + playerId: 'playerId', + type: 'type', + minute: 'minute', + extraInfo: 'extraInfo', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchLineupScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + countryId: 'countryId', + formation: 'formation', + playerIds: 'playerIds' +}; + +exports.Prisma.PlayerMatchStatScalarFieldEnum = { + id: 'id', + playerId: 'playerId', + matchId: 'matchId', + goals: 'goals', + assists: 'assists', + yellowCards: 'yellowCards', + redCards: 'redCards', + minutesPlayed: 'minutesPlayed', + cleanSheet: 'cleanSheet', + penaltySaved: 'penaltySaved', + penaltyMissed: 'penaltyMissed', + ownGoals: 'ownGoals', + isMotm: 'isMotm', + extraTimeBonus: 'extraTimeBonus', + points: 'points' +}; + +exports.Prisma.ScoringRuleScalarFieldEnum = { + id: 'id', + position: 'position', + eventType: 'eventType', + points: 'points', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + password: 'password', + role: 'role', + createdAt: 'createdAt' +}; + +exports.Prisma.LoginOtpScalarFieldEnum = { + id: 'id', + phone: 'phone', + codeHash: 'codeHash', + attempts: 'attempts', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.FantasyNewsScalarFieldEnum = { + id: 'id', + icon: 'icon', + title: 'title', + description: 'description', + newsTime: 'newsTime', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.DailyQuizScalarFieldEnum = { + id: 'id', + date: 'date', + windowStart: 'windowStart', + windowEnd: 'windowEnd', + goldWinnersCount: 'goldWinnersCount', + silverWinnersCount: 'silverWinnersCount', + bronzeWinnersCount: 'bronzeWinnersCount', + goldMinCorrect: 'goldMinCorrect', + silverMinCorrect: 'silverMinCorrect', + bronzeMinCorrect: 'bronzeMinCorrect', + isProcessed: 'isProcessed', + createdAt: 'createdAt' +}; + +exports.Prisma.QuizQuestionScalarFieldEnum = { + id: 'id', + quizId: 'quizId', + questionText: 'questionText', + options: 'options', + correctAnswer: 'correctAnswer', + order: 'order' +}; + +exports.Prisma.QuizSubmissionScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + answers: 'answers', + correctAnswers: 'correctAnswers', + score: 'score', + submittedAt: 'submittedAt' +}; + +exports.Prisma.GoldenCardScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + playerId: 'playerId', + cardTier: 'cardTier', + status: 'status', + state: 'state', + acquiredDate: 'acquiredDate', + openedAt: 'openedAt' +}; + +exports.Prisma.SessionScalarFieldEnum = { + id: 'id', + sessionToken: 'sessionToken', + userId: 'userId', + expires: 'expires' +}; + +exports.Prisma.TeamScalarFieldEnum = { + id: 'id', + name: 'name', + userId: 'userId', + budget: 'budget', + totalPoints: 'totalPoints', + formation: 'formation', + status: 'status', + createdAt: 'createdAt' +}; + +exports.Prisma.TeamPlayerScalarFieldEnum = { + teamId: 'teamId', + playerId: 'playerId', + goldenCardId: 'goldenCardId', + isCaptain: 'isCaptain', + isViceCaptain: 'isViceCaptain', + isBench: 'isBench', + positionIndex: 'positionIndex' +}; + +exports.Prisma.PackageScalarFieldEnum = { + id: 'id', + name: 'name', + budgetBonus: 'budgetBonus', + price: 'price', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.PaymentScalarFieldEnum = { + id: 'id', + userId: 'userId', + packageId: 'packageId', + amount: 'amount', + authority: 'authority', + refId: 'refId', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; +exports.Role = exports.$Enums.Role = { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +exports.Position = exports.$Enums.Position = { + GK: 'GK', + DEF: 'DEF', + MID: 'MID', + FWD: 'FWD' +}; + +exports.MatchStage = exports.$Enums.MatchStage = { + GROUP: 'GROUP', + ROUND_OF_16: 'ROUND_OF_16', + QUARTER_FINAL: 'QUARTER_FINAL', + SEMI_FINAL: 'SEMI_FINAL', + THIRD_PLACE: 'THIRD_PLACE', + FINAL: 'FINAL' +}; + +exports.MatchStatus = exports.$Enums.MatchStatus = { + SCHEDULED: 'SCHEDULED', + LIVE: 'LIVE', + FINISHED: 'FINISHED' +}; + +exports.TeamStatus = exports.$Enums.TeamStatus = { + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.PaymentStatus = exports.$Enums.PaymentStatus = { + PENDING: 'PENDING', + SUCCESS: 'SUCCESS', + FAILED: 'FAILED' +}; + +exports.CardTier = exports.$Enums.CardTier = { + BRONZE: 'BRONZE', + SILVER: 'SILVER', + GOLD: 'GOLD' +}; + +exports.EventType = exports.$Enums.EventType = { + GOAL: 'GOAL', + ASSIST: 'ASSIST', + YELLOW_CARD: 'YELLOW_CARD', + RED_CARD: 'RED_CARD', + SECOND_YELLOW: 'SECOND_YELLOW', + SUBSTITUTION_IN: 'SUBSTITUTION_IN', + SUBSTITUTION_OUT: 'SUBSTITUTION_OUT', + INJURY_NO_SUB: 'INJURY_NO_SUB', + CLEAN_SHEET: 'CLEAN_SHEET', + PENALTY_SAVED: 'PENALTY_SAVED', + PENALTY_MISSED: 'PENALTY_MISSED', + OWN_GOAL: 'OWN_GOAL', + EXTRA_TIME_BONUS: 'EXTRA_TIME_BONUS', + MOTM: 'MOTM' +}; + +exports.GoldenCardStatus = exports.$Enums.GoldenCardStatus = { + SEALED: 'SEALED', + OPENED: 'OPENED' +}; + +exports.SpecialCardState = exports.$Enums.SpecialCardState = { + IN_INVENTORY: 'IN_INVENTORY', + IN_TEAM: 'IN_TEAM', + SOLD: 'SOLD' +}; + +exports.Prisma.ModelName = { + Country: 'Country', + Group: 'Group', + Player: 'Player', + Match: 'Match', + Round: 'Round', + Gameweek: 'Gameweek', + MatchEvent: 'MatchEvent', + MatchLineup: 'MatchLineup', + PlayerMatchStat: 'PlayerMatchStat', + ScoringRule: 'ScoringRule', + User: 'User', + LoginOtp: 'LoginOtp', + FantasyNews: 'FantasyNews', + DailyQuiz: 'DailyQuiz', + QuizQuestion: 'QuizQuestion', + QuizSubmission: 'QuizSubmission', + GoldenCard: 'GoldenCard', + Session: 'Session', + Team: 'Team', + TeamPlayer: 'TeamPlayer', + Package: 'Package', + Payment: 'Payment' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "C:\\Users\\s.roosta\\Desktop\\football-next\\lib\\generated\\prisma", + "fromEnvVar": null + }, + "config": { + "engineType": "client" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + } + ], + "previewFeatures": [], + "sourceFilePath": "C:\\Users\\s.roosta\\Desktop\\football-next\\prisma\\schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": "../../../.env", + "schemaEnvPath": "../../../.env" + }, + "relativePath": "../../../prisma", + "clientVersion": "6.19.3", + "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n engineType = \"client\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum Role {\n USER\n ADMIN\n}\n\nenum Position {\n GK\n DEF\n MID\n FWD\n}\n\nenum MatchStage {\n GROUP\n ROUND_OF_16\n QUARTER_FINAL\n SEMI_FINAL\n THIRD_PLACE\n FINAL\n}\n\nenum MatchStatus {\n SCHEDULED\n LIVE\n FINISHED\n}\n\nenum TeamStatus {\n PENDING\n APPROVED\n REJECTED\n ACTIVE\n INACTIVE\n}\n\nenum PaymentStatus {\n PENDING\n SUCCESS\n FAILED\n}\n\nenum CardTier {\n BRONZE\n SILVER\n GOLD\n}\n\nenum EventType {\n GOAL\n ASSIST\n YELLOW_CARD\n RED_CARD\n SECOND_YELLOW\n SUBSTITUTION_IN\n SUBSTITUTION_OUT\n INJURY_NO_SUB\n CLEAN_SHEET\n PENALTY_SAVED\n PENALTY_MISSED\n OWN_GOAL\n EXTRA_TIME_BONUS\n MOTM\n}\n\nmodel Country {\n id String @id @default(cuid())\n name String @unique\n code String @unique\n flagUrl String?\n flagImage String? // نام فایل پرچم مثل Flag_of_Australia.webp\n confederation String? // کنفدراسیون (UEFA, AFC, CAF, ...)\n qualificationMethod String? // شیوه راه‌یابی\n qualificationDate String? // تاریخ راه‌یابی\n participationHistory String? // سابقه شرکت\n bestResult String? // بهترین نتیجه\n description String? @db.Text // توضیحات کامل\n defaultFormation String @default(\"4-3-3\")\n defaultLineupPlayerIds String[] @default([])\n defaultCaptainId String? // شناسه کاپیتان پیش‌فرض\n group Group? @relation(fields: [groupId], references: [id])\n groupId String?\n isEliminated Boolean @default(false)\n players Player[]\n homeMatches Match[] @relation(\"HomeTeam\")\n awayMatches Match[] @relation(\"AwayTeam\")\n}\n\nmodel Group {\n id String @id @default(cuid())\n name String @unique\n countries Country[]\n}\n\nmodel Player {\n id String @id @default(cuid())\n name String\n image String? // نام فایل تصویر در public/uploads/players/\n position Position\n countryId String\n country Country @relation(fields: [countryId], references: [id])\n price Float @default(5.0)\n totalPoints Int @default(0)\n isActive Boolean @default(true)\n isGoldenCardEligible Boolean @default(false)\n cardTier CardTier @default(BRONZE)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n matchStats PlayerMatchStat[]\n teamPlayers TeamPlayer[]\n events MatchEvent[]\n goldenCards GoldenCard[]\n}\n\nmodel Match {\n id String @id @default(cuid())\n homeTeamId String\n awayTeamId String\n homeTeam Country @relation(\"HomeTeam\", fields: [homeTeamId], references: [id])\n awayTeam Country @relation(\"AwayTeam\", fields: [awayTeamId], references: [id])\n homeScore Int?\n awayScore Int?\n stage MatchStage @default(GROUP)\n status MatchStatus @default(SCHEDULED)\n matchDate DateTime\n matchDatePersian String? // تاریخ شمسی\n stadium String? // نام ورزشگاه\n city String? // شهر\n referee String? // داور اصلی\n assistant1 String? // کمک داور 1\n assistant2 String? // کمک داور 2\n fourthOfficial String? // داور چهارم\n attendance Int? // تعداد تماشاگر\n weather String? // وضعیت آب و هوا\n description String? @db.Text // توضیحات بازی\n roundId String?\n round Round? @relation(fields: [roundId], references: [id])\n playerStats PlayerMatchStat[]\n events MatchEvent[]\n lineups MatchLineup[]\n createdAt DateTime @default(now())\n}\n\nmodel Round {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n matches Match[]\n createdAt DateTime @default(now())\n}\n\nmodel Gameweek {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n createdAt DateTime @default(now())\n}\n\nmodel MatchEvent {\n id String @id @default(cuid())\n matchId String\n playerId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n type EventType\n minute Int?\n extraInfo String?\n createdAt DateTime @default(now())\n}\n\nmodel MatchLineup {\n id String @id @default(cuid())\n matchId String\n countryId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n formation String\n playerIds String[]\n}\n\nmodel PlayerMatchStat {\n id String @id @default(cuid())\n playerId String\n matchId String\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n goals Int @default(0)\n assists Int @default(0)\n yellowCards Int @default(0)\n redCards Int @default(0)\n minutesPlayed Int @default(0)\n cleanSheet Boolean @default(false)\n penaltySaved Int @default(0)\n penaltyMissed Int @default(0)\n ownGoals Int @default(0)\n isMotm Boolean @default(false)\n extraTimeBonus Int @default(0)\n points Int @default(0)\n\n @@unique([playerId, matchId])\n}\n\nmodel ScoringRule {\n id String @id @default(cuid())\n position Position\n eventType EventType\n points Int\n updatedAt DateTime @updatedAt\n updatedBy String?\n\n @@unique([position, eventType])\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n phone String? @unique\n password String\n role Role @default(USER)\n createdAt DateTime @default(now())\n team Team?\n sessions Session[]\n payments Payment[]\n quizSubmissions QuizSubmission[]\n goldenCards GoldenCard[]\n}\n\nmodel LoginOtp {\n id String @id @default(cuid())\n phone String\n codeHash String\n attempts Int @default(0)\n expiresAt DateTime\n consumedAt DateTime?\n createdAt DateTime @default(now())\n\n @@index([phone, createdAt])\n}\n\nmodel FantasyNews {\n id String @id @default(cuid())\n icon String\n title String\n description String @db.Text\n newsTime DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([newsTime])\n}\n\nenum GoldenCardStatus {\n SEALED\n OPENED\n}\n\nenum SpecialCardState {\n IN_INVENTORY\n IN_TEAM\n SOLD\n}\n\nmodel DailyQuiz {\n id String @id @default(cuid())\n date DateTime @db.Date\n windowStart DateTime\n windowEnd DateTime\n goldWinnersCount Int @default(1)\n silverWinnersCount Int @default(0)\n bronzeWinnersCount Int @default(0)\n goldMinCorrect Int?\n silverMinCorrect Int?\n bronzeMinCorrect Int?\n isProcessed Boolean @default(false)\n createdAt DateTime @default(now())\n questions QuizQuestion[]\n submissions QuizSubmission[]\n awardedCards GoldenCard[]\n\n @@unique([date])\n}\n\nmodel QuizQuestion {\n id String @id @default(cuid())\n quizId String\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n questionText String\n options String[]\n correctAnswer Int // index of correct option (0-based)\n order Int @default(0)\n}\n\nmodel QuizSubmission {\n id String @id @default(cuid())\n userId String\n quizId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n answers Int[] // user's selected option indexes\n correctAnswers Int @default(0)\n score Int @default(0) // percentage 0-100\n submittedAt DateTime @default(now())\n\n @@unique([userId, quizId])\n}\n\nmodel GoldenCard {\n id String @id @default(cuid())\n userId String\n quizId String?\n playerId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz? @relation(fields: [quizId], references: [id], onDelete: SetNull)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n cardTier CardTier @default(GOLD)\n status GoldenCardStatus @default(SEALED)\n state SpecialCardState @default(IN_INVENTORY)\n acquiredDate DateTime @default(now())\n openedAt DateTime?\n teamPlayer TeamPlayer?\n}\n\nmodel Session {\n id String @id @default(cuid())\n sessionToken String @unique\n userId String\n expires DateTime\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel Team {\n id String @id @default(cuid())\n name String\n userId String @unique\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n budget Float @default(100.0)\n totalPoints Int @default(0)\n formation String @default(\"4-3-3\")\n status TeamStatus @default(INACTIVE)\n createdAt DateTime @default(now())\n players TeamPlayer[]\n}\n\nmodel TeamPlayer {\n teamId String\n playerId String\n goldenCardId String? @unique\n isCaptain Boolean @default(false)\n isViceCaptain Boolean @default(false)\n isBench Boolean @default(false)\n positionIndex Int @default(0)\n team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n goldenCard GoldenCard? @relation(fields: [goldenCardId], references: [id], onDelete: SetNull)\n\n @@id([teamId, playerId])\n}\n\nmodel Package {\n id String @id @default(cuid())\n name String\n budgetBonus Float\n price Int\n description String?\n isActive Boolean @default(true)\n payments Payment[]\n}\n\nmodel Payment {\n id String @id @default(cuid())\n userId String\n packageId String\n user User @relation(fields: [userId], references: [id])\n package Package @relation(fields: [packageId], references: [id])\n amount Int\n authority String? @unique\n refId String?\n status PaymentStatus @default(PENDING)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", + "inlineSchemaHash": "97ad530f39fbd0a5b25054636137b2d4c6123d03a537c2ff3b9a51a4155369d0", + "copyEngine": true +} + +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + "lib/generated/prisma", + "generated/prisma", + ] + + const alternativePath = alternativePaths.find((altPath) => { + return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) + }) ?? alternativePaths[0] + + config.dirname = path.join(process.cwd(), alternativePath) + config.isBundled = true +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Country\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"flagUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"flagImage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"confederation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qualificationMethod\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qualificationDate\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"participationHistory\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bestResult\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultFormation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultLineupPlayerIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultCaptainId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group\",\"kind\":\"object\",\"type\":\"Group\",\"relationName\":\"CountryToGroup\"},{\"name\":\"groupId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isEliminated\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"players\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"CountryToPlayer\"},{\"name\":\"homeMatches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"HomeTeam\"},{\"name\":\"awayMatches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"AwayTeam\"}],\"dbName\":null},\"Group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"countries\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"CountryToGroup\"}],\"dbName\":null},\"Player\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"image\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"position\",\"kind\":\"enum\",\"type\":\"Position\"},{\"name\":\"countryId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"CountryToPlayer\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isGoldenCardEligible\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"cardTier\",\"kind\":\"enum\",\"type\":\"CardTier\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matchStats\",\"kind\":\"object\",\"type\":\"PlayerMatchStat\",\"relationName\":\"PlayerToPlayerMatchStat\"},{\"name\":\"teamPlayers\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"PlayerToTeamPlayer\"},{\"name\":\"events\",\"kind\":\"object\",\"type\":\"MatchEvent\",\"relationName\":\"MatchEventToPlayer\"},{\"name\":\"goldenCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToPlayer\"}],\"dbName\":null},\"Match\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"homeTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"awayTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"homeTeam\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"HomeTeam\"},{\"name\":\"awayTeam\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"AwayTeam\"},{\"name\":\"homeScore\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"awayScore\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stage\",\"kind\":\"enum\",\"type\":\"MatchStage\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"MatchStatus\"},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matchDatePersian\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stadium\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referee\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assistant1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assistant2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fourthOfficial\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attendance\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"weather\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roundId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"round\",\"kind\":\"object\",\"type\":\"Round\",\"relationName\":\"MatchToRound\"},{\"name\":\"playerStats\",\"kind\":\"object\",\"type\":\"PlayerMatchStat\",\"relationName\":\"MatchToPlayerMatchStat\"},{\"name\":\"events\",\"kind\":\"object\",\"type\":\"MatchEvent\",\"relationName\":\"MatchToMatchEvent\"},{\"name\":\"lineups\",\"kind\":\"object\",\"type\":\"MatchLineup\",\"relationName\":\"MatchToMatchLineup\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Round\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"deadline\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToRound\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Gameweek\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"deadline\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"MatchEvent\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToMatchEvent\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"MatchEventToPlayer\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"EventType\"},{\"name\":\"minute\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"extraInfo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"MatchLineup\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"countryId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToMatchLineup\"},{\"name\":\"formation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerIds\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"PlayerMatchStat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"PlayerToPlayerMatchStat\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToPlayerMatchStat\"},{\"name\":\"goals\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"assists\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"yellowCards\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"redCards\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"minutesPlayed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cleanSheet\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"penaltySaved\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"penaltyMissed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ownGoals\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isMotm\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"extraTimeBonus\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"points\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ScoringRule\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"position\",\"kind\":\"enum\",\"type\":\"Position\"},{\"name\":\"eventType\",\"kind\":\"enum\",\"type\":\"EventType\"},{\"name\":\"points\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Role\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"team\",\"kind\":\"object\",\"type\":\"Team\",\"relationName\":\"TeamToUser\"},{\"name\":\"sessions\",\"kind\":\"object\",\"type\":\"Session\",\"relationName\":\"SessionToUser\"},{\"name\":\"payments\",\"kind\":\"object\",\"type\":\"Payment\",\"relationName\":\"PaymentToUser\"},{\"name\":\"quizSubmissions\",\"kind\":\"object\",\"type\":\"QuizSubmission\",\"relationName\":\"QuizSubmissionToUser\"},{\"name\":\"goldenCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToUser\"}],\"dbName\":null},\"LoginOtp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"codeHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attempts\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"FantasyNews\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"icon\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"newsTime\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"DailyQuiz\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"windowStart\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"windowEnd\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"goldWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"silverWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bronzeWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"goldMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"silverMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bronzeMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isProcessed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"questions\",\"kind\":\"object\",\"type\":\"QuizQuestion\",\"relationName\":\"DailyQuizToQuizQuestion\"},{\"name\":\"submissions\",\"kind\":\"object\",\"type\":\"QuizSubmission\",\"relationName\":\"DailyQuizToQuizSubmission\"},{\"name\":\"awardedCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"DailyQuizToGoldenCard\"}],\"dbName\":null},\"QuizQuestion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToQuizQuestion\"},{\"name\":\"questionText\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"options\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correctAnswer\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"order\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"QuizSubmission\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"QuizSubmissionToUser\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToQuizSubmission\"},{\"name\":\"answers\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"correctAnswers\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"score\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"submittedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"GoldenCard\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"GoldenCardToUser\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToGoldenCard\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"GoldenCardToPlayer\"},{\"name\":\"cardTier\",\"kind\":\"enum\",\"type\":\"CardTier\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"GoldenCardStatus\"},{\"name\":\"state\",\"kind\":\"enum\",\"type\":\"SpecialCardState\"},{\"name\":\"acquiredDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"openedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"teamPlayer\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"GoldenCardToTeamPlayer\"}],\"dbName\":null},\"Session\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"SessionToUser\"}],\"dbName\":null},\"Team\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"TeamToUser\"},{\"name\":\"budget\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"formation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"TeamStatus\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"players\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"TeamToTeamPlayer\"}],\"dbName\":null},\"TeamPlayer\":{\"fields\":[{\"name\":\"teamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"goldenCardId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isCaptain\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isViceCaptain\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isBench\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"positionIndex\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"team\",\"kind\":\"object\",\"type\":\"Team\",\"relationName\":\"TeamToTeamPlayer\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"PlayerToTeamPlayer\"},{\"name\":\"goldenCard\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToTeamPlayer\"}],\"dbName\":null},\"Package\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"budgetBonus\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"payments\",\"kind\":\"object\",\"type\":\"Payment\",\"relationName\":\"PackageToPayment\"}],\"dbName\":null},\"Payment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"packageId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"PaymentToUser\"},{\"name\":\"package\",\"kind\":\"object\",\"type\":\"Package\",\"relationName\":\"PackageToPayment\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"authority\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"PaymentStatus\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined +config.compilerWasm = { + getRuntime: async () => require('./query_compiler_bg.js'), + getQueryCompilerWasmModule: async () => { + const queryCompilerWasmFilePath = require('path').join(config.dirname, 'query_compiler_bg.wasm') + const queryCompilerWasmFileBytes = require('fs').readFileSync(queryCompilerWasmFilePath) + + return new WebAssembly.Module(queryCompilerWasmFileBytes) + } + } + + +const { warnEnvConflicts } = require('./runtime/client.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +}) + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + +// file annotations for bundling tools to include these files +path.join(__dirname, "schema.prisma"); +path.join(process.cwd(), "lib/generated/prisma/schema.prisma") diff --git a/lib/generated/prisma/package.json b/lib/generated/prisma/package.json new file mode 100644 index 0000000..b02605c --- /dev/null +++ b/lib/generated/prisma/package.json @@ -0,0 +1,183 @@ +{ + "name": "prisma-client-49385eb0fcdd57042a26789a1a38ea389dc814b2f500cfcebcca17b00a9cad78", + "main": "index.js", + "types": "index.d.ts", + "browser": "default.js", + "exports": { + "./client": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./package.json": "./package.json", + ".": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./edge": { + "types": "./edge.d.ts", + "require": "./edge.js", + "import": "./edge.js", + "default": "./edge.js" + }, + "./react-native": { + "types": "./react-native.d.ts", + "require": "./react-native.js", + "import": "./react-native.js", + "default": "./react-native.js" + }, + "./extension": { + "types": "./extension.d.ts", + "require": "./extension.js", + "import": "./extension.js", + "default": "./extension.js" + }, + "./index-browser": { + "types": "./index.d.ts", + "require": "./index-browser.js", + "import": "./index-browser.js", + "default": "./index-browser.js" + }, + "./index": { + "types": "./index.d.ts", + "require": "./index.js", + "import": "./index.js", + "default": "./index.js" + }, + "./wasm": { + "types": "./wasm.d.ts", + "require": "./wasm.js", + "import": "./wasm.mjs", + "default": "./wasm.mjs" + }, + "./runtime/client": { + "types": "./runtime/client.d.ts", + "node": { + "require": "./runtime/client.js", + "default": "./runtime/client.js" + }, + "require": "./runtime/client.js", + "import": "./runtime/client.mjs", + "default": "./runtime/client.mjs" + }, + "./runtime/library": { + "types": "./runtime/library.d.ts", + "require": "./runtime/library.js", + "import": "./runtime/library.mjs", + "default": "./runtime/library.mjs" + }, + "./runtime/binary": { + "types": "./runtime/binary.d.ts", + "require": "./runtime/binary.js", + "import": "./runtime/binary.mjs", + "default": "./runtime/binary.mjs" + }, + "./runtime/wasm-engine-edge": { + "types": "./runtime/wasm-engine-edge.d.ts", + "require": "./runtime/wasm-engine-edge.js", + "import": "./runtime/wasm-engine-edge.mjs", + "default": "./runtime/wasm-engine-edge.mjs" + }, + "./runtime/wasm-compiler-edge": { + "types": "./runtime/wasm-compiler-edge.d.ts", + "require": "./runtime/wasm-compiler-edge.js", + "import": "./runtime/wasm-compiler-edge.mjs", + "default": "./runtime/wasm-compiler-edge.mjs" + }, + "./runtime/edge": { + "types": "./runtime/edge.d.ts", + "require": "./runtime/edge.js", + "import": "./runtime/edge-esm.js", + "default": "./runtime/edge-esm.js" + }, + "./runtime/react-native": { + "types": "./runtime/react-native.d.ts", + "require": "./runtime/react-native.js", + "import": "./runtime/react-native.js", + "default": "./runtime/react-native.js" + }, + "./runtime/index-browser": { + "types": "./runtime/index-browser.d.ts", + "require": "./runtime/index-browser.js", + "import": "./runtime/index-browser.mjs", + "default": "./runtime/index-browser.mjs" + }, + "./generator-build": { + "require": "./generator-build/index.js", + "import": "./generator-build/index.js", + "default": "./generator-build/index.js" + }, + "./sql": { + "require": { + "types": "./sql.d.ts", + "node": "./sql.js", + "default": "./sql.js" + }, + "import": { + "types": "./sql.d.ts", + "node": "./sql.mjs", + "default": "./sql.mjs" + }, + "default": "./sql.js" + }, + "./*": "./*" + }, + "version": "6.19.3", + "sideEffects": false, + "imports": { + "#wasm-compiler-loader": { + "edge-light": "./wasm-edge-light-loader.mjs", + "workerd": "./wasm-worker-loader.mjs", + "worker": "./wasm-worker-loader.mjs", + "default": "./wasm-worker-loader.mjs" + }, + "#main-entry-point": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + } + } +} \ No newline at end of file diff --git a/lib/generated/prisma/query_compiler_bg.js b/lib/generated/prisma/query_compiler_bg.js new file mode 100644 index 0000000..cb53b24 --- /dev/null +++ b/lib/generated/prisma/query_compiler_bg.js @@ -0,0 +1,2 @@ +"use strict";var F=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var n in t)F(e,n,{get:t[n],enumerable:!0})},U=(e,t,n,_)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of M(t))!B.call(e,r)&&r!==n&&F(e,r,{get:()=>t[r],enumerable:!(_=j(t,r))||_.enumerable});return e};var R=e=>U(F({},"__esModule",{value:!0}),e);var Ge={};N(Ge,{QueryCompiler:()=>E,__wbg_Error_e83987f665cf5504:()=>k,__wbg_Number_bb48ca12f395cd08:()=>W,__wbg_String_8f0eb39a4a4c2f66:()=>$,__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68:()=>V,__wbg___wbindgen_debug_string_df47ffb5e35e6763:()=>z,__wbg___wbindgen_in_bb933bd9e1b3bc0f:()=>G,__wbg___wbindgen_is_function_ee8a6c5833c90377:()=>P,__wbg___wbindgen_is_object_c818261d21f283a4:()=>Q,__wbg___wbindgen_is_string_fbb76cb2940daafd:()=>Y,__wbg___wbindgen_is_undefined_2d472862bd29a478:()=>H,__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147:()=>J,__wbg___wbindgen_number_get_a20bf9b85341449d:()=>X,__wbg___wbindgen_string_get_e4f06c90489ad01b:()=>K,__wbg___wbindgen_throw_b855445ff6a94295:()=>Z,__wbg_call_525440f72fbfc0ea:()=>v,__wbg_call_e762c39fa8ea36bf:()=>ee,__wbg_crypto_805be4ce92f1e370:()=>te,__wbg_entries_e171b586f8f6bdbf:()=>ne,__wbg_getRandomValues_f6a868620c8bab49:()=>re,__wbg_getTime_14776bfb48a1bff9:()=>_e,__wbg_get_7bed016f185add81:()=>oe,__wbg_get_with_ref_key_1dc361bd10053bfe:()=>ce,__wbg_instanceof_ArrayBuffer_70beb1189ca63b38:()=>ie,__wbg_instanceof_Uint8Array_20c8e73002f7af98:()=>ue,__wbg_isSafeInteger_d216eda7911dde36:()=>se,__wbg_keys_b4d27b02ad14f4be:()=>fe,__wbg_length_69bca3cb64fc8748:()=>be,__wbg_length_cdd215e10d9dd507:()=>ae,__wbg_msCrypto_2ac4d17c4748234a:()=>de,__wbg_new_0_f9740686d739025c:()=>ge,__wbg_new_1acc0b6eea89d040:()=>le,__wbg_new_5a79be3ab53b8aa5:()=>we,__wbg_new_68651c719dcda04e:()=>pe,__wbg_new_e17d9f43105b08be:()=>xe,__wbg_new_no_args_ee98eee5275000a4:()=>ye,__wbg_new_with_length_01aa0dc35aa13543:()=>me,__wbg_node_ecc8306b9857f33d:()=>he,__wbg_now_793306c526e2e3b6:()=>Ae,__wbg_now_b3f7572f6ef3d3a9:()=>Se,__wbg_process_5cff2739921be718:()=>Fe,__wbg_prototypesetcall_2a6620b6922694b2:()=>Ie,__wbg_randomFillSync_d3c85af7e31cf1f8:()=>Te,__wbg_require_0c566c6f2eef6c79:()=>Ee,__wbg_set_3f1d0b984ed272ed:()=>Oe,__wbg_set_907fb406c34a251d:()=>De,__wbg_set_c213c871859d6500:()=>je,__wbg_set_message_82ae475bb413aa5c:()=>Me,__wbg_set_wasm:()=>q,__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e:()=>Be,__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac:()=>Ne,__wbg_static_accessor_SELF_6fdf4b64710cc91b:()=>Ue,__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2:()=>Re,__wbg_subarray_480600f3d6a9f26c:()=>qe,__wbg_versions_a8e5a362e1f16442:()=>Ce,__wbindgen_cast_2241b6af4c4b2941:()=>Le,__wbindgen_cast_4625c577ab2ec9ee:()=>ke,__wbindgen_cast_9ae0607507abb057:()=>We,__wbindgen_cast_cb9088102bce6b30:()=>$e,__wbindgen_cast_d6cd19b81560fd6e:()=>Ve,__wbindgen_init_externref_table:()=>ze});module.exports=R(Ge);var h=()=>{};h.prototype=h;let o;function q(e){o=e}let A=null;function l(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}let S=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});S.decode();const C=2146435072;let I=0;function L(e,t){return I+=t,I>=C&&(S=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),S.decode(),I=t),S.decode(l().subarray(e,e+t))}function w(e,t){return e=e>>>0,L(e,t)}let b=0;const p=new TextEncoder;"encodeInto"in p||(p.encodeInto=function(e,t){const n=p.encode(e);return t.set(n),{read:e.length,written:n.length}});function x(e,t,n){if(n===void 0){const i=p.encode(e),g=t(i.length,1)>>>0;return l().subarray(g,g+i.length).set(i),b=i.length,g}let _=e.length,r=t(_,1)>>>0;const u=l();let c=0;for(;c<_;c++){const i=e.charCodeAt(c);if(i>127)break;u[r+c]=i}if(c!==_){c!==0&&(e=e.slice(c)),r=n(r,_,_=c+e.length*3,1)>>>0;const i=l().subarray(r+c,r+_),g=p.encodeInto(e,i);c+=g.written,r=n(r,_,c,1)>>>0}return b=c,r}let a=null;function s(){return(a===null||a.buffer.detached===!0||a.buffer.detached===void 0&&a.buffer!==o.memory.buffer)&&(a=new DataView(o.memory.buffer)),a}function f(e){return e==null}function T(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const r=e.description;return r==null?"Symbol":`Symbol(${r})`}if(t=="function"){const r=e.name;return typeof r=="string"&&r.length>0?`Function(${r})`:"Function"}if(Array.isArray(e)){const r=e.length;let u="[";r>0&&(u+=T(e[0]));for(let c=1;c1)_=n[1];else return toString.call(e);if(_=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message} +${e.stack}`:_}function y(e){const t=o.__externref_table_alloc();return o.__wbindgen_externrefs.set(t,e),t}function d(e,t){try{return e.apply(this,t)}catch(n){const _=y(n);o.__wbindgen_exn_store(_)}}function O(e,t){return e=e>>>0,l().subarray(e/1,e/1+t)}function m(e){const t=o.__wbindgen_externrefs.get(e);return o.__externref_table_dealloc(e),t}const D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>o.__wbg_querycompiler_free(e>>>0,1));class E{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),t}free(){const t=this.__destroy_into_raw();o.__wbg_querycompiler_free(t,0)}constructor(t){const n=o.querycompiler_new(t);if(n[2])throw m(n[1]);return this.__wbg_ptr=n[0]>>>0,D.register(this,this.__wbg_ptr,this),this}compile(t){const n=x(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=b,r=o.querycompiler_compile(this.__wbg_ptr,n,_);if(r[2])throw m(r[1]);return m(r[0])}compileBatch(t){const n=x(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=b,r=o.querycompiler_compileBatch(this.__wbg_ptr,n,_);if(r[2])throw m(r[1]);return m(r[0])}}Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);function k(e,t){return Error(w(e,t))}function W(e){return Number(e)}function $(e,t){const n=String(t),_=x(n,o.__wbindgen_malloc,o.__wbindgen_realloc),r=b;s().setInt32(e+4*1,r,!0),s().setInt32(e+4*0,_,!0)}function V(e){const t=e,n=typeof t=="boolean"?t:void 0;return f(n)?16777215:n?1:0}function z(e,t){const n=T(t),_=x(n,o.__wbindgen_malloc,o.__wbindgen_realloc),r=b;s().setInt32(e+4*1,r,!0),s().setInt32(e+4*0,_,!0)}function G(e,t){return e in t}function P(e){return typeof e=="function"}function Q(e){const t=e;return typeof t=="object"&&t!==null}function Y(e){return typeof e=="string"}function H(e){return e===void 0}function J(e,t){return e==t}function X(e,t){const n=t,_=typeof n=="number"?n:void 0;s().setFloat64(e+8*1,f(_)?0:_,!0),s().setInt32(e+4*0,!f(_),!0)}function K(e,t){const n=t,_=typeof n=="string"?n:void 0;var r=f(_)?0:x(_,o.__wbindgen_malloc,o.__wbindgen_realloc),u=b;s().setInt32(e+4*1,u,!0),s().setInt32(e+4*0,r,!0)}function Z(e,t){throw new Error(w(e,t))}function v(){return d(function(e,t,n){return e.call(t,n)},arguments)}function ee(){return d(function(e,t){return e.call(t)},arguments)}function te(e){return e.crypto}function ne(e){return Object.entries(e)}function re(){return d(function(e,t){e.getRandomValues(t)},arguments)}function _e(e){return e.getTime()}function oe(e,t){return e[t>>>0]}function ce(e,t){return e[t]}function ie(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t}function ue(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t}function se(e){return Number.isSafeInteger(e)}function fe(e){return Object.keys(e)}function be(e){return e.length}function ae(e){return e.length}function de(e){return e.msCrypto}function ge(){return new Date}function le(){return new Object}function we(e){return new Uint8Array(e)}function pe(){return new Map}function xe(){return new Array}function ye(e,t){return new h(w(e,t))}function me(e){return new Uint8Array(e>>>0)}function he(e){return e.node}function Ae(){return Date.now()}function Se(){return d(function(){return Date.now()},arguments)}function Fe(e){return e.process}function Ie(e,t,n){Uint8Array.prototype.set.call(O(e,t),n)}function Te(){return d(function(e,t){e.randomFillSync(t)},arguments)}function Ee(){return d(function(){return module.require},arguments)}function Oe(e,t,n){e[t]=n}function De(e,t,n){return e.set(t,n)}function je(e,t,n){e[t>>>0]=n}function Me(e,t){global.PRISMA_WASM_PANIC_REGISTRY.set_message(w(e,t))}function Be(){const e=typeof global>"u"?null:global;return f(e)?0:y(e)}function Ne(){const e=typeof globalThis>"u"?null:globalThis;return f(e)?0:y(e)}function Ue(){const e=typeof self>"u"?null:self;return f(e)?0:y(e)}function Re(){const e=typeof window>"u"?null:window;return f(e)?0:y(e)}function qe(e,t,n){return e.subarray(t>>>0,n>>>0)}function Ce(e){return e.versions}function Le(e,t){return w(e,t)}function ke(e){return BigInt.asUintN(64,e)}function We(e){return e}function $e(e,t){return O(e,t)}function Ve(e){return e}function ze(){const e=o.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}0&&(module.exports={QueryCompiler,__wbg_Error_e83987f665cf5504,__wbg_Number_bb48ca12f395cd08,__wbg_String_8f0eb39a4a4c2f66,__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68,__wbg___wbindgen_debug_string_df47ffb5e35e6763,__wbg___wbindgen_in_bb933bd9e1b3bc0f,__wbg___wbindgen_is_function_ee8a6c5833c90377,__wbg___wbindgen_is_object_c818261d21f283a4,__wbg___wbindgen_is_string_fbb76cb2940daafd,__wbg___wbindgen_is_undefined_2d472862bd29a478,__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147,__wbg___wbindgen_number_get_a20bf9b85341449d,__wbg___wbindgen_string_get_e4f06c90489ad01b,__wbg___wbindgen_throw_b855445ff6a94295,__wbg_call_525440f72fbfc0ea,__wbg_call_e762c39fa8ea36bf,__wbg_crypto_805be4ce92f1e370,__wbg_entries_e171b586f8f6bdbf,__wbg_getRandomValues_f6a868620c8bab49,__wbg_getTime_14776bfb48a1bff9,__wbg_get_7bed016f185add81,__wbg_get_with_ref_key_1dc361bd10053bfe,__wbg_instanceof_ArrayBuffer_70beb1189ca63b38,__wbg_instanceof_Uint8Array_20c8e73002f7af98,__wbg_isSafeInteger_d216eda7911dde36,__wbg_keys_b4d27b02ad14f4be,__wbg_length_69bca3cb64fc8748,__wbg_length_cdd215e10d9dd507,__wbg_msCrypto_2ac4d17c4748234a,__wbg_new_0_f9740686d739025c,__wbg_new_1acc0b6eea89d040,__wbg_new_5a79be3ab53b8aa5,__wbg_new_68651c719dcda04e,__wbg_new_e17d9f43105b08be,__wbg_new_no_args_ee98eee5275000a4,__wbg_new_with_length_01aa0dc35aa13543,__wbg_node_ecc8306b9857f33d,__wbg_now_793306c526e2e3b6,__wbg_now_b3f7572f6ef3d3a9,__wbg_process_5cff2739921be718,__wbg_prototypesetcall_2a6620b6922694b2,__wbg_randomFillSync_d3c85af7e31cf1f8,__wbg_require_0c566c6f2eef6c79,__wbg_set_3f1d0b984ed272ed,__wbg_set_907fb406c34a251d,__wbg_set_c213c871859d6500,__wbg_set_message_82ae475bb413aa5c,__wbg_set_wasm,__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e,__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac,__wbg_static_accessor_SELF_6fdf4b64710cc91b,__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2,__wbg_subarray_480600f3d6a9f26c,__wbg_versions_a8e5a362e1f16442,__wbindgen_cast_2241b6af4c4b2941,__wbindgen_cast_4625c577ab2ec9ee,__wbindgen_cast_9ae0607507abb057,__wbindgen_cast_cb9088102bce6b30,__wbindgen_cast_d6cd19b81560fd6e,__wbindgen_init_externref_table}); diff --git a/lib/generated/prisma/query_compiler_bg.wasm b/lib/generated/prisma/query_compiler_bg.wasm new file mode 100644 index 0000000..e9af24f Binary files /dev/null and b/lib/generated/prisma/query_compiler_bg.wasm differ diff --git a/lib/generated/prisma/runtime/client.d.ts b/lib/generated/prisma/runtime/client.d.ts new file mode 100644 index 0000000..5e26c55 --- /dev/null +++ b/lib/generated/prisma/runtime/client.d.ts @@ -0,0 +1,3982 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: AccelerateUtils; +}; + +/** + * A stripped down interface of `fetch` that `@prisma/extension-accelerate` + * relies on. It must be in sync with the corresponding definition in the + * Accelerate extension. + * + * This is the actual interface exposed by the extension. We can't use the + * custom fetch function provided by it as normal fetch because the API is + * different. Notably, `headers` must be an object and not a `Headers` + * instance, and `url` must be a `string` and not a `URL`. + * + * The return type is `Response` but we can't specify this in an exported type + * because it would end up referencing external types from `@types/node` or DOM + * which can fail typechecking depending on TypeScript configuration in a user's + * project. + */ +declare type AccelerateExtensionFetch = (url: string, options: { + body?: string; + method?: string; + headers: Record; +}) => Promise; + +declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch; + +declare type AccelerateUtils = EngineConfig['accelerateUtils']; + +export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +declare type ActiveConnectorType = Exclude; + +/** + * An interface that exposes some basic information about the + * adapter like its name and provider type. + */ +declare interface AdapterInfo { + readonly provider: Provider; + readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); +} + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { + #private; +} + +export declare type ApplyOmit = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +declare type ArgScalarType = 'string' | 'int' | 'bigint' | 'float' | 'decimal' | 'boolean' | 'enum' | 'uuid' | 'json' | 'datetime' | 'bytes' | 'unknown'; + +declare type ArgType = { + scalarType: ArgScalarType; + dbType?: string; + arity: Arity; +}; + +declare type Arity = 'scalar' | 'list'; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResultData | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +/** + * Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array` in TypeScript 5.7 and beyond. + */ +export declare type Bytes = ReturnType; + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; + +export declare type ClientOtherOps = { + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $queryRawTyped(query: TypedSql): PrismaPromise; + $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $runCommandRaw(command: InputJsonObject): PrismaPromise; +}; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +declare type CompactedBatchResponse = { + type: 'compacted'; + plan: QueryPlanNode; + arguments: Record[]; + nestedSelection: string[]; + keys: string[]; + expectNonEmpty: boolean; +}; + +declare type CompilerWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryCompiler: QueryCompilerConstructor; + }>; + /** + * Loads the raw wasm module for the wasm compiler engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by ClientEngine + */ + getQueryCompilerWasmModule: () => Promise; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; + maxBindValues?: number; + supportsRelationJoins: boolean; +}; + +declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb'; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +export declare function createParam(name: string): Param; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + indexes: Index[]; +}>; + +declare type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; +}>; + +declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; + +declare type DataRule = { + type: 'rowCountEq'; + args: number; +} | { + type: 'rowCountNeq'; + args: number; +} | { + type: 'affectedRowCountEq'; + args: number; +} | { + type: 'never'; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { + #private; +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare function Decimal(n: Decimal.Value): Decimal; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$extends"]; + +declare type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; +}>; + +declare type DeserializedResponse = Array>; + +export declare function deserializeJsonResponse(result: unknown): unknown; + +export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +export declare namespace DMMF { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +declare namespace DMMF_2 { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; + +declare type Document_2 = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; +}>; + +/** + * A generic driver adapter factory that allows the user to instantiate a + * driver adapter. The query and result types are specific to the adapter. + */ +declare interface DriverAdapterFactory extends AdapterInfo { + /** + * Instantiate a driver adapter. + */ + connect(): Promise>; +} + +declare type DynamicArgType = ArgType | { + arity: 'tuple'; + elements: ArgType[]; +}; + +/** Client */ +export declare type DynamicClientExtensionArgs> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; +} & { + [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; +}; + +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult> : (args: Exact) => DynamicModelExtensionFnResult>; + +export declare type DynamicModelExtensionThis> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; + applyPendingMigrations(): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + /** + * @remarks this field is used internally by Policy, do not rename or remove + */ + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: SqlDriverAdapterFactory; + /** + * The contents of the schema encoded into a string + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + * @remarks this field is used internally by Policy, do not rename or remove + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineSpan = { + id: EngineSpanId; + parentId: string | null; + name: string; + startTime: HrTime; + endTime: HrTime; + kind: EngineSpanKind; + attributes?: Record; + links?: EngineSpanId[]; +}; + +declare type EngineSpanId = string; + +declare type EngineSpanKind = 'client' | 'internal'; + +declare type EngineWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryEngine: QueryEngineConstructor; + }>; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine + */ + getQueryEngineWasmModule: () => Promise; +}; + +declare type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; +}>; + +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; + +declare type Error_2 = MappedError & { + originalCode?: string; + originalMessage?: string; +}; + +declare type ErrorCapturingFunction = T extends (...args: infer A) => Promise ? (...args: A) => Promise>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4> : T; + +declare type ErrorCapturingInterface = { + [K in keyof T]: ErrorCapturingFunction; +}; + +declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +declare type ExtendedSpanOptions = SpanOptions & { + /** The name of the span */ + name: string; + internal?: boolean; + /** Whether it propagates context (?=true) */ + active?: boolean; + /** The context to append the span to */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResultExtensionKeys, + GetPayloadResultExtensionObject, + GetPayloadResult, + GetSelect, + GetOmit, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + ClientOptionDef, + ClientOtherOps, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + +declare type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + /** + * Native database type, if specified. + * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, + * `@db.Text` is encoded as `['Text', []]`. + */ + nativeType?: [string, string[]] | null; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationOnUpdate?: string; + relationName?: string; + documentation?: string; +}>; + +declare type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: Array; +}>; + +declare type FieldDefaultScalar = string | boolean | number; + +declare type FieldInitializer = { + type: 'value'; + value: PrismaValue; +} | { + type: 'lastInsertId'; +}; + +declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + +declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + +declare type FieldNamespace = 'model' | 'prisma'; + +declare type FieldOperation = { + type: 'set'; + value: PrismaValue; +} | { + type: 'add'; + value: PrismaValue; +} | { + type: 'subtract'; + value: PrismaValue; +} | { + type: 'multiply'; + value: PrismaValue; +} | { + type: 'divide'; + value: PrismaValue; +}; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + +declare type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; +}>; + +declare type FieldScalarType = { + type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported'; +} | { + type: 'enum'; + name: string; +} | { + type: 'bytes'; + encoding: 'array' | 'base64' | 'hex'; +}; + +declare type FieldType = { + arity: Arity; +} & FieldScalarType; + +declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare type Fragment = { + type: 'stringChunk'; + chunk: string; +} | { + type: 'parameter'; +} | { + type: 'parameterTuple'; +} | { + type: 'parameterTupleList'; + itemPrefix: string; + itemSeparator: string; + itemSuffix: string; + groupSeparator: string; +}; + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: { + /** `output` is a reserved name and will only be available directly at `generator.output` */ + output?: never; + /** `provider` is a reserved name and will only be available directly at `generator.provider` */ + provider?: never; + /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ + binaryTargets?: never; + /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ + previewFeatures?: never; + } & { + [key: string]: string | string[] | undefined; + }; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; + envPaths?: EnvPaths; + sourceFilePath: string; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection : unknown) : DefaultSelection; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; +}; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; + +export declare type GetPayloadResultExtensionKeys = KR; + +export declare type GetPayloadResultExtensionObject = { + [K in GetPayloadResultExtensionKeys]: R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _previewFeatures: string[]; + _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; + _extensions: MergedExtensionsList; + /** + * @remarks This is used internally by Policy, do not rename or remove + */ + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + $on(eventType: E, callback: EventCallback): any; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Counterpart to $queryRaw, that returns strongly typed results + * @param typedSql + */ + $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +export declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths?: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: ActiveConnectorType; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; +}; + +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; + updateMany: GetBatchResult; + updateManyAndReturn: GetFindResult[]; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $queryRawTyped: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[OperationName]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: RuntimeName; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type GlobalOmitOptions = { + [modelName: string]: { + [fieldName: string]: boolean; + }; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; + globalOmit?: GlobalOmitOptions; +}; + +declare type HrTime = [number, number]; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime_2 = [number, number]; + +declare type Index = ReadonlyDeep_2<{ + model: string; + type: IndexType; + isDefinedOnField: boolean; + name?: string; + dbName?: string; + algorithm?: string; + clustered?: boolean; + fields: IndexField[]; +}>; + +declare type IndexField = ReadonlyDeep_2<{ + name: string; + sortOrder?: SortOrder; + length?: number; + operatorClass?: string; +}>; + +declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; + +declare type InMemoryOps = { + pagination: Pagination | null; + distinct: string[] | null; + reverse: boolean; + linkingFields: string[] | null; + nested: Record; +}; + +/** + * Matches a JSON array. + * Unlike \`JsonArray\`, readonly arrays are assignable to this type. + */ +export declare interface InputJsonArray extends ReadonlyArray { +} + +/** + * Matches a JSON object. + * Unlike \`JsonObject\`, this type allows undefined and read-only properties. + */ +export declare type InputJsonObject = { + readonly [Key in string]?: InputJsonValue | null; +}; + +/** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike \`JsonValue\`, this + * type allows read-only arrays and read-only object properties and disallows + * \`null\` at the top level. + * + * \`null\` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or + * \`Prisma.DbNull\` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { + toJSON(): unknown; +}; + +declare type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + grouping?: string; + }; + fields: SchemaArg[]; +}>; + +declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +} & Omit; + +declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; + +declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable'; + +declare function isSkip(value: unknown): value is Skip; + +export declare function isTypedSql(value: unknown): value is UnknownTypedSql; + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +declare type JoinExpression = { + child: QueryPlanNode; + on: [left: string, right: string][]; + parentField: string; + isRelationUnique: boolean; +}; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + omit?: Omission; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ +export declare interface JsonArray extends Array { +} + +export declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { + #private; +} + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +export declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; + +declare type MappedError = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'InvalidIsolationLevel'; + level: string; +} | { + kind: 'LengthMismatch'; + column?: string; +} | { + kind: 'UniqueConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'NullConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'ForeignKeyConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'DatabaseNotReachable'; + host?: string; + port?: number; +} | { + kind: 'DatabaseDoesNotExist'; + db?: string; +} | { + kind: 'DatabaseAlreadyExists'; + db?: string; +} | { + kind: 'DatabaseAccessDenied'; + db?: string; +} | { + kind: 'ConnectionClosed'; +} | { + kind: 'TlsConnectionError'; + reason: string; +} | { + kind: 'AuthenticationFailed'; + user?: string; +} | { + kind: 'TransactionWriteConflict'; +} | { + kind: 'TableDoesNotExist'; + table?: string; +} | { + kind: 'ColumnNotFound'; + column?: string; +} | { + kind: 'TooManyConnections'; + cause: string; +} | { + kind: 'ValueOutOfRange'; + cause: string; +} | { + kind: 'MissingFullTextSearchIndex'; +} | { + kind: 'SocketTimeout'; +} | { + kind: 'InconsistentColumnData'; + cause: string; +} | { + kind: 'TransactionAlreadyClosed'; + cause: string; +} | { + kind: 'postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +} | { + kind: 'mssql'; + code: number; + message: string; +}; + +declare type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; +}>; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _client; + constructor(client: Client); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + schema: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; +}>; + +declare enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + createManyAndReturn = "createManyAndReturn", + update = "update", + updateMany = "updateMany", + updateManyAndReturn = "updateManyAndReturn", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist in DMMF + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +declare type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + createManyAndReturn?: string | null; + update?: string | null; + updateMany?: string | null; + updateManyAndReturn?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; +}>; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +declare type MultiBatchResponse = { + type: 'multi'; + plans: QueryPlanNode[]; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-better-sqlite3", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-mssql", "@prisma/adapter-mariadb"]; + +export declare type Omission = Record; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + name: string; + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + /** Timeout for starting the transaction */ + maxWait?: number; + /** Timeout for the transaction body */ + timeout?: number; + /** Transaction isolation level */ + isolationLevel?: IsolationLevel_2; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +declare type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; +}>; + +declare type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; +}>; + +declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + +declare type Pagination = { + cursor: Record | null; + take: number | null; + skip: number | null; +}; + +export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; + +export declare type Param = { + readonly name: $Value; +}; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +declare interface PlaceholderFormat { + prefix: string; + hasNumbering: boolean; +} + +declare type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; +}>; + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: SqlDriverAdapterFactory | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + omit?: GlobalOmitOptions; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +declare type PrismaOperationSpec = { + args: TArgs; + action: TAction; + model: string; +}; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 = any> extends Promise { + get spec(): TSpec; + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: TResult) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel_2; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = >(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator; + +declare type PrismaValueGenerator = { + prisma__type: 'generatorCall'; + prisma__value: { + name: string; + args: PrismaValue[]; + }; +}; + +declare type PrismaValuePlaceholder = { + prisma__type: 'param'; + prisma__value: { + name: string; + type: string; + }; +}; + +export declare const PrivateResultType: unique symbol; + +declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; +}>; + +declare interface Queryable extends AdapterInfo { + /** + * Execute a query and return its result. + */ + queryRaw(params: Query): Promise; + /** + * Execute a query and return the number of affected rows. + */ + executeRaw(params: Query): Promise; +} + +declare type QueryCompiler = { + compile(request: string): {}; + compileBatch(batchRequest: string): BatchResponse; + free(): void; +}; + +declare interface QueryCompilerConstructor { + new (options: QueryCompilerOptions): QueryCompiler; +} + +declare type QueryCompilerOptions = { + datamodel: string; + provider: Provider; + connectionInfo: ConnectionInfo; +}; + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: IsolationLevel_2; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + engineProtocol: QueryEngineProtocol; + enableTracing: boolean; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string, requestId: string): Promise; + disconnect(headers: string, requestId: string): Promise; + /** + * Frees any resources allocated by the engine's WASM instance. This method is automatically created by WASM bindgen. + * Noop for other engines. + */ + free?(): void; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; + sdlSchema?(): Promise; + startTransaction(options: string, traceHeaders: string, requestId: string): Promise; + commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; + rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; + metrics?(options: string): Promise; + applyPendingMigrations?(): Promise; + trace(requestId: string): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineProtocol = 'graphql' | 'json'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResultData = { + data: T; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +declare type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; +}>; + +declare type QueryPlanBinding = { + name: string; + expr: QueryPlanNode; +}; + +declare type QueryPlanDbQuery = { + type: 'rawSql'; + sql: string; + args: PrismaValue[]; + argTypes: ArgType[]; +} | { + type: 'templateSql'; + fragments: Fragment[]; + placeholderFormat: PlaceholderFormat; + args: PrismaValue[]; + argTypes: DynamicArgType[]; + chunkable: boolean; +}; + +declare type QueryPlanNode = { + type: 'value'; + args: PrismaValue; +} | { + type: 'seq'; + args: QueryPlanNode[]; +} | { + type: 'get'; + args: { + name: string; + }; +} | { + type: 'let'; + args: { + bindings: QueryPlanBinding[]; + expr: QueryPlanNode; + }; +} | { + type: 'getFirstNonEmpty'; + args: { + names: string[]; + }; +} | { + type: 'query'; + args: QueryPlanDbQuery; +} | { + type: 'execute'; + args: QueryPlanDbQuery; +} | { + type: 'reverse'; + args: QueryPlanNode; +} | { + type: 'sum'; + args: QueryPlanNode[]; +} | { + type: 'concat'; + args: QueryPlanNode[]; +} | { + type: 'unique'; + args: QueryPlanNode; +} | { + type: 'required'; + args: QueryPlanNode; +} | { + type: 'join'; + args: { + parent: QueryPlanNode; + children: JoinExpression[]; + }; +} | { + type: 'mapField'; + args: { + field: string; + records: QueryPlanNode; + }; +} | { + type: 'transaction'; + args: QueryPlanNode; +} | { + type: 'dataMap'; + args: { + expr: QueryPlanNode; + structure: ResultNode; + enums: Record>; + }; +} | { + type: 'validate'; + args: { + expr: QueryPlanNode; + rules: DataRule[]; + } & ValidationError; +} | { + type: 'if'; + args: { + value: QueryPlanNode; + rule: DataRule; + then: QueryPlanNode; + else: QueryPlanNode; + }; +} | { + type: 'unit'; +} | { + type: 'diff'; + args: { + from: QueryPlanNode; + to: QueryPlanNode; + fields: string[]; + }; +} | { + type: 'initializeRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'mapRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'process'; + args: { + expr: QueryPlanNode; + operations: InMemoryOps; + }; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; + +declare type RawResponse = { + columns: string[]; + types: QueryIntrospectionBuiltinType[]; + rows: unknown[][]; +}; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; + name: ''; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + ApplyOmit, + OmitValue, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult, + ExtractGlobalOmit + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare type ResultNode = { + type: 'affectedRows'; +} | { + type: 'object'; + fields: Record; + serializedName: string | null; + skipNulls: boolean; +} | { + type: 'field'; + dbName: string; + fieldType: FieldType; +}; + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +export declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; + +declare type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma?: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; +}>; + +declare type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + requiresOtherFields?: string[]; + deprecation?: Deprecation; +}>; + +declare type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; +}>; + +declare type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; +}>; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; + +declare type SerializeParams = { + runtimeDataModel: RuntimeDataModel; + modelName?: string; + action: Action; + args?: JsArgs; + extensions?: MergedExtensionsList; + callsite?: CallSite; + clientMethod: string; + clientVersion: string; + errorFormat: ErrorFormat; + previewFeatures: string[]; + globalOmit?: GlobalOmitOptions; +}; + +declare class Skip { + constructor(param?: symbol); + ifUndefined(value: T | undefined): T | Skip; +} + +export declare const skip: Skip; + +declare type SortOrder = 'asc' | 'desc'; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get sql(): string; + get statement(): string; + get text(): string; + inspect(): { + sql: string; + statement: string; + text: string; + values: unknown[]; + }; +} + +declare interface SqlDriverAdapter extends SqlQueryable { + /** + * Execute multiple SQL statements separated by semicolon. + */ + executeScript(script: string): Promise; + /** + * Start new transaction. + */ + startTransaction(isolationLevel?: IsolationLevel): Promise; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): ConnectionInfo; + /** + * Dispose of the connection and release any resources. + */ + dispose(): Promise; +} + +export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory { + connect(): Promise; +} + +declare type SqlQuery = { + sql: string; + args: Array; + argTypes: Array; +}; + +declare interface SqlQueryable extends Queryable { +} + +declare interface SqlResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime_2 | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + dispatchEngineSpans(spans: EngineSpan[]): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends AdapterInfo, SqlQueryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise; + /** + * Roll back the transaction. + */ + rollback(): Promise; +} + +declare namespace Transaction_2 { + export { + Options, + IsolationLevel_2 as IsolationLevel, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare class TypedSql { + [PrivateResultType]: Result; + constructor(sql: string, values: Values); + get sql(): string; + get values(): Values; +} + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; +}; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + isSkip, + Skip, + skip, + UnknownTypedSql, + OperationPayload as Payload + } +} +export { Types } + +declare type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; +}>; + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +export declare type UnknownTypedSql = TypedSql; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare type ValidationError = { + error_identifier: 'RELATION_VIOLATION'; + context: { + relation: string; + modelA: string; + modelB: string; + }; +} | { + error_identifier: 'MISSING_RELATED_RECORD'; + context: { + model: string; + relation: string; + relationType: string; + operation: string; + neededFor?: string; + }; +} | { + error_identifier: 'MISSING_RECORD'; + context: { + operation: string; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_INPUT'; + context: { + expectedRows: number; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_OUTPUT'; + context: { + expectedRows: number; + relation: string; + relationType: string; + }; +} | { + error_identifier: 'RECORDS_NOT_CONNECTED'; + context: { + relation: string; + parent: string; + child: string; + }; +}; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +export { } diff --git a/lib/generated/prisma/runtime/client.js b/lib/generated/prisma/runtime/client.js new file mode 100644 index 0000000..1430f11 --- /dev/null +++ b/lib/generated/prisma/runtime/client.js @@ -0,0 +1,110 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ku=Object.create;var Zr=Object.defineProperty;var Ou=Object.getOwnPropertyDescriptor;var Du=Object.getOwnPropertyNames;var Nu=Object.getPrototypeOf,_u=Object.prototype.hasOwnProperty;var zo=(e,t)=>()=>(e&&(t=e(e=0)),t);var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ut=(e,t)=>{for(var r in t)Zr(e,r,{get:t[r],enumerable:!0})},Yo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Du(t))!_u.call(e,i)&&i!==r&&Zr(e,i,{get:()=>t[i],enumerable:!(n=Ou(t,i))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?ku(Nu(e)):{},Yo(t||!e||!e.__esModule?Zr(r,"default",{value:e,enumerable:!0}):r,e)),Mu=e=>Yo(Zr({},"__esModule",{value:!0}),e);var ps=Z((ky,np)=>{np.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var xi=Z((qy,ap)=>{ap.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var ds=Z(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.enginesVersion=void 0;tn.enginesVersion=xi().prisma.enginesVersion});var fs=Z((jy,ms)=>{"use strict";ms.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var ws=Z((Hy,hs)=>{"use strict";hs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var xs=Z((Zy,mp)=>{mp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var As=Z((Xy,ke)=>{"use strict";var Ci=require("node:fs"),Ri=require("node:path"),fp=require("node:os"),gp=require("node:crypto"),yp=xs(),Ps=yp.version,hp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function wp(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` +`);let n;for(;(n=hp.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` +`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function Ep(e){let t=Ts(e),r=B.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=vs(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function xp(e){console.log(`[dotenv@${Ps}][WARN] ${e}`)}function nr(e){console.log(`[dotenv@${Ps}][DEBUG] ${e}`)}function vs(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function bp(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ts(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)Ci.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=Ri.resolve(process.cwd(),".env.vault");return Ci.existsSync(t)?t:null}function bs(e){return e[0]==="~"?Ri.join(fp.homedir(),e.slice(1)):e}function Pp(e){!!(e&&e.debug)&&nr("Loading env from encrypted .env.vault");let r=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,r,e),{parsed:r}}function vp(e){let t=Ri.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&nr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[bs(e.path)];else{i=[];for(let l of e.path)i.push(bs(l))}let o,s={};for(let l of i)try{let c=B.parse(Ci.readFileSync(l,{encoding:r}));B.populate(s,c,e)}catch(c){n&&nr(`Failed to load ${l} ${c.message}`),o=c}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function Tp(e){if(vs(e).length===0)return B.configDotenv(e);let t=Ts(e);return t?B._configVault(e):(xp(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),B.configDotenv(e))}function Ap(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=gp.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",c=s.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw s}}function Cp(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&nr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var B={configDotenv:vp,_configVault:Pp,_parseVault:Ep,config:Tp,decrypt:Ap,parse:wp,populate:Cp};ke.exports.configDotenv=B.configDotenv;ke.exports._configVault=B._configVault;ke.exports._parseVault=B._parseVault;ke.exports.config=B.config;ke.exports.decrypt=B.decrypt;ke.exports.parse=B.parse;ke.exports.populate=B.populate;ke.exports=B});var Is=Z((oh,sn)=>{"use strict";sn.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};sn.exports.default=sn.exports});var $i=Z((Ow,Xs)=>{"use strict";Xs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var oa=zo(()=>{"use strict"});var co=Z(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.anumber=lo;et.abytes=Al;et.ahash=gf;et.aexists=yf;et.aoutput=hf;function lo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ff(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Al(e,...t){if(!ff(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function gf(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");lo(e.outputLen),lo(e.blockLen)}function yf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function hf(e,t){Al(e);let r=t.outputLen;if(e.length{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.add5L=v.add5H=v.add4H=v.add4L=v.add3H=v.add3L=v.rotlBL=v.rotlBH=v.rotlSL=v.rotlSH=v.rotr32L=v.rotr32H=v.rotrBL=v.rotrBH=v.rotrSL=v.rotrSH=v.shrSL=v.shrSH=v.toBig=void 0;v.fromBig=po;v.split=Cl;v.add=ql;var Bn=BigInt(2**32-1),uo=BigInt(32);function po(e,t=!1){return t?{h:Number(e&Bn),l:Number(e>>uo&Bn)}:{h:Number(e>>uo&Bn)|0,l:Number(e&Bn)|0}}function Cl(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);v.toBig=Rl;var Sl=(e,t,r)=>e>>>r;v.shrSH=Sl;var Il=(e,t,r)=>e<<32-r|t>>>r;v.shrSL=Il;var kl=(e,t,r)=>e>>>r|t<<32-r;v.rotrSH=kl;var Ol=(e,t,r)=>e<<32-r|t>>>r;v.rotrSL=Ol;var Dl=(e,t,r)=>e<<64-r|t>>>r-32;v.rotrBH=Dl;var Nl=(e,t,r)=>e>>>r-32|t<<64-r;v.rotrBL=Nl;var _l=(e,t)=>t;v.rotr32H=_l;var Ml=(e,t)=>e;v.rotr32L=Ml;var Fl=(e,t,r)=>e<>>32-r;v.rotlSH=Fl;var Ll=(e,t,r)=>t<>>32-r;v.rotlSL=Ll;var $l=(e,t,r)=>t<>>64-r;v.rotlBH=$l;var Vl=(e,t,r)=>e<>>64-r;v.rotlBL=Vl;function ql(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Ul=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);v.add3L=Ul;var jl=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;v.add3H=jl;var Bl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);v.add4L=Bl;var Ql=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;v.add4H=Ql;var Hl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);v.add5L=Hl;var Gl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;v.add5H=Gl;var wf={fromBig:po,split:Cl,toBig:Rl,shrSH:Sl,shrSL:Il,rotrSH:kl,rotrSL:Ol,rotrBH:Dl,rotrBL:Nl,rotr32H:_l,rotr32L:Ml,rotlSH:Fl,rotlSL:Ll,rotlBH:$l,rotlBL:Vl,add:ql,add3L:Ul,add3H:jl,add4L:Bl,add4H:Ql,add5H:Gl,add5L:Hl};v.default=wf});var Wl=Z(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.crypto=void 0;var He=require("node:crypto");Qn.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Yl=Z(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.Hash=S.nextTick=S.byteSwapIfBE=S.isLE=void 0;S.isBytes=Ef;S.u8=xf;S.u32=bf;S.createView=Pf;S.rotr=vf;S.rotl=Tf;S.byteSwap=go;S.byteSwap32=Af;S.bytesToHex=Rf;S.hexToBytes=Sf;S.asyncLoop=kf;S.utf8ToBytes=zl;S.toBytes=Hn;S.concatBytes=Of;S.checkOpts=Df;S.wrapConstructor=Nf;S.wrapConstructorWithOpts=_f;S.wrapXOFConstructorWithOpts=Mf;S.randomBytes=Ff;var Nt=Wl(),fo=co();function Ef(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function xf(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function bf(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Pf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function vf(e,t){return e<<32-t|e>>>t}function Tf(e,t){return e<>>32-t>>>0}S.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function go(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}S.byteSwapIfBE=S.isLE?e=>e:e=>go(e);function Af(e){for(let t=0;tt.toString(16).padStart(2,"0"));function Rf(e){(0,fo.abytes)(e);let t="";for(let r=0;r=_e._0&&e<=_e._9)return e-_e._0;if(e>=_e.A&&e<=_e.F)return e-(_e.A-10);if(e>=_e.a&&e<=_e.f)return e-(_e.a-10)}function Sf(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};S.nextTick=If;async function kf(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Hn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function _f(e){let t=(n,i)=>e(i).update(Hn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Mf(e){let t=(n,i)=>e(i).update(Hn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Ff(e=32){if(Nt.crypto&&typeof Nt.crypto.getRandomValues=="function")return Nt.crypto.getRandomValues(new Uint8Array(e));if(Nt.crypto&&typeof Nt.crypto.randomBytes=="function")return Nt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var oc=Z(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.shake256=V.shake128=V.keccak_512=V.keccak_384=V.keccak_256=V.keccak_224=V.sha3_512=V.sha3_384=V.sha3_256=V.sha3_224=V.Keccak=void 0;V.keccakP=nc;var _t=co(),Cr=Jl(),Me=Yl(),ec=[],tc=[],rc=[],Lf=BigInt(0),Ar=BigInt(1),$f=BigInt(2),Vf=BigInt(7),qf=BigInt(256),Uf=BigInt(113);for(let e=0,t=Ar,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],ec.push(2*(5*n+r)),tc.push((e+1)*(e+2)/2%64);let i=Lf;for(let o=0;o<7;o++)t=(t<>Vf)*Uf)%qf,t&$f&&(i^=Ar<<(Ar<r>32?(0,Cr.rotlBH)(e,t,r):(0,Cr.rotlSH)(e,t,r),Xl=(e,t,r)=>r>32?(0,Cr.rotlBL)(e,t,r):(0,Cr.rotlSL)(e,t,r);function nc(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,l=(s+2)%10,c=r[l],u=r[l+1],p=Zl(c,u,1)^r[a],d=Xl(c,u,1)^r[a+1];for(let m=0;m<50;m+=10)e[s+m]^=p,e[s+m+1]^=d}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=tc[s],l=Zl(i,o,a),c=Xl(i,o,a),u=ec[s];i=e[u],o=e[u+1],e[u]=l,e[u+1]=c}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=jf[n],e[1]^=Bf[n]}r.fill(0)}var Rr=class e extends Me.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,_t.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Me.u32)(this.state)}keccak(){Me.isLE||(0,Me.byteSwap32)(this.state32),nc(this.state32,this.rounds),Me.isLE||(0,Me.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,_t.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Me.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,_t.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,_t.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};V.Keccak=Rr;var Ge=(e,t,r)=>(0,Me.wrapConstructor)(()=>new Rr(t,e,r));V.sha3_224=Ge(6,144,224/8);V.sha3_256=Ge(6,136,256/8);V.sha3_384=Ge(6,104,384/8);V.sha3_512=Ge(6,72,512/8);V.keccak_224=Ge(1,144,224/8);V.keccak_256=Ge(1,136,256/8);V.keccak_384=Ge(1,104,384/8);V.keccak_512=Ge(1,72,512/8);var ic=(e,t,r)=>(0,Me.wrapXOFConstructorWithOpts)((n={})=>new Rr(t,e,n.dkLen===void 0?r:n.dkLen,!0));V.shake128=ic(31,168,128/8);V.shake256=ic(31,136,256/8)});var mc=Z(($P,Je)=>{"use strict";var{sha3_512:Qf}=oc(),ac=24,Sr=32,yo=(e=4,t=Math.random)=>{let r="";for(;r.lengthlc(Qf(e)).toString(36).slice(1),sc=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),Hf=e=>sc[Math.floor(e()*sc.length)],uc=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+yo(Sr,t):yo(Sr,t);return cc(n).substring(0,Sr)},pc=e=>()=>e++,Gf=476782367,dc=({random:e=Math.random,counter:t=pc(Math.floor(e()*Gf)),length:r=ac,fingerprint:n=uc({random:e})}={})=>function(){let o=Hf(e),s=Date.now().toString(36),a=t().toString(36),l=yo(r,e),c=`${s+l+a+n}`;return`${o+cc(c).substring(1,r)}`},Jf=dc(),Wf=(e,{minLength:t=2,maxLength:r=Sr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:ac,bigLength:Sr});Je.exports.init=dc;Je.exports.createId=Jf;Je.exports.bufToBigInt=lc;Je.exports.createCounter=pc;Je.exports.createFingerprint=uc;Je.exports.isCuid=Wf});var fc=Z((VP,Ir)=>{"use strict";var{createId:Kf,init:zf,getConstants:Yf,isCuid:Zf}=mc();Ir.exports.createId=Kf;Ir.exports.init=zf;Ir.exports.getConstants=Yf;Ir.exports.isCuid=Zf});var wy={};ut(wy,{DMMF:()=>lr,Debug:()=>q,Decimal:()=>ne,Extensions:()=>gi,MetricsClient:()=>Rt,PrismaClientInitializationError:()=>N,PrismaClientKnownRequestError:()=>U,PrismaClientRustPanicError:()=>re,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>X,Public:()=>yi,Sql:()=>ce,createParam:()=>ba,defineDmmfProperty:()=>Ra,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>pi,dmmfToRuntimeDataModel:()=>Ns,empty:()=>ka,getPrismaClient:()=>Ru,getRuntime:()=>Fc,join:()=>Ia,makeStrictEnum:()=>Su,makeTypedQueryFactory:()=>Sa,objectEnumValues:()=>Cn,raw:()=>Ji,serializeJsonQuery:()=>Nn,skip:()=>Dn,sqltag:()=>Wi,warnEnvConflicts:()=>Iu,warnOnce:()=>or});module.exports=Mu(wy);var gi={};ut(gi,{defineExtension:()=>Zo,getExtensionContext:()=>Xo});function Zo(e){return typeof e=="function"?e:t=>t.$extends(e)}function Xo(e){return e}var yi={};ut(yi,{validator:()=>es});function es(...e){return t=>t}var Xr={};ut(Xr,{$:()=>os,bgBlack:()=>Hu,bgBlue:()=>Ku,bgCyan:()=>Yu,bgGreen:()=>Ju,bgMagenta:()=>zu,bgRed:()=>Gu,bgWhite:()=>Zu,bgYellow:()=>Wu,black:()=>Uu,blue:()=>Ye,bold:()=>te,cyan:()=>Se,dim:()=>Ke,gray:()=>Yt,green:()=>zt,grey:()=>Qu,hidden:()=>Vu,inverse:()=>$u,italic:()=>Lu,magenta:()=>ju,red:()=>Re,reset:()=>Fu,strikethrough:()=>qu,underline:()=>ae,white:()=>Bu,yellow:()=>ze});var hi,ts,rs,ns,is=!0;typeof process<"u"&&({FORCE_COLOR:hi,NODE_DISABLE_COLORS:ts,NO_COLOR:rs,TERM:ns}=process.env||{},is=process.stdout&&process.stdout.isTTY);var os={enabled:!ts&&rs==null&&ns!=="dumb"&&(hi!=null&&hi!=="0"||is)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!os.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Fu=F(0,0),te=F(1,22),Ke=F(2,22),Lu=F(3,23),ae=F(4,24),$u=F(7,27),Vu=F(8,28),qu=F(9,29),Uu=F(30,39),Re=F(31,39),zt=F(32,39),ze=F(33,39),Ye=F(34,39),ju=F(35,39),Se=F(36,39),Bu=F(37,39),Yt=F(90,39),Qu=F(90,39),Hu=F(40,49),Gu=F(41,49),Ju=F(42,49),Wu=F(43,49),Ku=F(44,49),zu=F(45,49),Yu=F(46,49),Zu=F(47,49);var Xu=100,ss=["green","yellow","blue","magenta","cyan","red"],Zt=[],as=Date.now(),ep=0,wi=typeof process<"u"?process.env:{};globalThis.DEBUG??=wi.DEBUG??"";globalThis.DEBUG_COLORS??=wi.DEBUG_COLORS?wi.DEBUG_COLORS==="true":!0;var Xt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function tp(e){let t={color:ss[ep++%ss.length],enabled:Xt.enabled(e),namespace:e,log:Xt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Zt.push([o,...n]),Zt.length>Xu&&Zt.shift(),Xt.enabled(o)||i){let l=n.map(u=>typeof u=="string"?u:rp(u)),c=`+${Date.now()-as}ms`;as=Date.now(),globalThis.DEBUG_COLORS?a(Xr[s](te(o)),...l,Xr[s](c)):a(o,...l,c)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var q=new Proxy(tp,{get:(e,t)=>Xt[t],set:(e,t,r)=>Xt[t]=r});function rp(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ls(e=7500){let t=Zt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.lengthup,info:()=>cp,log:()=>lp,query:()=>pp,should:()=>Es,tags:()=>er,warn:()=>vi});var er={error:Re("prisma:error"),warn:ze("prisma:warn"),info:Se("prisma:info"),query:Ye("prisma:query")},Es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function lp(...e){console.log(...e)}function vi(e,...t){Es.warn()&&console.warn(`${er.warn} ${e}`,...t)}function cp(e,...t){console.info(`${er.info} ${e}`,...t)}function up(e,...t){console.error(`${er.error} ${e}`,...t)}function pp(e,...t){console.log(`${er.query} ${e}`,...t)}function Ie(e,t){throw new Error(t)}function Ti({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var dp=Ti();function dt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(dp,"")}var rr=H(require("node:path"));function Ai(e){return rr.default.sep===rr.default.posix.sep?e:e.split(rr.default.sep).join(rr.default.posix.sep)}var Ii=H(As()),on=H(require("node:fs"));var mt=H(require("node:path"));function Cs(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],c,u;if(l==="\\")u=a[0],c=u.replace("\\$","$");else{let p=a[2];u=a[0].substring(l.length),c=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",c=r(c)}return o.replace(u,c)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var Si=us("prisma:tryLoadEnv");function ir({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=Rs(e);r.conflictCheck!=="none"&&Rp(n,t,r.conflictCheck);let i=null;return Ss(n?.path,t)||(i=Rs(t)),!n&&!i&&Si("No Environment variables loaded"),i?.dotenvResult.error?console.error(Re(te("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Rp(e,t,r){let n=e?.dotenvResult.parsed,i=!Ss(e?.path,t);if(n&&t&&i&&on.default.existsSync(t)){let o=Ii.default.parse(on.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=mt.default.relative(process.cwd(),e.path),l=mt.default.relative(process.cwd(),t);if(r==="error"){let c=`There is a conflict between env var${s.length>1?"s":""} in ${ae(a)} and ${ae(l)} +Conflicting env vars: +${s.map(u=>` ${te(u)}`).join(` +`)} + +We suggest to move the contents of ${ae(l)} to ${ae(a)} to consolidate your env vars. +`;throw new Error(c)}else if(r==="warn"){let c=`Conflict for env var${s.length>1?"s":""} ${s.map(u=>te(u)).join(", ")} in ${ae(a)} and ${ae(l)} +Env vars from ${ae(l)} overwrite the ones from ${ae(a)} + `;console.warn(`${ze("warn(prisma)")} ${c}`)}}}}function Rs(e){if(Sp(e)){Si(`Environment variables loaded from ${e}`);let t=Ii.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Cs(t),message:Ke(`Environment variables loaded from ${mt.default.relative(process.cwd(),e)}`),path:e}}else Si(`Environment variables not found at ${e}`);return null}function Ss(e,t){return e&&t&&mt.default.resolve(e)===mt.default.resolve(t)}function Sp(e){return!!(e&&on.default.existsSync(e))}function ki(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function an(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Oi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ks.has(e)||(ks.add(e),vi(t,...r))};var N=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};P(N,"PrismaClientInitializationError");var U=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};P(U,"PrismaClientKnownRequestError");var re=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};P(re,"PrismaClientRustPanicError");var J=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};P(J,"PrismaClientUnknownRequestError");var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};P(X,"PrismaClientValidationError");var Ee=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function Le(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ds(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}function sr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Ns(e){return{models:Di(e.models),enums:Di(e.enums),types:Di(e.types)}}function Di(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function ft(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function ln(e){return e.toString()!=="Invalid Date"}var gt=9e15,Ue=1e9,Ni="0123456789abcdef",pn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",dn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",_i={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-gt,maxE:gt,crypto:!1},Ls,Oe,b=!0,fn="[DecimalError] ",qe=fn+"Invalid argument: ",$s=fn+"Precision limit exceeded",Vs=fn+"crypto unavailable",qs="[object Decimal]",ee=Math.floor,Q=Math.pow,Ip=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Op=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Us=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,E=7,Dp=9007199254740991,Np=pn.length-1,Mi=dn.length-1,f={toStringTag:qs};f.absoluteValue=f.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),h(e)};f.ceil=function(){return h(new this.constructor(this),this.e+1,2)};f.clampedTo=f.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(qe+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};f.comparedTo=f.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!s||!a)return!l||!c?NaN:l!==c?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};f.cosine=f.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=_p(n,Gs(n,r)),n.precision=e,n.rounding=t,h(Oe==2||Oe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};f.cubeRoot=f.cbrt=function(){var e,t,r,n,i,o,s,a,l,c,u=this,p=u.constructor;if(!u.isFinite()||u.isZero())return new p(u);for(b=!1,o=u.s*Q(u.s*u,1/3),!o||Math.abs(o)==1/0?(r=W(u.d),e=u.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=Q(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=u.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),c=l.plus(u),n=M(c.plus(u).times(a),c.plus(l),s+2,1),W(a.d).slice(0,s)===(r=W(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(h(a,e+1,0),a.times(a).times(a).eq(u))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(h(n,e+1,1),t=!n.times(n).times(n).eq(u));break}return b=!0,h(n,e,p.rounding,t)};f.decimalPlaces=f.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/E))*E,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};f.dividedBy=f.div=function(e){return M(this,new this.constructor(e))};f.dividedToIntegerBy=f.divToInt=function(e){var t=this,r=t.constructor;return h(M(t,new r(e),0,1,1),r.precision,r.rounding)};f.equals=f.eq=function(e){return this.cmp(e)===0};f.floor=function(){return h(new this.constructor(this),this.e+1,3)};f.greaterThan=f.gt=function(e){return this.cmp(e)>0};f.greaterThanOrEqualTo=f.gte=function(e){var t=this.cmp(e);return t==1||t===0};f.hyperbolicCosine=f.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/yn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=yt(s,1,o.times(t),new s(1),!0);for(var l,c=e,u=new s(8);c--;)l=o.times(o),o=a.minus(l.times(u.minus(l.times(u))));return h(o,s.precision=r,s.rounding=n,!0)};f.hyperbolicSine=f.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=yt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/yn(5,e)),i=yt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(c))))}return o.precision=t,o.rounding=r,h(i,t,r,!0)};f.hyperbolicTangent=f.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,M(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};f.inverseCosine=f.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?xe(t,n,i):new t(0):new t(NaN):e.isZero()?xe(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};f.inverseHyperbolicCosine=f.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,b=!1,r=r.times(r).minus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};f.inverseHyperbolicSine=f.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,b=!1,r=r.times(r).plus(1).sqrt().plus(r),b=!0,n.precision=e,n.rounding=t,r.ln())};f.inverseHyperbolicTangent=f.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?h(new o(i),e,t,!0):(o.precision=r=n-i.e,i=M(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};f.inverseSine=f.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=xe(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};f.inverseTangent=f.atan=function(){var e,t,r,n,i,o,s,a,l,c=this,u=c.constructor,p=u.precision,d=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&p+4<=Mi)return s=xe(u,p+4,d).times(.25),s.s=c.s,s}else{if(!c.s)return new u(NaN);if(p+4<=Mi)return s=xe(u,p+4,d).times(.5),s.s=c.s,s}for(u.precision=a=p+10,u.rounding=1,r=Math.min(28,a/E+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(b=!1,t=Math.ceil(a/E),n=1,l=c.times(c),s=new u(c),i=c;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};f.isNaN=function(){return!this.s};f.isNegative=f.isNeg=function(){return this.s<0};f.isPositive=f.isPos=function(){return this.s>0};f.isZero=function(){return!!this.d&&this.d[0]===0};f.lessThan=f.lt=function(e){return this.cmp(e)<0};f.lessThanOrEqualTo=f.lte=function(e){return this.cmp(e)<1};f.logarithm=f.log=function(e){var t,r,n,i,o,s,a,l,c=this,u=c.constructor,p=u.precision,d=u.rounding,m=5;if(e==null)e=new u(10),t=!0;else{if(e=new u(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new u(r&&!r[0]?-1/0:c.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(b=!1,a=p+m,s=Ve(c,a),n=t?mn(u,a+10):Ve(e,a),l=M(s,n,a,1),ar(l.d,i=p,d))do if(a+=10,s=Ve(c,a),n=t?mn(u,a+10):Ve(e,a),l=M(s,n,a,1),!o){+W(l.d).slice(i+1,i+15)+1==1e14&&(l=h(l,p+1,0));break}while(ar(l.d,i+=10,d));return b=!0,h(l,p,d)};f.minus=f.sub=function(e){var t,r,n,i,o,s,a,l,c,u,p,d,m=this,y=m.constructor;if(e=new y(e),!m.d||!e.d)return!m.s||!e.s?e=new y(NaN):m.d?e.s=-e.s:e=new y(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,d=e.d,a=y.precision,l=y.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else if(c[0])e=new y(m);else return new y(l===3?-0:0);return b?h(e,a,l):e}if(r=ee(e.e/E),u=ee(m.e/E),c=c.slice(),o=u-r,o){for(p=o<0,p?(t=c,o=-o,s=d.length):(t=d,r=u,s=c.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=c.length,s=d.length,p=n0;--n)c[s++]=0;for(n=d.length;n>o;){if(c[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=c.length,i=u.length,s-i<0&&(i=s,r=u,u=c,c=r),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/ge|0,c[i]%=ge;for(t&&(c.unshift(t),++n),s=c.length;c[--s]==0;)c.pop();return e.d=c,e.e=gn(c,n),b?h(e,a,l):e};f.precision=f.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(qe+e);return r.d?(t=js(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};f.round=function(){var e=this,t=e.constructor;return h(new t(e),e.e+1,t.rounding)};f.sine=f.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+E,n.rounding=1,r=Fp(n,Gs(n,r)),n.precision=e,n.rounding=t,h(Oe>2?r.neg():r,e,t,!0)):new n(NaN)};f.squareRoot=f.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,c=s.s,u=s.constructor;if(c!==1||!a||!a[0])return new u(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);for(b=!1,c=Math.sqrt(+s),c==0||c==1/0?(t=W(a),(t.length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),c==1/0?t="5e"+l:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new u(t)):n=new u(c.toString()),r=(l=u.precision)+3;;)if(o=n,n=o.plus(M(s,o,r+2,1)).times(.5),W(o.d).slice(0,r)===(t=W(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(h(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(h(n,l+1,1),e=!n.times(n).eq(s));break}return b=!0,h(n,l,u.rounding,e)};f.tangent=f.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=M(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,h(Oe==2||Oe==4?r.neg():r,e,t,!0)):new n(NaN)};f.times=f.mul=function(e){var t,r,n,i,o,s,a,l,c,u=this,p=u.constructor,d=u.d,m=(e=new p(e)).d;if(e.s*=u.s,!d||!d[0]||!m||!m[0])return new p(!e.s||d&&!d[0]&&!m||m&&!m[0]&&!d?NaN:!d||!m?e.s/0:e.s*0);for(r=ee(u.e/E)+ee(e.e/E),l=d.length,c=m.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+m[n]*d[i-n-1]+t,o[i--]=a%ge|0,t=a/ge|0;o[i]=(o[i]+t)%ge|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=gn(o,r),b?h(e,p.precision,p.rounding):e};f.toBinary=function(e,t){return Li(this,2,e,t)};f.toDecimalPlaces=f.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,Ue),t===void 0?t=n.rounding:le(t,0,8),h(r,e+r.e+1,t))};f.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(le(e,0,Ue),t===void 0?t=i.rounding:le(t,0,8),n=h(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};f.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(le(e,0,Ue),t===void 0?t=o.rounding:le(t,0,8),n=h(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};f.toFraction=function(e){var t,r,n,i,o,s,a,l,c,u,p,d,m=this,y=m.d,g=m.constructor;if(!y)return new g(m);if(c=r=new g(1),n=l=new g(0),t=new g(n),o=t.e=js(y)-m.e-1,s=o%E,t.d[0]=Q(10,s<0?E+s:s),e==null)e=o>0?t:c;else{if(a=new g(e),!a.isInt()||a.lt(c))throw Error(qe+a);e=a.gt(t)?o>0?t:c:a}for(b=!1,a=new g(W(y)),u=g.precision,g.precision=o=y.length*E*2;p=M(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=c,c=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=M(e.minus(r),n,0,1,1),l=l.plus(i.times(c)),r=r.plus(i.times(n)),l.s=c.s=m.s,d=M(c,n,o,1).minus(m).abs().cmp(M(l,r,o,1).minus(m).abs())<1?[c,n]:[l,r],g.precision=u,b=!0,d};f.toHexadecimal=f.toHex=function(e,t){return Li(this,16,e,t)};f.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:le(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(b=!1,r=M(r,e,0,t,1).times(e),b=!0,h(r)):(e.s=r.s,r=e),r};f.toNumber=function(){return+this};f.toOctal=function(e,t){return Li(this,8,e,t)};f.toPower=f.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,c=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,c));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return h(a,n,o);if(t=ee(e.e/E),t>=e.d.length-1&&(r=c<0?-c:c)<=Dp)return i=Bs(l,a,r,n),e.s<0?new l(1).div(i):h(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(b=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Fi(e.times(Ve(a,n+r)),n),i.d&&(i=h(i,n+5,1),ar(i.d,n,o)&&(t=n+10,i=h(Fi(e.times(Ve(a,t+r)),t),t+5,1),+W(i.d).slice(n+1,n+15)+1==1e14&&(i=h(i,n+1,0)))),i.s=s,b=!0,l.rounding=o,h(i,n,o))};f.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(le(e,1,Ue),t===void 0?t=i.rounding:le(t,0,8),n=h(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};f.toSignificantDigits=f.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,Ue),t===void 0?t=n.rounding:le(t,0,8)),h(new n(r),e,t)};f.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};f.truncated=f.trunc=function(){return h(new this.constructor(this),this.e+1,1)};f.valueOf=f.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function W(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(qe+e)}function ar(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=E,i=0):(i=Math.ceil((t+1)/E),t%=E),o=Q(10,E-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,t-3)-1,s}function cn(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function _p(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/yn(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=yt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var M=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var c,u,p,d,m,y,g,I,A,C,w,k,fe,pe,Kt,j,se,Ce,z,ct,Yr=n.constructor,fi=n.s==i.s?1:-1,Y=n.d,D=i.d;if(!Y||!Y[0]||!D||!D[0])return new Yr(!n.s||!i.s||(Y?D&&Y[0]==D[0]:!D)?NaN:Y&&Y[0]==0||!D?fi*0:fi/0);for(l?(m=1,u=n.e-i.e):(l=ge,m=E,u=ee(n.e/m)-ee(i.e/m)),z=D.length,se=Y.length,A=new Yr(fi),C=A.d=[],p=0;D[p]==(Y[p]||0);p++);if(D[p]>(Y[p]||0)&&u--,o==null?(pe=o=Yr.precision,s=Yr.rounding):a?pe=o+(n.e-i.e)+1:pe=o,pe<0)C.push(1),y=!0;else{if(pe=pe/m+2|0,p=0,z==1){for(d=0,D=D[0],pe++;(p1&&(D=e(D,d,l),Y=e(Y,d,l),z=D.length,se=Y.length),j=z,w=Y.slice(0,z),k=w.length;k=l/2&&++Ce;do d=0,c=t(D,w,z,k),c<0?(fe=w[0],z!=k&&(fe=fe*l+(w[1]||0)),d=fe/Ce|0,d>1?(d>=l&&(d=l-1),g=e(D,d,l),I=g.length,k=w.length,c=t(g,w,I,k),c==1&&(d--,r(g,z=10;d/=10)p++;A.e=p+u*m-1,h(A,a?o+A.e+1:o,s,y)}return A}}();function h(e,t,r,n){var i,o,s,a,l,c,u,p,d,m=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=E,s=t,u=p[d=0],l=u/Q(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);u=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(u=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:u/Q(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?u:u%Q(10,i-s-1)),c=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?u/Q(10,i-s):0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,c?(t-=e.e+1,p[0]=Q(10,(E-t%E)%E),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=Q(10,E-o),p[d]=s>0?(u/Q(10,i-s)%Q(10,s)|0)*a:0),c)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==ge&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=ge)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return b&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+$e(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+$e(-i-1)+o,r&&(n=r-s)>0&&(o+=$e(n))):i>=s?(o+=$e(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+$e(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=$e(n))),o}function gn(e,t){var r=e[0];for(t*=E;r>=10;r/=10)t++;return t}function mn(e,t,r){if(t>Np)throw b=!0,r&&(e.precision=r),Error($s);return h(new e(pn),t,1,!0)}function xe(e,t,r){if(t>Mi)throw Error($s);return h(new e(dn),t,r,!0)}function js(e){var t=e.length-1,r=t*E+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function $e(e){for(var t="";e--;)t+="0";return t}function Bs(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(b=!1;;){if(r%2&&(o=o.times(t),Ms(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Ms(t.d,s)}return b=!0,o}function _s(e){return e.d[e.d.length-1]&1}function Qs(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(b=!1,l=y):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(Q(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=h(o.times(e),l,1),r=r.times(++u),a=s.plus(M(o,r,l,1)),W(a.d).slice(0,l)===W(s.d).slice(0,l)){for(i=p;i--;)s=h(s.times(s),l,1);if(t==null)if(c<3&&ar(s.d,l-n,m,c))d.precision=l+=10,r=o=a=new d(1),u=0,c++;else return h(s,d.precision=y,m,b=!0);else return d.precision=y,s}s=a}}function Ve(e,t){var r,n,i,o,s,a,l,c,u,p,d,m=1,y=10,g=e,I=g.d,A=g.constructor,C=A.rounding,w=A.precision;if(g.s<0||!I||!I[0]||!g.e&&I[0]==1&&I.length==1)return new A(I&&!I[0]?-1/0:g.s!=1?NaN:I?0:g);if(t==null?(b=!1,u=w):u=t,A.precision=u+=y,r=W(I),n=r.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=W(g.d),n=r.charAt(0),m++;o=g.e,n>1?(g=new A("0."+r),o++):g=new A(n+"."+r.slice(1))}else return c=mn(A,u+2,w).times(o+""),g=Ve(new A(n+"."+r.slice(1)),u-y).plus(c),A.precision=w,t==null?h(g,w,C,b=!0):g;for(p=g,l=s=g=M(g.minus(1),g.plus(1),u,1),d=h(g.times(g),u,1),i=3;;){if(s=h(s.times(d),u,1),c=l.plus(M(s,new A(i),u,1)),W(c.d).slice(0,u)===W(l.d).slice(0,u))if(l=l.times(2),o!==0&&(l=l.plus(mn(A,u+2,w).times(o+""))),l=M(l,new A(m),u,1),t==null)if(ar(l.d,u-y,C,a))A.precision=u+=y,c=s=g=M(p.minus(1),p.plus(1),u,1),d=h(g.times(g),u,1),i=a=1;else return h(l,A.precision=w,C,b=!0);else return A.precision=w,l;l=c,i+=2}}function Hs(e){return String(e.s*e.s/0)}function un(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%E,r<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Us.test(t))return un(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(kp.test(t))r=16,t=t.toLowerCase();else if(Ip.test(t))r=2;else if(Op.test(t))r=8;else throw Error(qe+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Bs(n,new n(r),o,o*2)),c=cn(t,r,ge),u=c.length-1,o=u;c[o]===0;--o)c.pop();return o<0?new n(e.s*0):(e.e=gn(c,u),e.d=c,b=!1,s&&(e=M(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):De.pow(2,l))),b=!0,e)}function Fp(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:yt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/yn(5,r)),t=yt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function yt(e,t,r,n,i){var o,s,a,l,c=1,u=e.precision,p=Math.ceil(u/E);for(b=!1,l=r.times(r),a=new e(n);;){if(s=M(a.times(l),new e(t++*t++),u,1),a=i?n.plus(s):n.minus(s),n=M(s.times(l),new e(t++*t++),u,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,c++}return b=!0,s.d.length=p+1,s}function yn(e,t){for(var r=e;--t;)r*=e;return r}function Gs(e,t){var r,n=t.s<0,i=xe(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Oe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Oe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Oe=_s(r)?n?2:3:n?4:1,t;Oe=_s(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Li(e,t,r,n){var i,o,s,a,l,c,u,p,d,m=e.constructor,y=r!==void 0;if(y?(le(r,1,Ue),n===void 0?n=m.rounding:le(n,0,8)):(r=m.precision,n=m.rounding),!e.isFinite())u=Hs(e);else{for(u=be(e),s=u.indexOf("."),y?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(u=u.replace(".",""),d=new m(1),d.e=u.length-s,d.d=cn(be(d),10,i),d.e=d.d.length),p=cn(u,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])u=y?"0p+0":"0";else{if(s<0?o--:(e=new m(e),e.d=p,e.e=o,e=M(e,d,r,n,0,i),p=e.d,o=e.e,c=Ls),s=p[r],a=i/2,c=c||p[r+1]!==void 0,c=n<4?(s!==void 0||c)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||c||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,c)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,u="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)u+="0";for(p=cn(u,i,t),l=p.length;!p[l-1];--l);for(s=1,u="1.";sl)for(o-=l;o--;)u+="0";else ot)return e.length=t,!0}function Lp(e){return new this(e).abs()}function $p(e){return new this(e).acos()}function Vp(e){return new this(e).acosh()}function qp(e,t){return new this(e).plus(t)}function Up(e){return new this(e).asin()}function jp(e){return new this(e).asinh()}function Bp(e){return new this(e).atan()}function Qp(e){return new this(e).atanh()}function Hp(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=xe(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?xe(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=xe(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(M(e,t,o,1)),t=xe(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(M(e,t,o,1)),r}function Gp(e){return new this(e).cbrt()}function Jp(e){return h(e=new this(e),e.e+1,2)}function Wp(e,t,r){return new this(e).clamp(t,r)}function Kp(e){if(!e||typeof e!="object")throw Error(fn+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ue,"rounding",0,8,"toExpNeg",-gt,0,"toExpPos",0,gt,"maxE",0,gt,"minE",-gt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(qe+r+": "+n);if(r="crypto",i&&(this[r]=_i[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Vs);else this[r]=!1;else throw Error(qe+r+": "+n);return this}function zp(e){return new this(e).cos()}function Yp(e){return new this(e).cosh()}function Js(e){var t,r,n;function i(o){var s,a,l,c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,Fs(o)){c.s=o.s,b?!o.d||o.e>i.maxE?(c.e=NaN,c.d=null):o.e=10;a/=10)s++;b?s>i.maxE?(c.e=NaN,c.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Vs);else for(;o=10;i/=10)n++;nwt,datamodelEnumToSchemaEnum:()=>Pd});function Pd(e){return{name:e.name,values:e.values.map(t=>t.name)}}var wt=(w=>(w.findUnique="findUnique",w.findUniqueOrThrow="findUniqueOrThrow",w.findFirst="findFirst",w.findFirstOrThrow="findFirstOrThrow",w.findMany="findMany",w.create="create",w.createMany="createMany",w.createManyAndReturn="createManyAndReturn",w.update="update",w.updateMany="updateMany",w.updateManyAndReturn="updateManyAndReturn",w.upsert="upsert",w.delete="delete",w.deleteMany="deleteMany",w.groupBy="groupBy",w.count="count",w.aggregate="aggregate",w.findRaw="findRaw",w.aggregateRaw="aggregateRaw",w))(wt||{});var Zs=H(ws());var Ys=H(require("node:fs"));var Ws={keyword:Se,entity:Se,value:e=>te(Ye(e)),punctuation:Ye,directive:Se,function:Se,variable:e=>te(Ye(e)),string:e=>te(zt(e)),boolean:ze,number:Se,comment:Yt};var vd=e=>e,hn={},Td=0,T={manual:hn.Prism&&hn.Prism.manual,disableWorkerMessageHandler:hn.Prism&&hn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let t=e;return new ye(t.type,T.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(T.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ce instanceof ye)continue;if(fe&&j!=t.length-1){C.lastIndex=se;var p=C.exec(e);if(!p)break;var u=p.index+(k?p[1].length:0),d=p.index+p[0].length,a=j,l=se;for(let D=t.length;a=l&&(++j,se=l);if(t[j]instanceof ye)continue;c=a-j,Ce=e.slice(se,l),p.index-=se}else{C.lastIndex=0;var p=C.exec(Ce),c=1}if(!p){if(o)break;continue}k&&(pe=p[1]?p[1].length:0);var u=p.index+pe,p=p[0].slice(pe),d=u+p.length,m=Ce.slice(0,u),y=Ce.slice(d);let z=[j,c];m&&(++j,se+=m.length,z.push(m));let ct=new ye(g,w?T.tokenize(p,w):p,Kt,p,fe);if(z.push(ct),y&&z.push(y),Array.prototype.splice.apply(t,z),c!=1&&T.matchGrammar(e,t,r,j,se,!0,g),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return T.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=T.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=T.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:ye};T.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};T.languages.javascript=T.languages.extend("clike",{"class-name":[T.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});T.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;T.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:T.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:T.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:T.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:T.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});T.languages.markup&&T.languages.markup.tag.addInlined("script","javascript");T.languages.js=T.languages.javascript;T.languages.typescript=T.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});T.languages.ts=T.languages.typescript;function ye(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return ye.stringify(r,t)}).join(""):Ad(e.type)(e.content)};function Ad(e){return Ws[e]||vd}function Ks(e){return Cd(e,T.languages.javascript)}function Cd(e,t){return T.tokenize(e,t).map(n=>ye.stringify(n)).join("")}function zs(e){return bi(e)}var wn=class e{firstLineNumber;lines;static read(t){let r;try{r=Ys.default.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,zs(n).split(` +`))}highlight(){let t=Ks(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var Rd={red:Re,gray:Yt,dim:Ke,bold:te,underline:ae,highlightSource:e=>e.highlight()},Sd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Id({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function kd({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Id({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),c=wn.read(a.fileName)?.slice(l,a.lineNumber),u=c?.lineAt(a.lineNumber);if(c&&u){let p=Dd(u),d=Od(u);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(c=c.mapLineAt(a.lineNumber,y=>y.slice(0,d.openingBraceIndex))),c=o.highlightSource(c);let m=String(c.lastLineNumber).length;if(s.contextLines=c.mapLines((y,g)=>o.gray(String(g).padStart(m))+" "+y).mapLines(y=>o.dim(y)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let y=p+m+1;y+=2,s.callArguments=(0,Zs.default)(i,y).slice(y)}}return s}function Od(e){let t=Object.keys(wt).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Dd(e){let t=0;for(let r=0;r"Unknown error")}function na(e){return e.errors.flatMap(t=>t.kind==="Union"?na(t):[t])}function Md(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Fd(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Fd(e,t){return[...new Set(e.concat(t))]}function Ld(e){return Oi(e,(t,r)=>{let n=ea(t),i=ea(r);return n!==i?n-i:ta(t)-ta(r)})}function ea(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ta(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var de=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};oa();var Et=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};ia();var bn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var Pn=e=>e,vn={bold:Pn,red:Pn,green:Pn,dim:Pn,enabled:!1},sa={bold:te,red:Re,green:zt,dim:Ke,enabled:!0},xt={write(e){e.writeLine(",")}};var Pe=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var je=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var bt=class extends je{items=[];addItem(t){return this.items.push(new bn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Pe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Pt=class e extends je{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof bt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Pe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var G=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var cr=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(xt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function xn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":$d(e,t);break;case"IncludeOnScalar":Vd(e,t);break;case"EmptySelection":qd(e,t,r);break;case"UnknownSelectionField":Qd(e,t);break;case"InvalidSelectionValue":Hd(e,t);break;case"UnknownArgument":Gd(e,t);break;case"UnknownInputField":Jd(e,t);break;case"RequiredArgumentMissing":Wd(e,t);break;case"InvalidArgumentType":Kd(e,t);break;case"InvalidArgumentValue":zd(e,t);break;case"ValueTooLarge":Yd(e,t);break;case"SomeFieldsMissing":Zd(e,t);break;case"TooManyFieldsGiven":Xd(e,t);break;case"Union":ra(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function $d(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Vd(e,t){let[r,n]=vt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new de(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ur(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function qd(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ud(e,t,i);return}if(n.hasField("select")){jd(e,t);return}}if(r?.[Le(e.outputType.name)]){Bd(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Ud(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new de(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function jd(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ua(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ur(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Bd(e,t){let r=new cr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new de("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=vt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Pt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Qd(e,t){let r=pa(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":ua(n,e.outputType);break;case"include":em(n,e.outputType);break;case"omit":tm(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ur(n)),i.join(" ")})}function Hd(e,t){let r=pa(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Gd(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),rm(n,e.arguments)),t.addErrorMessage(i=>la(i,r,e.arguments.map(o=>o.name)))}function Jd(e,t){let[r,n]=vt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&da(o,e.inputType)}t.addErrorMessage(o=>la(o,n,e.inputType.fields.map(s=>s.name)))}function la(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=im(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ur(e)),n.join(" ")}function Wd(e,t){let r;t.addErrorMessage(l=>r?.value instanceof G&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=vt(e.argumentPath),s=new cr,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new de(o,s).makeRequired())}else{let l=e.inputTypes.map(ca).join(" | ");a.addSuggestion(new de(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=vt(e.dependentArgumentPath);t.addErrorMessage(c=>`Argument \`${c.green(o)}\` is required because argument \`${c.green(l)}\` was provided.`)}}}function ca(e){return e.kind==="list"?`${ca(e.elementType)}[]`:e.name}function Kd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Tn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function zd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Tn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Yd(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Zd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&da(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Tn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ur(i)),o.join(" ")})}function Xd(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Tn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ua(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new de(r.name,"true"))}function em(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new de(r.name,"true"))}function tm(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new de(r.name,"true"))}function rm(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new de(r.name,r.typeNames.join(" | ")))}function pa(e,t){let[r,n]=vt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function da(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new de(r.name,r.typeNames.join(" | ")))}function vt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ur({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Tn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var nm=3;function im(e,t){let r=1/0,n;for(let i of t){let o=(0,aa.default)(e,i);o>nm||o`}};function Tt(e){return e instanceof pr}var An=Symbol(),qi=new WeakMap,Ne=class{constructor(t){t===An?qi.set(this,`Prisma.${this._getName()}`):qi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return qi.get(this)}},dr=class extends Ne{_getNamespace(){return"NullTypes"}},mr=class extends dr{#t};Ui(mr,"DbNull");var fr=class extends dr{#t};Ui(fr,"JsonNull");var gr=class extends dr{#t};Ui(gr,"AnyNull");var Cn={classes:{DbNull:mr,JsonNull:fr,AnyNull:gr},instances:{DbNull:new mr(An),JsonNull:new fr(An),AnyNull:new gr(An)}};function Ui(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var ma=": ",Rn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ma.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(ma).write(this.value)}};var ji=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function At(e){return new ji(fa(e))}function fa(e){let t=new Pt;for(let[r,n]of Object.entries(e)){let i=new Rn(r,ga(n));t.addField(i)}return t}function ga(e){if(typeof e=="string")return new G(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new G(String(e));if(typeof e=="bigint")return new G(`${e}n`);if(e===null)return new G("null");if(e===void 0)return new G("undefined");if(ht(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=ln(e)?e.toISOString():"Invalid Date";return new G(`new Date("${t}")`)}return e instanceof Ne?new G(`Prisma.${e._getName()}`):Tt(e)?new G(`prisma.${Le(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?om(e):typeof e=="object"?fa(e):new G(Object.prototype.toString.call(e))}function om(e){let t=new bt;for(let r of e)t.addItem(ga(r));return t}function Sn(e,t){let r=t==="pretty"?sa:vn,n=e.renderAllMessages(r),i=new Et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function In({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=At(e);for(let p of t)xn(p,a,s);let{message:l,args:c}=Sn(a,r),u=En({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:c});throw new X(u,{clientVersion:o})}function ve(e){return e.replace(/^./,t=>t.toLowerCase())}function ha(e,t,r){let n=ve(r);return!t.result||!(t.result.$allModels||t.result[n])?e:sm({...e,...ya(t.name,e,t.result.$allModels),...ya(t.name,e,t.result[n])})}function sm(e){let t=new Ee,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return an(e,n=>({...n,needs:r(n.name,new Set)}))}function ya(e,t,r){return r?an(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:am(t,o,i)})):{}}function am(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function wa(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Ea(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ee;modelExtensionsCache=new Ee;queryCallbacksCache=new Ee;clientExtensions=sr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=sr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ha(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ve(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var On=class{constructor(t){this.name=t}};function xa(e){return e instanceof On}function ba(e){return new On(e)}var Pa=Symbol(),yr=class{constructor(t){if(t!==Pa)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Dn:t}},Dn=new yr(Pa);function Te(e){return e instanceof yr}var lm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},va="explicitly `undefined` values are not allowed";function Nn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:c,globalOmit:u}){let p=new Bi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:c,globalOmit:u});return{modelName:e,action:lm[t],query:hr(r,p)}}function hr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Aa(r,n),selection:cm(e,t,i,n)}}function cm(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),mm(e,n)):um(n,t,r)}function um(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&pm(n,t,e),dm(n,r,e),n}function pm(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(Qi(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=hr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=hr(i,o)}}function dm(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Ea(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;Qi(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function mm(e,t){let r={},n=t.getComputedFields(),i=wa(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);Qi(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=hr({},a):r[o]=!0;continue}r[o]=hr(s,a)}}return r}function Ta(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ft(e)){if(ln(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(xa(e))return{$type:"Param",value:e.name};if(Tt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return fm(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(r,n,i).toString("base64")}}if(gm(e))return e.values;if(ht(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ne){if(e!==Cn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ym(e))return e.toJSON();if(typeof e=="object")return Aa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Aa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Ta(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:va}))}return r}function fm(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Le(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ie(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};function Ca(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Rt=class{_client;constructor(t){this._client=t}prometheus(t){return Ca(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Ca(this._client),this._client._engine.metrics({format:"json",...t})}};function Ra(e,t){let r=sr(()=>hm(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function hm(e){return{datamodel:{models:Hi(e.models),enums:Hi(e.enums),types:Hi(e.types)}}}function Hi(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var Gi=new WeakMap,_n="$$PrismaTypedSql",wr=class{constructor(t,r){Gi.set(this,{sql:t,values:r}),Object.defineProperty(this,_n,{value:_n})}get sql(){return Gi.get(this).sql}get values(){return Gi.get(this).values}};function Sa(e){return(...t)=>new wr(e,t)}function Mn(e){return e!=null&&e[_n]===_n}var vu=H(xi());var Tu=require("node:async_hooks"),Au=require("node:events"),Cu=H(require("node:fs")),mi=H(require("node:path"));var ce=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}var Fn={enumerable:!0,configurable:!0,writable:!0};function Ln(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Fn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Oa=Symbol.for("nodejs.util.inspect.custom");function he(e,t){let r=wm(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Da(Reflect.ownKeys(o),r),a=Da(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Fn,...l?.getPropertyDescriptor(s)}:Fn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Oa]=function(){let o={...this};return delete o[Oa],o},i}function wm(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Da(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function St(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function It(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}function Na(e){if(e===void 0)return"";let t=At(e);return new Et(0,{colors:vn}).write(t).toString()}var Em="P2037";function $n({error:e,user_facing_error:t},r,n){return t.error_code?new U(xm(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function xm(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Em&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var xr="";function _a(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=vm(n)||Am(n)||Sm(n)||Dm(n)||km(n);return i&&r.push(i),r},[])}var bm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pm=/\((\S*)(?::(\d+))(?::(\d+))\)/;function vm(e){var t=bm.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Pm.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||xr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Tm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Am(e){var t=Tm.exec(e);return t?{file:t[2],methodName:t[1]||xr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Cm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Rm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Sm(e){var t=Cm.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Rm.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||xr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Im=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function km(e){var t=Im.exec(e);return t?{file:t[3],methodName:t[1]||xr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Om=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Dm(e){var t=Om.exec(e);return t?{file:t[2],methodName:t[1]||xr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Ki=class{getLocation(){return null}},zi=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=_a(t).find(i=>{if(!i.file)return!1;let o=Ai(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Be(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ki:new zi}var Ma={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function kt(e={}){let t=_m(e);return Object.entries(t).reduce((n,[i,o])=>(Ma[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function _m(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Vn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Fa(e,t){let r=Vn(e);return t({action:"aggregate",unpacker:r,argsMapper:kt})(e)}function Mm(e={}){let{select:t,...r}=e;return typeof t=="object"?kt({...r,_count:t}):kt({...r,_count:{_all:!0}})}function Fm(e={}){return typeof e.select=="object"?t=>Vn(e)(t)._count:t=>Vn(e)(t)._count._all}function La(e,t){return t({action:"count",unpacker:Fm(e),argsMapper:Mm})(e)}function Lm(e={}){let t=kt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function $m(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function $a(e,t){return t({action:"groupBy",unpacker:$m(e),argsMapper:Lm})(e)}function Va(e,t,r){if(t==="aggregate")return n=>Fa(n,r);if(t==="count")return n=>La(n,r);if(t==="groupBy")return n=>$a(n,r)}function qa(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ds(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new pr(e,o,s.type,s.isList,s.kind==="enum")},...Ln(Object.keys(n))})}var Ua=e=>Array.isArray(e)?e:e.split("."),Yi=(e,t)=>Ua(t).reduce((r,n)=>r&&r[n],e),ja=(e,t,r)=>Ua(t).reduceRight((n,i,o,s)=>Object.assign({},Yi(e,s.slice(0,o)),{[i]:n}),r);function Vm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function qm(e,t,r){return t===void 0?e??{}:ja(t,r,e||!0)}function Zi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,c)=>({...l,[c.name]:c}),{});return l=>{let c=Be(e._errorFormat),u=Vm(n,i),p=qm(l,o,u),d=r({dataPath:u,callsite:c})(p),m=Um(e,t);return new Proxy(d,{get(y,g){if(!m.includes(g))return y[g];let A=[a[g].type,r,g],C=[u,p];return Zi(e,...A,...C)},...Ln([...m,...Object.getOwnPropertyNames(d)])})}}function Um(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var jm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Bm=["aggregate","count","groupBy"];function Xi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Qm(e,t),Gm(e,t),Er(r),ie("name",()=>t),ie("$name",()=>t),ie("$parent",()=>e._appliedParent)];return he({},n)}function Qm(e,t){let r=ve(t),n=Object.keys(wt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let c=Be(e._errorFormat);return e._createPrismaPromise(u=>{let p={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:u,callsite:c};return e._request({...p,...a})},{action:o,args:l,model:t})};return jm.includes(o)?Zi(e,t,s):Hm(i)?Va(e,i,s):s({})}}}function Hm(e){return Bm.includes(e)}function Gm(e,t){return Ze(ie("fields",()=>{let r=e._runtimeDataModel.models[t];return qa(t,r)}))}function Ba(e){return e.replace(/^./,t=>t.toUpperCase())}var eo=Symbol();function br(e){let t=[Jm(e),Wm(e),ie(eo,()=>e),ie("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Er(r)),he(e,t)}function Jm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Wm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ve),n=[...new Set(t.concat(r))];return Ze({getKeys(){return n},getPropertyValue(i){let o=Ba(i);if(e._runtimeDataModel.models[o]!==void 0)return Xi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Xi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Qa(e){return e[eo]?e[eo]:e}function Ha(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return br(t)}function Ga({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let c=l.needs.filter(u=>n[u]);c.length>0&&a.push(St(c))}else if(r){if(!r[l.name])continue;let c=l.needs.filter(u=>!r[u]);c.length>0&&a.push(St(c))}Km(e,l.needs)&&s.push(zm(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Km(e,t){return t.every(r=>ki(e,r))}function zm(e,t){return Ze(ie(e.name,()=>e.compute(t)))}function qn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;su.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let c=typeof s=="object"?s:{};t[o]=qn({visitor:i,result:t[o],args:c,modelName:l.type,runtimeDataModel:n})}}function Wa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:qn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,c)=>{let u=ve(l);return Ga({result:a,modelName:u,select:c.select,omit:c.select?void 0:{...o?.[u],...c.omit},extensions:n})}})}var Ym=["$connect","$disconnect","$on","$transaction","$extends"],Ka=Ym;function za(e){if(e instanceof ce)return Zm(e);if(Mn(e))return Xm(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:za(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=rl(o,l),a.args=s,Za(e,a,r,n+1)}})})}function Xa(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Za(e,t,s)}function el(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?tl(r,n,0,e):e(r)}}function tl(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=rl(i,l),tl(a,t,r+1,n)}})}var Ya=e=>e;function rl(e=Ya,t=Ya){return r=>e(t(r))}var nl=q("prisma:client"),il={Vercel:"vercel","Netlify CI":"netlify"};function ol({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(nl("checkPlatformCaching:postinstall",e),nl("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in il){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${il[t]}-build`;throw console.error(i),new N(i,r)}}function sl(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}function al(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function ll(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}var cl=H(Is());function ul({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,cl.default)({user:t,repo:r,template:n,title:e,body:i})}function pl({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ls(6e3-(s?.length??0)),l=ll(dt(a)),c=n?`# Description +\`\`\` +${n} +\`\`\``:"",u=dt(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${c} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?al(s):""} +\`\`\` +`),p=ul({title:r,body:u});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${ae(p)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}function O(e,t){throw new Error(t)}function to(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>to(e[r],t[r]))}function Ot(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ne.isDecimal(e[o])||ne.isDecimal(t[o])){let s=dl(e[o]),a=dl(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=ml(e[o]),a=ml(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return fl(e[o])?.getTime()===fl(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return gl(e[o])===gl(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return yl(e[o])===yl(t[o])}return to(e[o],t[o])})}function dl(e){return ne.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ne(e):void 0}function ml(e){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?Buffer.from(e,"base64"):void 0}function fl(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function gl(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function yl(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function vr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():ArrayBuffer.isView(r)?Buffer.from(r.buffer,r.byteOffset,r.byteLength).toString("base64"):r)}function ef(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function tf(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?ef(e)?rf(e):e.constructor!==null&&e.constructor.name!=="Object"?e:tf(e,Qe):e}function rf({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new De(t);case"Json":return JSON.parse(t);default:O(t,"Unknown tagged value")}}var oe=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function Dt(e){if(!en(e))throw e;let t=nf(e),r=hl(e);throw!t||!r?e:new oe(r,t,{driverAdapterError:e})}function no(e){throw en(e)?new oe(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??hl(e)}\``,"P2010",{driverAdapterError:e}):e}function nf(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:O(e.cause,`Unknown error: ${e.cause}`)}}function hl(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${ro(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${ro(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${ro(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:O(e.cause,`Unknown error: ${e.cause}`)}}function ro(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function wl(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Ot(s,i));if(o===-1)return t.expectNonEmpty?new oe("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}var $=class extends Error{name="DataMapperError"};function xl(e,t,r){switch(t.type){case"affectedRows":if(typeof e!="number")throw new $(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"object":return oo(e,t.fields,r,t.skipNulls);case"field":return io(e,"",t.fieldType,r);default:O(t,`Invalid data mapping type: '${t.type}'`)}}function oo(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>El(o,t,r))}if(typeof e=="object")return El(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new $("Expected an array or object, got a string that is not valid JSON",{cause:o})}return oo(i,t,r,n)}throw new $(`Expected an array or an object, got: ${typeof e}`)}function El(e,t,r){if(typeof e!="object")throw new $(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"affectedRows":throw new $(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new $(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=oo(s,o.fields,r,o.skipNulls);break}case"field":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=of(e[s],s,o.fieldType,r);else throw new $(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:O(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function of(e,t,r,n){return e===null?r.arity==="list"?[]:null:r.arity==="list"?e.map((o,s)=>io(o,`${t}[${s}]`,r,n)):io(e,t,r,n)}function io(e,t,r,n){switch(r.type){case"unsupported":return e;case"string":{if(typeof e!="string")throw new $(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new $(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new $(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new $(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"bigint":{if(typeof e!="number"&&typeof e!="string")throw new $(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new $(`Expected a float in column '${t}', got string: ${e}`);return i}throw new $(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new $(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(Array.isArray(e)){for(let i of e)if(i!==0)return!0;return!1}throw new $(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"decimal":if(typeof e!="number"&&typeof e!="string"&&!ne.isDecimal(e))throw new $(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"datetime":{if(typeof e=="string")return{$type:"DateTime",value:af(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new $(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"object":return{$type:"Json",value:vr(e)};case"json":return{$type:"Json",value:`${e}`};case"bytes":{switch(r.encoding){case"base64":if(typeof e!="string")throw new $(`Expected a base64-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:e};case"hex":if(typeof e!="string"||!e.startsWith("\\x"))throw new $(`Expected a hex-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:Buffer.from(e.slice(2),"hex").toString("base64")};case"array":if(Array.isArray(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:Buffer.from(e).toString("base64")};throw new $(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`);default:O(r.encoding,`DataMapper: Unknown bytes encoding: ${r.encoding}`)}break}case"enum":{let i=n[r.name];if(i===void 0)throw new $(`Unknown enum '${r.name}'`);let o=i[`${e}`];if(o===void 0)throw new $(`Value '${e}' not found in enum '${r.name}'`);return o}default:O(r,`DataMapper: Unknown result type: ${r.type}`)}}var sf=/\d{2}:\d{2}:\d{2}(?:\.\d+)?(Z|[+-]\d{2}(:?\d{2})?)?$/;function af(e){let t=sf.exec(e);if(t===null)return`${e}T00:00:00Z`;let r=e,[n,i,o]=t;if(i!==void 0&&i!=="Z"&&o===void 0?r=`${e}:00`:i===void 0&&(r=`${e}Z`),n.length===e.length)return`1970-01-01T${r}`;let s=t.index-1;return r[s]===" "&&(r=`${r.slice(0,s)}T${r.slice(s+1)}`),r}var Tr;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Tr||(Tr={}));function lf(e){switch(e){case"postgresql":case"postgres":case"prisma+postgres":return"postgresql";case"sqlserver":return"mssql";case"mysql":case"sqlite":case"cockroachdb":case"mongodb":return e;default:O(e,`Unknown provider: ${e}`)}}async function Un({query:e,tracingHelper:t,provider:r,onQuery:n,execute:i}){return await t.runInChildSpan({name:"db_query",kind:Tr.CLIENT,attributes:{"db.query.text":e.sql,"db.system.name":lf(r)}},async()=>{let o=new Date,s=performance.now(),a=await i(),l=performance.now();return n?.({timestamp:o,duration:l-s,query:e.sql,params:e.args}),a})}function Xe(e,t){var r="000000000"+e;return r.substr(r.length-t)}var bl=H(require("node:os"),1);function cf(){try{return bl.default.hostname()}catch{return process.env._CLUSTER_NETWORK_NAME_||process.env.COMPUTERNAME||"hostname"}}var Pl=2,uf=Xe(process.pid.toString(36),Pl),vl=cf(),pf=vl.length,df=Xe(vl.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+pf+36).toString(36),Pl);function so(){return uf+df}function jn(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function ao(e){let n=Math.pow(36,4),i=0;function o(){return Xe((Math.random()*n<<0).toString(36),4)}function s(){return i=itt.length&&(ho.webcrypto.getRandomValues(tt),Mt=0),Mt+=e}function wo(e=21){eg(e|=0);let t="";for(let r=Mt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(kr.default?.randomBytes)return()=>kr.default.randomBytes(1).readUInt8()/255;throw new nt(rt.PRNGDetectFailure,"Failed to find a reliable PRNG")}function ig(){return ag()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function og(e,t){let r="";for(;e>0;e--)r=rg(t)+r;return r}function sg(e,t=wc){if(isNaN(e))throw new nt(rt.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>yc)throw new nt(rt.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${yc}: ${e}`);if(e<0)throw new nt(rt.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new nt(rt.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Or,n=hc.charAt(r)+n,e=(e-r)/Or;return n}function ag(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Ec(e,t){let r=t||ng(),n=!e||isNaN(e)?Date.now():e;return sg(n,wc)+og(tg,r)}var K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).slice(1));function Gn(e,t=0){return(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase()}var xc=require("node:crypto"),Wn=new Uint8Array(256),Jn=Wn.length;function Ft(){return Jn>Wn.length-16&&((0,xc.randomFillSync)(Wn),Jn=0),Wn.slice(Jn,Jn+=16)}var bc=require("node:crypto"),Eo={randomUUID:bc.randomUUID};function lg(e,t,r){if(Eo.randomUUID&&!t&&!e)return Eo.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ft();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Gn(n)}var xo=lg;var bo={};function cg(e,t,r){let n;if(e)n=Pc(e.random??e.rng?.()??Ft(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ft();ug(bo,i,o),n=Pc(o,bo.msecs,bo.seq,t,r)}return t??Gn(n)}function ug(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function Pc(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var Po=cg;var Kn=class{#t={};constructor(){this.register("uuid",new To),this.register("cuid",new Ao),this.register("ulid",new Co),this.register("nanoid",new Ro),this.register("product",new So)}snapshot(){return Object.create(this.#t,{now:{value:new vo}})}register(t,r){this.#t[t]=r}},vo=class{#t=new Date;generate(){return this.#t.toISOString()}},To=class{generate(t){if(t===4)return xo();if(t===7)return Po();throw new Error("Invalid UUID generator arguments")}},Ao=class{generate(t){if(t===1)return Tl();if(t===2)return(0,vc.createId)();throw new Error("Invalid CUID generator arguments")}},Co=class{generate(){return Ec()}},Ro=class{generate(t){if(typeof t=="number")return wo(t);if(t===void 0)return wo();throw new Error("Invalid Nanoid generator arguments")}},So=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};function zn(e,t){return e==null?e:typeof e=="string"?zn(JSON.parse(e),t):Array.isArray(e)?dg(e,t):pg(e,t)}function pg(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Ot(e,i))return null}return Ac(e,t.nested)}function Ac(e,t){for(let[r,n]of Object.entries(t))e[r]=zn(e[r],n);return e}function dg(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=mg(e,r)}return t.pagination&&(e=fg(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>Ac(r,t.nested))}function mg(e,t){let r=new Set,n=[];for(let i of e){let o=Lt(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function fg(e,t,r){if(r===null)return Tc(e,t);let n=new Map;for(let o of e){let s=Lt(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>Tc(o,t))}function Tc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Ot(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Lt(e,t){return JSON.stringify(t.map(r=>e[r]))}function Io(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function ko(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function No(e,t,r,n){let i=e.args.map(o=>we(o,t,r));switch(e.type){case"rawSql":return[hg(e.sql,i,e.argTypes)];case"templateSql":return(e.chunkable?Eg(e.fragments,i,n):[i]).map(s=>{if(n!==void 0&&s.length>n)throw new oe("The query parameter limit supported by your database is exceeded.","P2029");return gg(e.fragments,e.placeholderFormat,s,e.argTypes)});default:O(e.type,"Invalid query type")}}function we(e,t,r){for(;wg(e);)if(Io(e)){let n=t[e.prisma__value.name];if(n===void 0)throw new Error(`Missing value for query variable ${e.prisma__value.name}`);e=n}else if(ko(e)){let{name:n,args:i}=e.prisma__value,o=r[n];if(!o)throw new Error(`Encountered an unknown generator '${n}'`);e=o.generate(...i.map(s=>we(s,t,r)))}else O(e,`Unexpected unevaluated value type: ${e}`);return Array.isArray(e)&&(e=e.map(n=>we(n,t,r))),e}function gg(e,t,r,n){let i="",o={placeholderNumber:1},s=[],a=[];for(let l of Do(e,r,n)){if(i+=yg(l,t,o),l.type==="stringChunk")continue;let c=s.length,u=s.push(...Cc(l))-c;if(l.argType.arity==="tuple"){if(u%l.argType.elements.length!==0)throw new Error(`Malformed query template. Expected the number of parameters to match the tuple arity, but got ${u} parameters for a tuple of arity ${l.argType.elements.length}.`);for(let p=0;pOo(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Oo(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:O(n,"Invalid fragment type")}}function Oo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function hg(e,t,r){return{sql:e,args:t,argTypes:r}}function wg(e){return Io(e)||ko(e)}function*Do(e,t,r){let n=0;for(let i of e)switch(i.type){case"parameter":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...i,value:t[n],argType:r?.[n]},n++;break}case"stringChunk":{yield i;break}case"parameterTuple":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];yield{...i,value:Array.isArray(o)?o:[o],argType:r?.[n]},n++;break}case"parameterTupleList":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];if(!Array.isArray(o))throw new Error("Malformed query template. Tuple list expected.");if(o.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let s of o)if(!Array.isArray(s))throw new Error("Malformed query template. Tuple expected.");yield{...i,value:o,argType:r?.[n]},n++;break}}}function*Cc(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function Eg(e,t,r){let n=0,i=0;for(let s of Do(e,t,void 0)){let a=0;for(let l of Cc(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of Do(e,t,void 0))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,l=[];if(r&&o.length===1&&a===i&&n>r&&n-al.map(u=>[...c,u]));break}case"parameterTupleList":{let a=s.value.reduce((p,d)=>p+d.length,0),l=[],c=[],u=0;for(let p of s.value)r&&o.length===1&&a===i&&c.length>0&&n-a+u+p.length>r&&(l.push(c),c=[],u=0),c.push(p),u+=p.length;c.length>0&&l.push(c),o=o.flatMap(p=>l.map(d=>[...p,d]));break}}return o}function xg(e,t){let r=[];for(let n=0;nt.reduce((r,n,i)=>(r[e.columnNames[i]]=n,r),{}))}function Sc(e){return{columns:e.columnNames,types:e.columnTypes.map(t=>bg(t)),rows:e.rows.map(t=>t.map((r,n)=>$t(r,e.columnTypes[n])))}}function $t(e,t){if(e===null)return null;switch(t){case x.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case x.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>$t(r,x.Int32));case x.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case x.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>$t(r,x.Int64));case x.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case x.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>$t(r,x.Json));case x.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case x.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>$t(r,x.Bytes));case x.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case x.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>$t(r,x.Boolean));default:return e}}function bg(e){switch(e){case x.Int32:return"int";case x.Int64:return"bigint";case x.Float:return"float";case x.Double:return"double";case x.Text:return"string";case x.Enum:return"enum";case x.Bytes:return"bytes";case x.Boolean:return"bool";case x.Character:return"char";case x.Numeric:return"decimal";case x.Json:return"json";case x.Uuid:return"uuid";case x.DateTime:return"datetime";case x.Date:return"date";case x.Time:return"time";case x.Int32Array:return"int-array";case x.Int64Array:return"bigint-array";case x.FloatArray:return"float-array";case x.DoubleArray:return"double-array";case x.TextArray:return"string-array";case x.EnumArray:return"string-array";case x.BytesArray:return"bytes-array";case x.BooleanArray:return"bool-array";case x.CharacterArray:return"char-array";case x.NumericArray:return"decimal-array";case x.JsonArray:return"json-array";case x.UuidArray:return"uuid-array";case x.DateTimeArray:return"datetime-array";case x.DateArray:return"date-array";case x.TimeArray:return"time-array";case x.UnknownNumber:return"unknown";case x.Set:return"string";default:O(e,`Unexpected column type: ${e}`)}}function Ic(e,t,r){if(!t.every(n=>_o(e,n))){let n=Pg(e,r),i=vg(r);throw new oe(n,i,r.context)}}function _o(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:O(t,`Unknown rule type: ${t.type}`)}}function Pg(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:O(t,`Unknown error identifier: ${t}`)}}function vg(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:O(e,`Unknown error identifier: ${e}`)}}var Dr=class e{#t;#e;#r;#n=new Kn;#s;#i;#a;#o;#c;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:l}){this.#t=t,this.#e=r,this.#r=n,this.#s=i,this.#i=o,this.#a=s??o,this.#o=a,this.#c=l}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:Rc,rawSerializer:Sc,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#e,this.#n.snapshot()).catch(i=>Dt(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:we(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!kc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(Mo(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>Ae(s)+Ae(a)):0}}case"execute":{let o=No(t.args,n,i,this.#l()),s=0;for(let a of o)s+=await this.#u(a,r,()=>r.executeRaw(a).catch(l=>t.args.type==="rawSql"?no(l):Dt(l)));return{value:s}}case"query":{let o=No(t.args,n,i,this.#l()),s;for(let a of o){let l=await this.#u(a,r,()=>r.queryRaw(a).catch(c=>t.args.type==="rawSql"?no(c):Dt(c)));s===void 0?s=l:(s.rows.push(...l.rows),s.lastInsertId=l.lastInsertId)}return{value:t.args.type==="rawSql"?this.#a(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(kc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:Oc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async l=>({joinExpr:l,childRecords:(await this.interpretNode(l.child,r,n,i)).value})));return{value:Tg(o,a),lastInsertId:s}}case"transaction":{if(!this.#t.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#t.manager,s=await o.startInternalTransaction(),a=await o.getTransaction(s,"query");try{let l=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),l}catch(l){throw await o.rollbackTransaction(s.id),l}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:xl(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return Ic(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return _o(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=c=>c!==null?Lt(Yn(c),t.args.fields):null,l=new Set(Mo(s).map(a));return{value:Mo(o).filter(c=>!l.has(a(c)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:zn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,l]of Object.entries(t.args.fields))s[a]=Ag(l,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Yn(o);for(let[l,c]of Object.entries(t.args.fields))a[l]=Cg(c,a[l],n,i);return{value:a,lastInsertId:s}}default:O(t,`Unexpected node type: ${t.type}`)}}#l(){return this.#c?.maxBindValues!==void 0?this.#c.maxBindValues:this.#p()}#p(){if(this.#o!==void 0)switch(this.#o){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:O(this.#o,`Unexpected provider: ${this.#o}`)}}#u(t,r,n){return Un({query:t,execute:n,provider:this.#o??r.provider,tracingHelper:this.#s,onQuery:this.#r})}};function kc(e){return Array.isArray(e)?e.length===0:e==null}function Mo(e){return Array.isArray(e)?e:[e]}function Ae(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Yn(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function Oc(e,t){return Array.isArray(e)?e.map(r=>Oc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function Tg(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let l=Yn(a),c=Lt(l,i);s[c]||(s[c]=[]),s[c].push(l),r.isRelationUnique?l[r.parentField]=null:l[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let l=Lt(Yn(a),o);for(let c of s[l]??[])r.isRelationUnique?c[r.parentField]=a:c[r.parentField].push(a)}}return e}function Ag(e,t,r,n){switch(e.type){case"value":return we(e.value,r,n);case"lastInsertId":return t;default:O(e,`Unexpected field initializer type: ${e.type}`)}}function Cg(e,t,r,n){switch(e.type){case"set":return we(e.value,r,n);case"add":return Ae(t)+Ae(we(e.value,r,n));case"subtract":return Ae(t)-Ae(we(e.value,r,n));case"multiply":return Ae(t)*Ae(we(e.value,r,n));case"divide":{let i=Ae(t),o=Ae(we(e.value,r,n));return o===0?null:i/o}default:O(e,`Unexpected field operation type: ${e.type}`)}}async function Rg(){return globalThis.crypto??await import("node:crypto")}async function Dc(){return(await Rg()).randomUUID()}var me=class extends oe{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Nr=class extends me{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Zn=class extends me{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Xn=class extends me{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},ei=class extends me{constructor(){super("Unable to start a transaction in the given time.")}},ti=class extends me{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},Vt=class extends me{constructor(t){super(`Internal Consistency Error: ${t}`)}},ri=class extends me{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var Sg=100,_r=q("prisma:client:transactionManager"),Ig=()=>({sql:"COMMIT",args:[],argTypes:[]}),kg=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),Og=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),Dg=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),Mr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#t;#e;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#t=i,this.#e=o}async startInternalTransaction(t){let r=t!==void 0?this.#a(t):{};return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async startTransaction(t){let r=t!==void 0?this.#a(t):this.transactionOptions;return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async#r(t){let r={id:await Dc(),status:"waiting",timer:void 0,timeout:t.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(r.id,r);let n=!1,i=Nc(()=>n=!0,t.maxWait);switch(i?.unref?.(),r.transaction=await this.driverAdapter.startTransaction(t.isolationLevel).catch(Dt),clearTimeout(i),r.status){case"waiting":if(n)throw await this.#i(r,"timed_out"),new ei;return r.status="running",r.timer=this.#s(r.id,t.timeout),{id:r.id};case"timed_out":case"running":case"committed":case"rolled_back":throw new Vt(`Transaction in invalid state ${r.status} although it just finished startup.`);default:O(r.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.#n(t,"commit");await this.#i(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.#n(t,"rollback");await this.#i(r,"rolled_back")})}async getTransaction(t,r){let n=this.#n(t.id,r);if(n.status==="closing"&&(await n.closing,n=this.#n(t.id,r)),!n.transaction)throw new Nr;return n.transaction}#n(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(_r("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Vt("Active transaction found in closed transactions list.");case"committed":throw new Zn(r);case"rolled_back":throw new Xn(r);case"timed_out":throw new ti(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw _r("Transaction not found.",t),new Nr}if(["committed","rolled_back","timed_out"].includes(n.status))throw new Vt("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.#i(t,"rolled_back")))}#s(t,r){let n=Date.now(),i=Nc(async()=>{_r("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let o=this.transactions.get(t);o&&["running","waiting"].includes(o.status)?await this.#i(o,"timed_out"):_r("Transaction already committed or rolled back when timeout happened.",t)},r);return i?.unref?.(),i}async#i(t,r){let n=async()=>{_r("Closing transaction.",{transactionId:t.id,status:r});try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#o(Og(),t.transaction,()=>t.transaction.commit());else{let i=Ig();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#o(Dg(),t.transaction,()=>t.transaction.rollback());else{let i=kg();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>Sg&&this.closedTransactions.shift()}};t.status==="closing"?(await t.closing,this.#n(t.id,r==="committed"?"commit":"rollback")):await Object.assign(t,{status:"closing",reason:r,closing:n()}).closing}#a(t){if(!t.timeout)throw new me("timeout is required");if(!t.maxWait)throw new me("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new ri(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#o(t,r,n){return Un({query:t,execute:n,provider:this.#e??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#t})}};function Nc(e,t){return t!==void 0?setTimeout(e,t):void 0}var ni="6.19.3";var ii=class e{#t;#e;#r;#n;constructor(t,r,n){this.#t=t,this.#e=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new Mr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#e.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?await this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#e;return await Dr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#t.onQuery,tracingHelper:this.#t.tracingHelper,provider:this.#t.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#e.dispose()}}apiKey(){return null}};var oi=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _c(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!oi.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!oi.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!oi.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!oi.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!_g(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function _g(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function Mc(e,t){let r=(e||"").split(";").filter(l=>typeof l=="string"&&!!l.trim()),n=r.shift()||"",i=Mg(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let l of r){let c=l.split("="),u=(c.shift()||"").trimStart().toLowerCase(),p=c.join("=");switch(u){case"expires":{a.expires=new Date(p);break}case"max-age":{a.maxAge=Number.parseInt(p,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=p;break}default:a[u]=p}}return a}function Mg(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}var Fg=()=>globalThis.process?.release?.name==="node",Lg=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,$g=()=>!!globalThis.Deno,Vg=()=>typeof globalThis.Netlify=="object",qg=()=>typeof globalThis.EdgeRuntime=="object",Ug=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function jg(){return[[Vg,"netlify"],[qg,"edge-light"],[Ug,"workerd"],[$g,"deno"],[Lg,"bun"],[Fg,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Bg={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Fc(){let e=jg();return{id:e,prettyName:Bg[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function qt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new N(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new N("error: Missing URL environment variable, value, or override.",n);return i}var si=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ue=class extends si{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function R(e,t){return{...e,isRetryable:t}}var it=class extends ue{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,R(r,!1))}};P(it,"InvalidDatasourceError");function ai(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=qt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new it(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==rn)throw new it(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new it(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=Pi(i)?"http:":"https:";process.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let c=new URL(i.href.replace(o,l));return{apiKey:a,url:c}}var Lc=H(ds()),Ut=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Lc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#t();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#t(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};function Qg(e){return e[0]*1e3+e[1]/1e6}function jt(e){return new Date(Qg(e))}var $c=q("prisma:client:clientEngine:remoteExecutor"),li=class{#t;#e;#r;#n;#s;constructor(t){this.#t=t.clientVersion,this.#n=t.logEmitter,this.#s=t.tracingHelper;let{url:r,apiKey:n}=ai({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Fo(r),this.#e=new Ut({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}apiKey(){return this.#e.apiKey}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#e.build(),body:n,fetch:i});s.ok||await this.#a(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#o(a.extensions),a}async#a(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new U(s,{clientVersion:this.#t,code:n??"P6000",batchRequestIdx:r,meta:a})}#o(t){if(t.logs)for(let r of t.logs)this.#c(r);t.traces&&this.#s.dispatchEngineSpans(t.traces)}#c(t){switch(t.level){case"debug":case"trace":$c(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:jt(t.timestamp),message:t.attributes.message??"",target:t.target??"RemoteExecutor"});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:jt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target??"RemoteExecutor"});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Fo=class{#t;#e;#r;constructor(t){this.#t=t,this.#e=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#t),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let l=await o(s.href,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return $c(t,s,l.status,l.statusText),this.#r=l.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#s(s,l),l}#n(t){let r=[],n=new Date;for(let[i,o]of this.#e){if(o.expires&&o.expires0?r.join("; "):void 0}#s(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=Mc(i),s=o.domain??t.hostname,a=o.path??"/",l=`${s}:${a}:${o.name}`;this.#e.set(l,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};var Lo={},Vc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new N("WASM query compiler was unexpectedly `undefined`",t);let n;return e.activeProvider===void 0||Lo[e.activeProvider]===void 0?(n=(async()=>{let i=await r.getRuntime(),o=await r.getQueryCompilerWasmModule();if(o==null)throw new N("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let s={"./query_compiler_bg.js":i},a=new WebAssembly.Instance(o,s),l=a.exports.__wbindgen_start;return i.__wbg_set_wasm(a.exports),l(),i.QueryCompiler})(),e.activeProvider!==void 0&&(Lo[e.activeProvider]=n)):n=Lo[e.activeProvider],await n}};var Hg="P2038",Fr=q("prisma:client:clientEngine"),Uc=globalThis;Uc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new re(e,ni)}};var Bt=class{name="ClientEngine";#t;#e={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#s;constructor(t,r,n){if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Fr("Using driver adapter: %O",t.adapter);else throw new N("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,Hg);this.#r=n??Vc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#s=i=>{this.logEmitter.emit("query",{...i,params:vr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#e.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#a(),n=await this.#o(r)}catch(o){throw this.#e={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#e={type:"connected",engine:i},i});return this.#e={type:"connecting",promise:t},await t}case"connecting":return await this.#e.promise;case"connected":return this.#e.engine;case"disconnecting":return await this.#e.promise,await this.#i()}}async#a(){return this.#n.remote?new li({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await ii.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#d(this.config.transactionOptions.isolationLevel)},onQuery:this.#s,provider:this.config.activeProvider})}async#o(t){let r=this.#t;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#t=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#u(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#c(o)}}#c(t){if(t instanceof re)return t;try{let r=JSON.parse(t.message);return new N(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#l(t,r){if(t instanceof N)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new re(qc(this,t.message,r),this.config.clientVersion);if(t instanceof oe)return new U(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new J(`${n.message} +${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof re?t:typeof t.message=="string"&&typeof t.code=="string"?new U(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new J(t.message,{clientVersion:this.config.clientVersion}):t}#u(t,r,n=!0){let i=Uc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;global.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(global.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#t=void 0,n&&this.stop().catch(s=>Fr("failed to disconnect:",s)),new re(qc(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#e.type){case"disconnected":return;case"connecting":return await this.#e.promise,await this.stop();case"connected":{let t=this.#e.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#e={type:"disconnected"}}});return this.#e={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#e.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#d(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Ie(t,"Invalid transaction action.")}catch(s){throw this.#l(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Fr("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(l=>{throw this.#l(l,i)}),a;try{a=this.#u(()=>this.#m({queries:[t],execute:()=>s.compile(i)}))}catch(l){throw this.#p(l)}try{Fr("query plan created",a);let l={},c=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:l,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Fr("query plan executed"),{data:{[t.action]:c}}}catch(l){throw this.#l(l,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(It(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(c=>{throw this.#l(c,o)}),l;try{l=this.#u(()=>this.#m({queries:t,execute:()=>a.compileBatch(o)}))}catch(c){throw this.#p(c)}try{let c;r?.kind==="itx"&&(c=r.options);let u={};switch(l.type){case"multi":{if(r?.kind!=="itx"){let m=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;c=await this.transaction("start",{},m)}let p=[],d=!1;for(let[m,y]of l.plans.entries())try{let g=await s.execute({plan:y,placeholderValues:u,model:t[m].modelName,operation:t[m].action,batchIndex:m,transaction:c,customFetch:n?.(globalThis.fetch)});p.push({data:{[t[m].action]:g}})}catch(g){p.push(g),d=!0;break}return c!==void 0&&r?.kind!=="itx"&&(d?await this.transaction("rollback",{},c):await this.transaction("commit",{},c)),p}case"compacted":{if(!t.every(m=>m.action===i))throw new Error("All queries in a batch must have the same action");let p=await s.execute({plan:l.plan,placeholderValues:u,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:c,customFetch:n?.(globalThis.fetch)});return wl(p,l).map(m=>({data:{[i]:m}}))}}}catch(c){throw this.#l(c,o)}}metrics(t){throw new Error("Method not implemented.")}async apiKey(){let{executor:t}=await this.#i();return t.apiKey()}#d(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new U(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}#m({queries:t,execute:r}){return this.tracingHelper.runInChildSpan({name:"compile",attributes:{models:t.map(n=>n.modelName).filter(n=>n!==void 0),actions:t.map(n=>n.action)}},r)}};function qc(e,t,r){return pl({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}var Qt=class extends ue{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",R(t,!0))}};P(Qt,"ForcedRetryError");var ot=class extends ue{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,R(r,!1))}};P(ot,"NotImplementedYetError");var L=class extends ue{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var st=class extends L{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",R(t,!0))}};P(st,"SchemaMissingError");var $o="This request could not be understood by the server",Lr=class extends L{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||$o,R(t,!1)),n&&(this.code=n)}};P(Lr,"BadRequestError");var $r=class extends L{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",R(t,!0)),this.logs=r}};P($r,"HealthcheckTimeoutError");var Vr=class extends L{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,R(t,!0)),this.logs=n}};P(Vr,"EngineStartupError");var qr=class extends L{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",R(t,!1))}};P(qr,"EngineVersionNotSupportedError");var Vo="Request timed out",Ur=class extends L{name="GatewayTimeoutError";code="P5009";constructor(t,r=Vo){super(r,R(t,!1))}};P(Ur,"GatewayTimeoutError");var Gg="Interactive transaction error",jr=class extends L{name="InteractiveTransactionError";code="P5015";constructor(t,r=Gg){super(r,R(t,!1))}};P(jr,"InteractiveTransactionError");var Jg="Request parameters are invalid",Br=class extends L{name="InvalidRequestError";code="P5011";constructor(t,r=Jg){super(r,R(t,!1))}};P(Br,"InvalidRequestError");var qo="Requested resource does not exist",Qr=class extends L{name="NotFoundError";code="P5003";constructor(t,r=qo){super(r,R(t,!1))}};P(Qr,"NotFoundError");var Uo="Unknown server error",Ht=class extends L{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Uo,R(t,!0)),this.logs=n}};P(Ht,"ServerError");var jo="Unauthorized, check your connection string",Hr=class extends L{name="UnauthorizedError";code="P5007";constructor(t,r=jo){super(r,R(t,!1))}};P(Hr,"UnauthorizedError");var Bo="Usage exceeded, retry again later",Gr=class extends L{name="UsageExceededError";code="P5008";constructor(t,r=Bo){super(r,R(t,!0))}};P(Gr,"UsageExceededError");async function Wg(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Wg(e);if(n.type==="QueryEngineError")throw new U(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new st(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new qr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Vr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new N(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new $r(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new jr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Br(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Hr(r,Gt(jo,n));if(e.status===404)return new Qr(r,Gt(qo,n));if(e.status===429)throw new Gr(r,Gt(Bo,n));if(e.status===504)throw new Ur(r,Gt(Vo,n));if(e.status>=500)throw new Ht(r,Gt(Uo,n));if(e.status>=400)throw new Lr(r,Gt($o,n))}function Gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function jc(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bc(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,c,u;for(let p=0;p>18,a=(u&258048)>>12,l=(u&4032)>>6,c=u&63,r+=Fe[s]+Fe[a]+Fe[l]+Fe[c];return i==1?(u=t[o],s=(u&252)>>2,a=(u&3)<<4,r+=Fe[s]+Fe[a]+"=="):i==2&&(u=t[o]<<8|t[o+1],s=(u&64512)>>10,a=(u&1008)>>4,l=(u&15)<<2,r+=Fe[s]+Fe[a]+Fe[l]+"="),r}function Qc(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new N("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}var Hc={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Wr=class extends ue{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,R(r,!0))}};P(Wr,"RequestError");async function at(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Wr(a,{clientVersion:n,cause:s})}}var zg=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Gc=q("prisma:client:dataproxyEngine");async function Yg(e,t){let r=Hc["@prisma/engines-version"],n=t.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&zg.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,c]=s.split("."),u=Zg(`<=${a}.${l}.${c}`),p=await at(u,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Gc("length of body fetched from unpkg.com",d.length);let m;try{m=JSON.parse(d)}catch(y){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),y}return m.version}throw new ot("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Jc(e,t){let r=await Yg(e,t);return Gc("version",r),r}function Zg(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Wc=3,Kr=q("prisma:client:dataproxyEngine"),zr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Qc(t),this.config=t,this.env=t.env,this.inlineSchema=Bc(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Ut({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Jc(this.host,this.config),Kr("host",this.host),Kr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Kr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:jt(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:jt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await at(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Kr("schema response status",r.status);let n=await Jr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=It(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await at(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Kr("graphql response status",a.status),await this.handleError(await Jr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await at(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Jr(l,this.clientVersion));let c=await l.json(),{extensions:u}=c;u&&this.propagateResponseExtensions(u);let p=c.id,d=c["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await at(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Jr(a,this.clientVersion));let l=await a.json(),{extensions:c}=l;c&&this.propagateResponseExtensions(c);return}}})}getURLAndAPIKey(){return ai({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new ot("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ue)||!i.isRetryable)throw i;if(r>=Wc)throw i instanceof Qt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Wc} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await jc(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof st)throw await this.uploadSchema(),new Qt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?$n(t[0],this.config.clientVersion,this.config.activeProvider):new J(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Kc({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let I=g.join(` +`);o.push({_tag:"error",value:I})},l=!!e?.startsWith("prisma://"),c=nn(e),u=!!t,p=l||c;!u&&r&&p&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!r;u&&(d||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):p?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let m={accelerate:d,ppg:c,driverAdapters:u};function y(g){return g.length>0}return y(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:m}:{ok:!0,diagnostics:{warnings:i},isUsing:m}}function zc({copyEngine:e=!0},t){let r;try{r=qt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Kc({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"client"});for(let p of o.warnings)or(...p.value);if(!n){let p=o.errors[0];throw new X(p.value,{clientVersion:t.clientVersion})}let s=pt(t.generator),a=s==="library",l=s==="binary",c=s==="client",u=(i.accelerate||i.ppg)&&!i.driverAdapters;return c?new Bt(t,u):i.accelerate?new zr(t):(i.driverAdapters,new Bt(t,u))}function Yc({generator:e}){return e?.previewFeatures??[]}var Zc=e=>({command:e});var Xc=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function Jt(e){try{return eu(e,"fast")}catch{return eu(e,"slow")}}function eu(e,t){return JSON.stringify(e.map(r=>ru(r,t)))}function ru(e,t){if(Array.isArray(e))return e.map(r=>ru(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ft(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ne.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Xg(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?nu(e):e}function Xg(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function nu(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(tu);let t={};for(let r of Object.keys(e))t[r]=tu(e[r]);return t}function tu(e){return typeof e=="bigint"?e.toString():nu(e)}var ey=/^(\s*alter\s)/i,iu=q("prisma:client");function Qo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&ey.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Ho=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Mn(r))n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Jt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Xc(r),i={values:Jt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?iu(`prisma.${e}(${n}, ${i.values})`):iu(`prisma.${e}(${n})`),{query:n,parameters:i}},ou={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ce(t,r)}},su={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Go(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=au(r(s)):au(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function au(e){return typeof e.then=="function"?e:Promise.resolve(e)}var ty=Ei.split(".")[0],ry={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Jo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${ty}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??ry}};function lu(){return new Jo}function cu(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function uu(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}function ci(e){return typeof e.batchRequestIdx=="number"}function pu(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wo(e.query.arguments)),t.push(Wo(e.query.selection)),t.join("")}function Wo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wo(n)})`:r}).join(" ")})`}var ny={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Ko(e){return ny[e]}var ui=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ilt("bigint",r));case"bytes-array":return t.map(r=>lt("bytes",r));case"decimal-array":return t.map(r=>lt("decimal",r));case"datetime-array":return t.map(r=>lt("datetime",r));case"date-array":return t.map(r=>lt("date",r));case"time-array":return t.map(r=>lt("time",r));default:return t}}function pi(e){let t=[],r=iy(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),c=n.some(p=>Ko(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:sy(o),containsWrite:c,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(m){return m}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?du(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Ko(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:pu(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(oy(t),ay(t,i))throw t;if(t instanceof U&&ly(t)){let c=mu(t.meta);In({args:o,errors:[c],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=En({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let c=s?{modelName:s,...t.meta}:t.meta;throw new U(l,{code:t.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new re(l,this.client._clientVersion);if(t instanceof J)throw new J(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof N)throw new N(l,this.client._clientVersion);if(t instanceof re)throw new re(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?dt(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(c=>c!=="select"&&c!=="include"),a=Yi(o,s),l=i==="queryRaw"?pi(a):Qe(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function sy(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:du(e)};Ie(e,"Unknown transaction kind")}}function du(e){return{id:e.id,payload:e.payload}}function ay(e,t){return ci(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function ly(e){return e.code==="P2009"||e.code==="P2012"}function mu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(mu)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var fu=ni;var Eu=H($i());var _=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};P(_,"PrismaClientConstructorValidationError");var gu=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],yu=["pretty","colorless","minimal"],hu=["info","query","warn","error"],cy={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&pt(t.generator)==="client")throw new _('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(pt(t.generator)==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!yu.includes(e)){let t=Wt(e,yu);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!hu.includes(r)){let n=Wt(r,hu);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Wt(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=py(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(c=>c.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(dy(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Wt(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function xu(e,t){for(let[r,n]of Object.entries(e)){if(!gu.includes(r)){let i=Wt(r,gu);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}cy[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Wt(e,t){if(t.length===0||typeof e!="string")return"";let r=uy(e,t);return r?` Did you mean "${r}"?`:""}function uy(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Eu.default)(e,i)}));r.sort((i,o)=>i.distanceLe(n)===t);if(r)return e[r]}function dy(e,t){let r=At(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Sn(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}function bu(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=c=>{o||(o=!0,r(c))};for(let c=0;c{n[c]=u,a()},u=>{if(!ci(u)){l(u);return}u.batchRequestIdx===c?l(u):(i||(i=u),a())})})}var We=q("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var my={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},fy=Symbol.for("prisma.client.transaction.id"),gy={id:0,nextId(){return++this.id}};function Ru(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Go();constructor(n){e=n?.__internal?.configOverride?.(e)??e,ol(e),n&&xu(n,e);let i=new Au.EventEmitter().on("error",()=>{});this._extensions=Ct.empty(),this._previewFeatures=Yc(e),this._clientVersion=e.clientVersion??fu,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=lu();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&mi.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&mi.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new N(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new N("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&o&&ir(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},c=l.__internal??{},u=c.debug===!0;u&&q.enable("prisma:client");let p=mi.default.resolve(e.dirname,e.relativePath);Cu.default.existsSync(p)||(p=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",p);let d=c.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:u,allowTriggerPanic:d.allowTriggerPanic,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&uu(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(m=>typeof m=="string"?m==="query":m.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:sl(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:qt,getBatchRequestPayload:It,prismaGraphQLToJSError:$n,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:N,PrismaClientKnownRequestError:U,debug:q("prisma:client:accelerateEngine"),engineVersion:vu.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=zc(e,this._engineConfig),this._requestHandler=new di(this,i),l.log)for(let m of l.log){let y=typeof m=="string"?m:m.emit==="stdout"?m.level:null;y&&this.$on(y,g=>{tr.log(`${tr.tags[y]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=br(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{cs()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ho({clientMethod:i,activeProvider:a}),callsite:Be(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Pu(n,i);return Qo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Qo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Zc,callsite:Be(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ho({clientMethod:i,activeProvider:a}),callsite:Be(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Pu(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=gy.nextId(),s=cu(n.length),a=n.map((l,c)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let u=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:c,isolationLevel:u,lock:s};return l.requestTransaction?.(p)??l});return bu(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let c={kind:"itx",...a};l=await n(this._createItxClient(c)),await this._engine.transaction("commit",o,a)}catch(c){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),c}return l}_createItxClient(n){return he(br(he(Qa(this),[ie("_appliedParent",()=>this._appliedParent._createItxClient(n)),ie("_createPrismaPromise",()=>Go(n)),ie(fy,()=>n.id)])),[St(Ka)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??my,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:c,args:u,...p}=l,d={...n,...p};u&&(d.args=i.middlewareArgsToRequestArgs(u)),n.transaction!==void 0&&c===!1&&delete d.transaction;let m=await Xa(this,d);return d.model?Wa({result:m,modelName:d.model,args:d.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):m};return this._tracingHelper.runInChildSpan(s.operation,()=>new Tu.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:c,transaction:u,unpacker:p,otelParentCtx:d,customDataProxyFetch:m}){try{n=c?c(n):n;let y={name:"serialize"},g=this._tracingHelper.runInChildSpan(y,()=>Nn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return q.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${Na(n)})`),We("Generated request:"),We(JSON.stringify(g,null,2)+` +`)),u?.kind==="batch"&&await u.lock,this._requestHandler.request({protocolQuery:g,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:u,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:m})}catch(y){throw y.clientVersion=this._clientVersion,y}}$metrics=new Rt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Ha}return t}function Pu(e,t){return yy(e)?[new ce(e,t),ou]:[e,su]}function yy(e){return Array.isArray(e)&&Array.isArray(e.raw)}var hy=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Su(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!hy.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function Iu(e){ir(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +/*! Bundled license information: + +@noble/hashes/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +decimal.js/decimal.mjs: + (*! + * decimal.js v10.5.0 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2025 Michael Mclaughlin + * MIT Licence + *) +*/ +//# sourceMappingURL=client.js.map diff --git a/lib/generated/prisma/runtime/edge-esm.js b/lib/generated/prisma/runtime/edge-esm.js new file mode 100644 index 0000000..6b4beb6 --- /dev/null +++ b/lib/generated/prisma/runtime/edge-esm.js @@ -0,0 +1,35 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +var ca=Object.create;var rn=Object.defineProperty;var pa=Object.getOwnPropertyDescriptor;var ma=Object.getOwnPropertyNames;var fa=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)rn(e,r,{get:t[r],enumerable:!0})},ga=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ma(t))!da.call(e,i)&&i!==r&&rn(e,i,{get:()=>t[i],enumerable:!(n=pa(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ca(fa(e)):{},ga(t||!e||!e.__esModule?rn(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Ti=Je(ze=>{"use strict";f();u();c();p();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ha=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=C);var F=M===C?0:4-M%4;return[M,F]}function l(S){var C=a(S),M=C[0],F=C[1];return(M+F)*3/4-F}function d(S,C,M){return(C+M)*3/4-M}function g(S){var C,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,oe=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=C>>8&255,O[L++]=C&255;return B===2&&(C=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=C&255),B===1&&(C=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=C>>8&255,O[L++]=C&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,C,M){for(var F,B=[],O=C;Ooe?oe:L+O));return F===1?(C=S[M-1],B.push(t[C>>2]+t[C<<4&63]+"==")):F===2&&(C=(S[M-2]<<8)+S[M-1],B.push(t[C>>10]+t[C>>4&63]+t[C<<2&63]+"=")),B.join("")}}),ya=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,C=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=C,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=C,a/=256,g-=8);t[n+S-C]|=M*128}}),nn=ha(),We=ya(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=va;ze.INSPECT_MAX_BYTES=50;var sr=2147483647;ze.kMaxLength=sr;A.TYPED_ARRAY_SUPPORT=wa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function wa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>sr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return an(e)}return pi(e,t,r)}A.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return ba(e,t);if(ArrayBuffer.isView(e))return xa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return fi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Pa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function mi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ea(e,t,r){return mi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Ea(e,t,r)};function an(e){return mi(e),xe(e<0?0:ln(e)|0)}A.allocUnsafe=function(e){return an(e)};A.allocUnsafeSlow=function(e){return an(e)};function ba(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function on(e){let t=e.length<0?0:ln(e.length)|0,r=xe(t);for(let n=0;n=sr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sr.toString(16)+" bytes");return e|0}function va(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return sn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:sn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=di;function Ta(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return _a(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Da(this,t,r);case"latin1":case"binary":return Ma(this,t,r);case"base64":return Oa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Na(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Le(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(A.prototype[si]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,cn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Aa(this,e,t,r);case"utf8":case"utf-8":return Ra(this,e,t,r);case"ascii":case"latin1":case"binary":return Ca(this,e,t,r);case"base64":return Sa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ia(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oa(e,t,r){return t===0&&r===e.length?nn.fromByteArray(e):nn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return ka(n)}var li=4096;function ka(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Re(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&xt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Re(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Re(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Re(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Re(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Fa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Fa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function xt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var La=/[^+/0-9A-Za-z-_]/g;function Ua(e){if(e=e.split("=")[0],e=e.trim().replace(La,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function sn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ba(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return nn.toByteArray(Ua(e))}function ar(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function cn(e){return e!==e}var Va=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?$a:e}function $a(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Qe(Ti())});function Wa(){return!1}function fn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Ha(){return fn()}function za(){return[]}function Ya(e){e(null,[])}function Za(){return""}function Xa(){return""}function el(){}function tl(){}function rl(){}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ul(e,t){t(null,fn())}var cl,pl,ji,Gi=fe(()=>{"use strict";f();u();c();p();m();cl={},pl={existsSync:Wa,lstatSync:fn,stat:ul,statSync:Ha,readdirSync:za,readdir:Ya,readlinkSync:Za,realpathSync:Xa,chmodSync:el,renameSync:tl,mkdirSync:rl,rmdirSync:nl,rmSync:il,unlinkSync:ol,watchFile:sl,unwatchFile:al,watch:ll,promises:cl},ji=pl});var Ji=Je((mf,ml)=>{ml.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function dl(...e){return e.join("/")}function gl(...e){return e.join("/")}function hl(e){let t=Qi(e),r=Ki(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Qi(e){let t=e.split("/");return t[t.length-1]}function Ki(e){return e.split("/").slice(0,-1).join("/")}function wl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Wi,yl,El,bl,pr,Hi=fe(()=>{"use strict";f();u();c();p();m();Wi="/",yl=":";El={sep:Wi},bl={basename:Qi,delimiter:yl,dirname:Ki,join:gl,normalize:wl,parse:hl,posix:El,resolve:dl,sep:Wi},pr=bl});var gn=Je((kf,vl)=>{vl.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zi=Je(mr=>{"use strict";f();u();c();p();m();Object.defineProperty(mr,"__esModule",{value:!0});mr.enginesVersion=void 0;mr.enginesVersion=gn().prisma.enginesVersion});var Xi=Je((Gf,Zi)=>{"use strict";f();u();c();p();m();Zi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Sn=Je((jy,Eo)=>{"use strict";f();u();c();p();m();Eo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Ao=fe(()=>{"use strict";f();u();c();p();m()});var Vr,Qo=fe(()=>{"use strict";f();u();c();p();m();Vr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});f();u();c();p();m();var Ci={};or(Ci,{defineExtension:()=>Ai,getExtensionContext:()=>Ri});f();u();c();p();m();f();u();c();p();m();function Ai(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function Ri(e){return e}var Ii={};or(Ii,{validator:()=>Si});f();u();c();p();m();f();u();c();p();m();function Si(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var pn,Oi,ki,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:pn,NODE_DISABLE_COLORS:Oi,NO_COLOR:ki,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var ja={enabled:!Oi&&ki==null&&Di!=="dumb"&&(pn!=null&&pn!=="0"||Mi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var bm=j(0,0),lr=j(1,22),ur=j(2,22),xm=j(3,23),_i=j(4,24),Pm=j(7,27),vm=j(8,28),Tm=j(9,29),Am=j(30,39),Ye=j(31,39),Ni=j(32,39),Fi=j(33,39),Li=j(34,39),Rm=j(35,39),Ui=j(36,39),Cm=j(37,39),Bi=j(90,39),Sm=j(90,39),Im=j(40,49),Om=j(41,49),km=j(42,49),Dm=j(43,49),Mm=j(44,49),_m=j(45,49),Nm=j(46,49),Fm=j(47,49);f();u();c();p();m();var Ga=100,qi=["green","yellow","blue","magenta","cyan","red"],cr=[],Vi=Date.now(),Ja=0,mn=typeof y<"u"?y.env:{};globalThis.DEBUG??=mn.DEBUG??"";globalThis.DEBUG_COLORS??=mn.DEBUG_COLORS?mn.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Qa(e){let t={color:qi[Ja++%qi.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&cr.push([o,...n]),cr.length>Ga&&cr.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Ka(g)),d=`+${Date.now()-Vi}ms`;Vi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Qa,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function Ka(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function $i(){cr.length=0}f();u();c();p();m();f();u();c();p();m();var fl=Ji(),dn=fl.version;f();u();c();p();m();function Ze(e){let t=xl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Pl())}function xl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Pl(){return"library"}f();u();c();p();m();var Yi="prisma+postgres",fr=`${Yi}:`;function dr(e){return e?.toString().startsWith(`${fr}//`)??!1}function hn(e){if(!dr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Tt={};or(Tt,{error:()=>Rl,info:()=>Al,log:()=>Tl,query:()=>Cl,should:()=>eo,tags:()=>vt,warn:()=>yn});f();u();c();p();m();var vt={error:Ye("prisma:error"),warn:Fi("prisma:warn"),info:Ui("prisma:info"),query:Li("prisma:query")},eo={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Tl(...e){console.log(...e)}function yn(e,...t){eo.warn()&&console.warn(`${vt.warn} ${e}`,...t)}function Al(e,...t){console.info(`${vt.info} ${e}`,...t)}function Rl(e,...t){console.error(`${vt.error} ${e}`,...t)}function Cl(e,...t){console.log(`${vt.query} ${e}`,...t)}f();u();c();p();m();function Ue(e,t){throw new Error(t)}f();u();c();p();m();f();u();c();p();m();function wn({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Sl=wn();function En(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sl,"")}f();u();c();p();m();function bn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function gr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function xn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{to.has(e)||(to.add(e),yn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(se,"PrismaClientKnownRequestError");f();u();c();p();m();var Ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Ce,"PrismaClientRustPanicError");f();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ae,"PrismaClientUnknownRequestError");f();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(ee,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Se(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function no(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function At(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function Il(e){return{models:Pn(e.models),enums:Pn(e.enums),types:Pn(e.types)}}function Pn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yr(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,De=1e9,vn="0123456789abcdef",br="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Tn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},ao,Pe,_=!0,vr="[DecimalError] ",ke=vr+"Invalid argument: ",lo=vr+"Precision limit exceeded",uo=vr+"crypto unavailable",co="[object Decimal]",X=Math.floor,K=Math.pow,Ol=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Dl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,po=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Ml=9007199254740991,_l=br.length-1,An=xr.length-1,R={toStringTag:co};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Nl(n,yo(n,r)),n.precision=e,n.rounding=t,k(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return V(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Ar(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Ar(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=An)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=An)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=Oe(d,a),n=t?Pr(g,a+10):Oe(e,a),l=V(s,n,a,1),Rt(l.d,i=h,T))do if(a+=10,s=Oe(d,a),n=t?Pr(g,a+10):Oe(e,a),l=V(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Rt(l.d,i+=10,T));return _=!0,k(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=X(e.e/D),g=X(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Tr(d,n),_?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ke+e);return r.d?(t=mo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ll(n,yo(n,r)),n.precision=e,n.rounding=t,k(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Tr(o,r),_?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Cn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,De),t===void 0?t=n.rounding:ne(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(ne(e,0,De),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(ne(e,0,De),t===void 0?t=o.rounding:ne(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,C=I.constructor;if(!S)return new C(I);if(d=r=new C(1),n=l=new C(0),t=new C(n),o=t.e=mo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new C(e),!a.isInt()||a.lt(d))throw Error(ke+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new C(z(S)),g=C.precision,C.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],C.precision=g,_=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Cn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Cn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=X(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=Ml)return i=fo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Rn(e.times(Oe(a,n+r)),n),i.d&&(i=k(i,n+5,1),Rt(i.d,n,o)&&(t=n+10,i=k(Rn(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,De),t===void 0?t=i.rounding:ne(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,De),t===void 0?t=n.rounding:ne(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(ke+e)}function Rt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Nl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Ar(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,C,M,F,B,O,L,oe,J,Xr,rr,bt,en,ce,nr,ir=n.constructor,tn=n.s==i.s?1:-1,Y=n.d,$=i.d;if(!Y||!Y[0]||!$||!$[0])return new ir(!n.s||!i.s||(Y?$&&Y[0]==$[0]:!$)?NaN:Y&&Y[0]==0||!$?tn*0:tn/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=X(n.e/I)-X(i.e/I)),ce=$.length,bt=Y.length,F=new ir(tn),B=F.d=[],h=0;$[h]==(Y[h]||0);h++);if($[h]>(Y[h]||0)&&g--,o==null?(J=o=ir.precision,s=ir.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Y=e(Y,T,l),ce=$.length,bt=Y.length),rr=ce,O=Y.slice(0,ce),L=O.length;L=l/2&&++en;do T=0,d=t($,O,ce,L),d<0?(oe=O[0],ce!=L&&(oe=oe*l+(O[1]||0)),T=oe/en|0,T>1?(T>=l&&(T=l-1),C=e($,T,l),M=C.length,L=O.length,d=t(C,O,M,L),d==1&&(T--,r(C,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function Tr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Pr(e,t,r){if(t>_l)throw _=!0,r&&(e.precision=r),Error(lo);return k(new e(br),t,1,!0)}function he(e,t,r){if(t>An)throw Error(lo);return k(new e(xr),t,r,!0)}function mo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function fo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),oo(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),oo(t.d,s)}return _=!0,o}function io(e){return e.d[e.d.length-1]&1}function go(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Rt(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,C=e,M=C.d,F=C.constructor,B=F.rounding,O=F.precision;if(C.s<0||!M||!M[0]||!C.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:C.s!=1?NaN:M?0:C);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=z(M),n=r.charAt(0),Math.abs(o=C.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=z(C.d),n=r.charAt(0),I++;o=C.e,n>1?(C=new F("0."+r),o++):C=new F(n+"."+r.slice(1))}else return d=Pr(F,g+2,O).times(o+""),C=Oe(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(C,O,B,_=!0):C;for(h=C,l=s=C=V(C.minus(1),C.plus(1),g,1),T=k(C.times(C),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),z(d.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Pr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Rt(l.d,g-S,B,a))F.precision=g+=S,d=s=C=V(h.minus(1),h.plus(1),g,1),T=k(C.times(C),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function ho(e){return String(e.s*e.s/0)}function Er(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),po.test(t))return Er(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(kl.test(t))r=16,t=t.toLowerCase();else if(Ol.test(t))r=2;else if(Dl.test(t))r=8;else throw Error(ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=fo(n,new n(r),o,o*2)),d=wr(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Tr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):ve.pow(2,l))),_=!0,e)}function Ll(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Ar(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Ar(e,t){for(var r=e;--t;)r*=e;return r}function yo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=io(r)?n?2:3:n?4:1,t;Pe=io(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(ne(r,1,De),n===void 0?n=I.rounding:ne(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=ho(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=wr(ye(T),10,i),T.e=T.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=ao),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Ul(e){return new this(e).abs()}function Bl(e){return new this(e).acos()}function ql(e){return new this(e).acosh()}function Vl(e,t){return new this(e).plus(t)}function $l(e){return new this(e).asin()}function jl(e){return new this(e).asinh()}function Gl(e){return new this(e).atan()}function Jl(e){return new this(e).atanh()}function Ql(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function Kl(e){return new this(e).cbrt()}function Wl(e){return k(e=new this(e),e.e+1,2)}function Hl(e,t,r){return new this(e).clamp(t,r)}function zl(e){if(!e||typeof e!="object")throw Error(vr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,De,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(ke+r+": "+n);if(r="crypto",i&&(this[r]=Tn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(uo);else this[r]=!1;else throw Error(ke+r+": "+n);return this}function Yl(e){return new this(e).cos()}function Zl(e){return new this(e).cosh()}function wo(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,so(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(uo);else for(;o=10;i/=10)n++;nCt,datamodelEnumToSchemaEnum:()=>vu});f();u();c();p();m();f();u();c();p();m();function vu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var Ct=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(Ct||{});var Tu=Qe(Xi());var Au={red:Ye,gray:Bi,dim:ur,bold:lr,underline:_i,highlightSource:e=>e.highlight()},Ru={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Cu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Su({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Iu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Iu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Cr(e){let t=e.showColors?Au:Ru,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Cu(e),Su(r,t)}f();u();c();p();m();var Co=Qe(Sn());f();u();c();p();m();function Po(e,t,r){let n=vo(e),i=Ou(n),o=Du(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function vo(e){return e.errors.flatMap(t=>t.kind==="Union"?vo(t):[t])}function Ou(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ku(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ku(e,t){return[...new Set(e.concat(t))]}function Du(e){return xn(e,(t,r)=>{let n=bo(t),i=bo(r);return n!==i?n-i:xo(t)-xo(r)})}function bo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function xo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();Ao();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};To();f();u();c();p();m();f();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var Or=e=>e,kr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},Ro={bold:lr,red:Ye,green:Ni,dim:ur,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var _e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends _e{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends _e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var St=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mu(e,t);break;case"IncludeOnScalar":_u(e,t);break;case"EmptySelection":Nu(e,t,r);break;case"UnknownSelectionField":Bu(e,t);break;case"InvalidSelectionValue":qu(e,t);break;case"UnknownArgument":Vu(e,t);break;case"UnknownInputField":$u(e,t);break;case"RequiredArgumentMissing":ju(e,t);break;case"InvalidArgumentType":Gu(e,t);break;case"InvalidArgumentValue":Ju(e,t);break;case"ValueTooLarge":Qu(e,t);break;case"SomeFieldsMissing":Ku(e,t);break;case"TooManyFieldsGiven":Wu(e,t);break;case"Union":Po(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function _u(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${It(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Nu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Fu(e,t,i);return}if(n.hasField("select")){Lu(e,t);return}}if(r?.[Se(e.outputType.name)]){Uu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Fu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Lu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Oo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Uu(e,t){let r=new St;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Bu(e,t){let r=ko(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Oo(n,e.outputType);break;case"include":Hu(n,e.outputType);break;case"omit":zu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(It(n)),i.join(" ")})}function qu(e,t){let r=ko(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Vu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Yu(n,e.arguments)),t.addErrorMessage(i=>So(i,r,e.arguments.map(o=>o.name)))}function $u(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>So(o,n,e.inputType.fields.map(s=>s.name)))}function So(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Xu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(It(e)),n.join(" ")}function ju(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new St,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Io).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Io(e){return e.kind==="list"?`${Io(e.elementType)}[]`:e.name}function Gu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Dr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ju(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ku(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Dr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(It(i)),o.join(" ")})}function Wu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Oo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Hu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function zu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Yu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function ko(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function It({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Zu=3;function Xu(e,t){let r=1/0,n;for(let i of t){let o=(0,Co.default)(e,i);o>Zu||o`}};function lt(e){return e instanceof Ot}f();u();c();p();m();var Mr=Symbol(),On=new WeakMap,Te=class{constructor(t){t===Mr?On.set(this,`Prisma.${this._getName()}`):On.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return On.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Dt=class extends kt{#e};Dn(Dt,"DbNull");var Mt=class extends kt{#e};Dn(Mt,"JsonNull");var _t=class extends kt{#e};Dn(_t,"AnyNull");var kn={classes:{DbNull:Dt,JsonNull:Mt,AnyNull:_t},instances:{DbNull:new Dt(Mr),JsonNull:new Mt(Mr),AnyNull:new _t(Mr)}};function Dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Mo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Mo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Mo).write(this.value)}};var Mn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Mn(_o(e))}function _o(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new _r(r,No(n));t.addField(i)}return t}function No(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=yr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Te?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Se(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?ec(e):typeof e=="object"?_o(e):new H(Object.prototype.toString.call(e))}function ec(e){let t=new ot;for(let r of e)t.addItem(No(r));return t}function Nr(e,t){let r=t==="pretty"?Ro:kr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Sr(h,a,s);let{message:l,args:d}=Nr(a,r),g=Cr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new ee(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Lo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:tc({...e,...Fo(t.name,e,t.result.$allModels),...Fo(t.name,e,t.result[n])})}function tc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return gr(e,n=>({...n,needs:r(n.name,new Set)}))}function Fo(e,t,r){return r?gr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:rc(t,o,i)})):{}}function rc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Bo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=At(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=At(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Lo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function qo(e){return e instanceof Ur}function nc(e){return new Ur(e)}f();u();c();p();m();f();u();c();p();m();var Vo=Symbol(),Nt=class{constructor(t){if(t!==Vo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_n:t}},_n=new Nt(Vo);function be(e){return e instanceof Nt}var ic={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},$o="explicitly `undefined` values are not allowed";function Fn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:ic[t],query:Ft(r,h)}}function Ft({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Go(r,n),selection:oc(e,t,i,n)}}function oc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),uc(e,n)):sc(n,t,r)}function sc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ac(n,t,e),lc(n,r,e),n}function ac(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Ln(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ft(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ft(i,o)}}function lc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Bo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Ln(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function uc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Ln(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ft({},a):r[o]=!0;continue}r[o]=Ft(s,a)}}return r}function jo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(yr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(qo(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return cc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(pc(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==kn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(mc(e))return e.toJSON();if(typeof e=="object")return Go(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Go(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=jo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:$o}))}return r}function cc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Se(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ue(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function Jo(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Lt=class{_client;constructor(t){this._client=t}prometheus(t){return Jo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Jo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function fc(e,t){let r=At(()=>dc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function dc(e){return{datamodel:{models:Un(e.models),enums:Un(e.enums),types:Un(e.types)}}}function Un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var Bn=new WeakMap,Br="$$PrismaTypedSql",Ut=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function gc(e){return(...t)=>new Ut(e,t)}function qr(e){return e!=null&&e[Br]===Br}f();u();c();p();m();var ua=Qe(gn());f();u();c();p();m();Qo();Gi();Hi();f();u();c();p();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var $r={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>$r,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ho=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=wc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=zo(Reflect.ownKeys(o),r),a=zo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...$r,...l?.getPropertyDescriptor(s)}:$r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ho]=function(){let o={...this};return delete o[Ho],o},i}function wc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function zo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function pt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function Yo(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:kr}).write(t).toString()}f();u();c();p();m();var Ec="P2037";function Jr({error:e,user_facing_error:t},r,n){return t.error_code?new se(bc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function bc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Ec&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var qn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Zo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function mt(e={}){let t=Pc(e);return Object.entries(t).reduce((n,[i,o])=>(Zo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Pc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Xo(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:mt})(e)}f();u();c();p();m();function vc(e={}){let{select:t,...r}=e;return typeof t=="object"?mt({...r,_count:t}):mt({...r,_count:{_all:!0}})}function Tc(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function es(e,t){return t({action:"count",unpacker:Tc(e),argsMapper:vc})(e)}f();u();c();p();m();function Ac(e={}){let t=mt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Rc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ts(e,t){return t({action:"groupBy",unpacker:Rc(e),argsMapper:Ac})(e)}function rs(e,t,r){if(t==="aggregate")return n=>Xo(n,r);if(t==="count")return n=>es(n,r);if(t==="groupBy")return n=>ts(n,r)}f();u();c();p();m();function ns(e,t){let r=t.fields.filter(i=>!i.relationName),n=no(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ot(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var is=e=>Array.isArray(e)?e:e.split("."),Vn=(e,t)=>is(t).reduce((r,n)=>r&&r[n],e),os=(e,t,r)=>is(t).reduceRight((n,i,o,s)=>Object.assign({},Vn(e,s.slice(0,o)),{[i]:n}),r);function Cc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Sc(e,t,r){return t===void 0?e??{}:os(t,r,e||!0)}function $n(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Ne(e._errorFormat),g=Cc(n,i),h=Sc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Ic(e,t);return new Proxy(T,{get(S,C){if(!I.includes(C))return S[C];let F=[a[C].type,r,C],B=[g,h];return $n(e,...F,...B)},...jr([...I,...Object.getOwnPropertyNames(T)])})}}function Ic(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Oc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],kc=["aggregate","count","groupBy"];function jn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Dc(e,t),_c(e,t),Bt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Dc(e,t){let r=Ee(t),n=Object.keys(Ct).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return Oc.includes(o)?$n(e,t,s):Mc(i)?rs(e,i,s):s({})}}}function Mc(e){return kc.includes(e)}function _c(e,t){return Be(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ns(t,r)}))}f();u();c();p();m();function ss(e){return e.replace(/^./,t=>t.toUpperCase())}var Gn=Symbol();function qt(e){let t=[Nc(e),Fc(e),te(Gn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Bt(r)),me(e,t)}function Nc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Fc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Be({getKeys(){return n},getPropertyValue(i){let o=ss(i);if(e._runtimeDataModel.models[o]!==void 0)return jn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return jn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function as(e){return e[Gn]?e[Gn]:e}function ls(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return qt(t)}f();u();c();p();m();f();u();c();p();m();function us({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(pt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(pt(d))}Lc(e,l.needs)&&s.push(Uc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Lc(e,t){return t.every(r=>bn(e,r))}function Uc(e,t){return Be(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Kr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Kr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ps({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Kr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return us({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Bc=["$connect","$disconnect","$on","$transaction","$extends"],ms=Bc;function fs(e){if(e instanceof ue)return qc(e);if(qr(e))return Vc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:fs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(o,l),a.args=s,gs(e,a,r,n+1)}})})}function hs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return gs(e,t,s)}function ys(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ws(r,n,0,e):e(r)}}function ws(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(i,l),ws(a,t,r+1,n)}})}var ds=e=>e;function Es(e=ds,t=ds){return r=>e(t(r))}f();u();c();p();m();var bs=Z("prisma:client"),xs={Vercel:"vercel","Netlify CI":"netlify"};function Ps({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(bs("checkPlatformCaching:postinstall",e),bs("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in xs){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${xs[t]}-build`;throw console.error(i),new Q(i,r)}}f();u();c();p();m();function vs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function Ts(e,t){throw new Error(t)}function $c(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function jc(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function $t(e){return e===null?e:Array.isArray(e)?e.map($t):typeof e=="object"?$c(e)?Gc(e):e.constructor!==null&&e.constructor.name!=="Object"?e:jc(e,$t):e}function Gc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:Ts(t,"Unknown tagged value")}}var As="6.19.3";f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qc=()=>globalThis.process?.release?.name==="node",Kc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Wc=()=>!!globalThis.Deno,Hc=()=>typeof globalThis.Netlify=="object",zc=()=>typeof globalThis.EdgeRuntime=="object",Yc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Zc(){return[[Hc,"netlify"],[zc,"edge-light"],[Yc,"workerd"],[Wc,"deno"],[Kc,"bun"],[Qc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Xc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Jn(){let e=Zc();return{id:e,prettyName:Xc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Jn().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Wr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Wr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var qe=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N(qe,"InvalidDatasourceError");function Rs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=hn(i)?"http:":"https:";y.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var Cs=Qe(zi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Cs.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ep(e){return e[0]*1e3+e[1]/1e6}function Qn(e){return new Date(ep(e))}f();u();c();p();m();f();u();c();p();m();var dt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(dt,"ForcedRetryError");f();u();c();p();m();var Ve=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(Ve,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ie{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var $e=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N($e,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Kn="This request could not be understood by the server",jt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Kn,U(t,!1)),n&&(this.code=n)}};N(jt,"BadRequestError");f();u();c();p();m();var Gt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Gt,"HealthcheckTimeoutError");f();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Jt,"EngineStartupError");f();u();c();p();m();var Qt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Qt,"EngineVersionNotSupportedError");f();u();c();p();m();var Wn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Wn){super(r,U(t,!1))}};N(Kt,"GatewayTimeoutError");f();u();c();p();m();var tp="Interactive transaction error",Wt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=tp){super(r,U(t,!1))}};N(Wt,"InteractiveTransactionError");f();u();c();p();m();var rp="Request parameters are invalid",Ht=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=rp){super(r,U(t,!1))}};N(Ht,"InvalidRequestError");f();u();c();p();m();var Hn="Requested resource does not exist",zt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Hn){super(r,U(t,!1))}};N(zt,"NotFoundError");f();u();c();p();m();var zn="Unknown server error",gt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||zn,U(t,!0)),this.logs=n}};N(gt,"ServerError");f();u();c();p();m();var Yn="Unauthorized, check your connection string",Yt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=Yn){super(r,U(t,!1))}};N(Yt,"UnauthorizedError");f();u();c();p();m();var Zn="Usage exceeded, retry again later",Zt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Zn){super(r,U(t,!0))}};N(Zt,"UsageExceededError");async function np(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Xt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await np(e);if(n.type==="QueryEngineError")throw new se(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new gt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new $e(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Gt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Wt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Yt(r,ht(Yn,n));if(e.status===404)return new zt(r,ht(Hn,n));if(e.status===429)throw new Zt(r,ht(Zn,n));if(e.status===504)throw new Kt(r,ht(Wn,n));if(e.status>=500)throw new gt(r,ht(zn,n));if(e.status>=400)throw new jt(r,ht(Kn,n))}function ht(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Ss(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Is(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ae[s]+Ae[a]+Ae[l]+Ae[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[l]+"="),r}f();u();c();p();m();function Os(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var ks={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var er=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(er,"RequestError");async function je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new er(a,{clientVersion:n,cause:s})}}var op=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ds=Z("prisma:client:dataproxyEngine");async function sp(e,t){let r=ks["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&op.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=ap(`<=${a}.${l}.${d}`),h=await je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Ds("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Ms(e,t){let r=await sp(e,t);return Ds("version",r),r}function ap(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var _s=3,tr=Z("prisma:client:dataproxyEngine"),yt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Os(t),this.config=t,this.env=t.env,this.inlineSchema=Is(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Ms(this.host,this.config),tr("host",this.host),tr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":tr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Qn(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Qn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||tr("schema response status",r.status);let n=await Xt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Gr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||tr("graphql response status",a.status),await this.handleError(await Xt(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Xt(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Xt(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Rs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=_s)throw i instanceof dt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${_s} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ss(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof $e)throw await this.uploadSchema(),new dt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Jr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function Ns({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=C=>{i.push({_tag:"warning",value:C})},a=C=>{let M=C.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=dr(e),g=!!t,h=l||d;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(C){return C.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function Fs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Ns({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new yt(t):(i.driverAdapters,new yt(t))}f();u();c();p();m();function Ls({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Us=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Bs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function wt(e){try{return qs(e,"fast")}catch{return qs(e,"slow")}}function qs(e,t){return JSON.stringify(e.map(r=>$s(r,t)))}function $s(e,t){if(Array.isArray(e))return e.map(r=>$s(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Me.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(lp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?js(e):e}function lp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function js(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Vs);let t={};for(let r of Object.keys(e))t[r]=Vs(e[r]);return t}function Vs(e){return typeof e=="bigint"?e.toString():js(e)}var up=/^(\s*alter\s)/i,Gs=Z("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&up.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:wt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:wt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Bs(r),i={values:wt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Gs(`prisma.${e}(${n}, ${i.values})`):Gs(`prisma.${e}(${n})`),{query:n,parameters:i}},Js={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},Qs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Ks(r(s)):Ks(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Ks(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var cp=dn.split(".")[0],pp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${cp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??pp}};function Ws(){return new ri}f();u();c();p();m();function Hs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function zs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();f();u();c();p();m();function zr(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function Ys(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();u();c();p();m();var mp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return mp[e]}f();u();c();p();m();var Yr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function oi(e){let t=[],r=fp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:gp(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Zs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ys(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(dp(t),hp(t,i))throw t;if(t instanceof se&&yp(t)){let d=Xs(t.meta);Fr({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Cr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ce(l,this.client._clientVersion);if(t instanceof ae)throw new ae(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Ce)throw new Ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?En(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=Vn(o,s),l=i==="queryRaw"?oi(a):$t(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function gp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Zs(e)};Ue(e,"Unknown transaction kind")}}function Zs(e){return{id:e.id,payload:e.payload}}function hp(e,t){return zr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function yp(e){return e.code==="P2009"||e.code==="P2012"}function Xs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Xs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var ea=As;f();u();c();p();m();var oa=Qe(Sn());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var ta=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ra=["pretty","colorless","minimal"],na=["info","query","warn","error"],wp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Et(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ra.includes(e)){let t=Et(e,ra);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!na.includes(r)){let n=Et(r,na);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Et(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=bp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(xp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Et(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function sa(e,t){for(let[r,n]of Object.entries(e)){if(!ta.includes(r)){let i=Et(r,ta);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}wp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Et(e,t){if(t.length===0||typeof e!="string")return"";let r=Ep(e,t);return r?` Did you mean "${r}"?`:""}function Ep(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,oa.default)(e,i)}));r.sort((i,o)=>i.distanceSe(n)===t);if(r)return e[r]}function xp(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();u();c();p();m();function aa(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!zr(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Fe=Z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Pp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},vp=Symbol.for("prisma.client.transaction.id"),Tp={id:0,nextId(){return++this.id}};function Ap(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ps(e),n&&sa(n,e);let i=new Vr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Ls(e),this._clientVersion=e.clientVersion??ea,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ws();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&pr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&Z.enable("prisma:client");let h=pr.resolve(e.dirname,e.relativePath);ji.existsSync(h)||(h=e.dirname),Fe("dirname",e.dirname),Fe("relativePath",e.relativePath),Fe("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&zs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:vs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:Gr,prismaGraphQLToJSError:Jr,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:Z("prisma:client:accelerateEngine"),engineVersion:ua.version,clientVersion:e.clientVersion}},Fe("clientVersion",e.clientVersion),this._engine=Fs(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,C=>{Tt.log(`${Tt.tags[S]??""}`,C.message||C.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{$i()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=la(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Us,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...la(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Tp.nextId(),s=Hs(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return aa(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(qt(me(as(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(vp,()=>n.id)])),[pt(ms)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Pp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await hs(this,T);return T.model?ps({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},C=this._tracingHelper.runInChildSpan(S,()=>Fn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return Z.enabled("prisma:client")&&(Fe("Prisma Client call:"),Fe(`prisma.${i}(${Yo(n)})`),Fe("Generated request:"),Fe(JSON.stringify(C,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:C,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new Lt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ls}return t}function la(e,t){return Rp(e)?[new ue(e,t),Js]:[e,Qs]}function Rp(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Cp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Sp(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Cp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();var export_warnEnvConflicts=void 0;export{Rr as DMMF,Z as Debug,Me as Decimal,Ci as Extensions,Lt as MetricsClient,Q as PrismaClientInitializationError,se as PrismaClientKnownRequestError,Ce as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,Ii as Public,ue as Sql,nc as createParam,fc as defineDmmfProperty,$t as deserializeJsonResponse,oi as deserializeRawResult,Il as dmmfToRuntimeDataModel,yc as empty,Ap as getPrismaClient,Jn as getRuntime,hc as join,Sp as makeStrictEnum,gc as makeTypedQueryFactory,kn as objectEnumValues,Ko as raw,Fn as serializeJsonQuery,_n as skip,Wo as sqltag,export_warnEnvConflicts as warnEnvConflicts,hr as warnOnce}; +//# sourceMappingURL=edge-esm.js.map diff --git a/lib/generated/prisma/runtime/edge.js b/lib/generated/prisma/runtime/edge.js new file mode 100644 index 0000000..4d3b8ec --- /dev/null +++ b/lib/generated/prisma/runtime/edge.js @@ -0,0 +1,35 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ba=Object.create;var lr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},ci=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&lr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ba(va(e)):{},ci(t||!e||!e.__esModule?lr(r,"default",{value:e,enumerable:!0}):r,e)),Aa=e=>ci(lr({},"__esModule",{value:!0}),e);var y,b,u=fe(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=fe(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=fe(()=>{"use strict";E=()=>{};E.prototype=E});var m=fe(()=>{"use strict"});var Ii=Je(ze=>{"use strict";f();u();c();p();m();var gi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ra=gi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=I;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=C);var F=M===C?0:4-M%4;return[M,F]}function l(S){var C=a(S),M=C[0],F=C[1];return(M+F)*3/4-F}function d(S,C,M){return(C+M)*3/4-M}function g(S){var C,M=a(S),F=M[0],B=M[1],O=new n(d(S,F,B)),L=0,le=B>0?F-4:F,J;for(J=0;J>16&255,O[L++]=C>>8&255,O[L++]=C&255;return B===2&&(C=r[S.charCodeAt(J)]<<2|r[S.charCodeAt(J+1)]>>4,O[L++]=C&255),B===1&&(C=r[S.charCodeAt(J)]<<10|r[S.charCodeAt(J+1)]<<4|r[S.charCodeAt(J+2)]>>2,O[L++]=C>>8&255,O[L++]=C&255),O}function h(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function T(S,C,M){for(var F,B=[],O=C;Ole?le:L+O));return F===1?(C=S[M-1],B.push(t[C>>2]+t[C<<4&63]+"==")):F===2&&(C=(S[M-2]<<8)+S[M-1],B.push(t[C>>10]+t[C>>4&63]+t[C<<2&63]+"=")),B.join("")}}),Ca=gi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,d=(1<>1,h=-7,T=n?o-1:0,I=n?-1:1,S=t[r+T];for(T+=I,s=S&(1<<-h)-1,S>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=I,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=I,h-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(S?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(S?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,d,g=s*8-o-1,h=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,C=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+T>=1?r+=I/d:r+=I*Math.pow(2,1-T),r*d>=2&&(a++,d/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*d-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+S]=l&255,S+=C,l/=256,o-=8);for(a=a<0;t[n+S]=a&255,S+=C,a/=256,g-=8);t[n+S-C]|=M*128}}),un=Ra(),We=Ca(),pi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ma;ze.INSPECT_MAX_BYTES=50;var ur=2147483647;ze.kMaxLength=ur;A.TYPED_ARRAY_SUPPORT=Sa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Sa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return mn(e)}return hi(e,t,r)}A.poolSize=8192;function hi(e,t,r){if(typeof e=="string")return Oa(e,t);if(ArrayBuffer.isView(e))return ka(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return wi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Da(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return hi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function yi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ia(e,t,r){return yi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Ia(e,t,r)};function mn(e){return yi(e),xe(e<0?0:fn(e)|0)}A.allocUnsafe=function(e){return mn(e)};A.allocUnsafeSlow=function(e){return mn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ei(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function cn(e){let t=e.length<0?0:fn(e.length)|0,r=xe(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Ei(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return pn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Si(e).length;default:if(i)return n?-1:pn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=Ei;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ga(this,t,r);case"utf8":case"utf-8":return xi(this,t,r);case"ascii":return $a(this,t,r);case"latin1":case"binary":return ja(this,t,r);case"base64":return qa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Le(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};pi&&(A.prototype[pi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),d=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,gn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:mi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):mi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function mi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let d;if(i){let g=-1;for(d=r;ds&&(r=s-a),d=r;d>=0;d--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Na(this,e,t,r);case"utf8":case"utf-8":return Fa(this,e,t,r);case"ascii":case"latin1":case"binary":return La(this,e,t,r);case"base64":return Ua(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function qa(e,t,r){return t===0&&r===e.length?un.fromByteArray(e):un.fromByteArray(e.slice(t,r))}function xi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,d,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],d=e[i+2],(l&192)===128&&(d&192)===128&&(h=(o&15)<<12|(l&63)<<6|d&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],d=e[i+2],g=e[i+3],(l&192)===128&&(d&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(d&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Va(n)}var fi=4096;function Va(e){let t=e.length;if(t<=fi)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),We.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),We.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),We.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Pi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function vi(e,t,r,n,i){Ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Se(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Se(function(e,t=0){return vi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Se(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Se(function(e,t=0){return vi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ti(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,4,34028234663852886e22,-34028234663852886e22),We.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ai(this,e,t,!1,r)};function Ri(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,8,17976931348623157e292,-17976931348623157e292),We.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ri(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ri(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=di(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=di(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function di(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Qa(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Ci(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ke.ERR_OUT_OF_RANGE("value",a,e)}Qa(n,i,o)}function He(e,t){if(typeof e!="number")throw new Ke.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new Ke.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ke.ERR_BUFFER_OUT_OF_BOUNDS:new Ke.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ka=/[^+/0-9A-Za-z-_]/g;function Wa(e){if(e=e.split("=")[0],e=e.trim().replace(Ka,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function pn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ha(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Si(e){return un.toByteArray(Wa(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function gn(e){return e!==e}var Ya=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,f=fe(()=>{"use strict";w=Qe(Ii())});function il(){return!1}function bn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ol(){return bn()}function sl(){return[]}function al(e){e(null,[])}function ll(){return""}function ul(){return""}function cl(){}function pl(){}function ml(){}function fl(){}function dl(){}function gl(){}function hl(){}function yl(){}function wl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function El(e,t){t(null,bn())}var bl,xl,Qi,Ki=fe(()=>{"use strict";f();u();c();p();m();bl={},xl={existsSync:il,lstatSync:bn,stat:El,statSync:ol,readdirSync:sl,readdir:al,readlinkSync:ll,realpathSync:ul,chmodSync:cl,renameSync:pl,mkdirSync:ml,rmdirSync:fl,rmSync:dl,unlinkSync:gl,watchFile:hl,unwatchFile:yl,watch:wl,promises:bl},Qi=xl});var Wi=Je((df,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Tl(...e){return e.join("/")}function Al(...e){return e.join("/")}function Rl(e){let t=Hi(e),r=zi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Hi(e){let t=e.split("/");return t[t.length-1]}function zi(e){return e.split("/").slice(0,-1).join("/")}function Sl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Yi,Cl,Il,Ol,dr,Zi=fe(()=>{"use strict";f();u();c();p();m();Yi="/",Cl=":";Il={sep:Yi},Ol={basename:Hi,delimiter:Cl,dirname:zi,join:Al,normalize:Sl,parse:Rl,posix:Il,resolve:Tl,sep:Yi},dr=Ol});var Pn=Je((Mf,Ml)=>{Ml.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xi=Je(gr=>{"use strict";f();u();c();p();m();Object.defineProperty(gr,"__esModule",{value:!0});gr.enginesVersion=void 0;gr.enginesVersion=Pn().prisma.enginesVersion});var ro=Je((Qf,to)=>{"use strict";f();u();c();p();m();to.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Nn=Je((Jy,vo)=>{"use strict";f();u();c();p();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();u();c();p();m()});var Io=fe(()=>{"use strict";f();u();c();p();m()});var Jr,Xo=fe(()=>{"use strict";f();u();c();p();m();Jr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var kp={};vt(kp,{DMMF:()=>Dt,Debug:()=>z,Decimal:()=>Ae,Extensions:()=>hn,MetricsClient:()=>pt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Pe,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>yn,Sql:()=>se,createParam:()=>Jo,defineDmmfProperty:()=>Yo,deserializeJsonResponse:()=>dt,deserializeRawResult:()=>nn,dmmfToRuntimeDataModel:()=>ao,empty:()=>ts,getPrismaClient:()=>ya,getRuntime:()=>Zr,join:()=>es,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Zo,objectEnumValues:()=>Nr,raw:()=>Gn,serializeJsonQuery:()=>$r,skip:()=>Vr,sqltag:()=>Jn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Aa(kp);f();u();c();p();m();var hn={};vt(hn,{defineExtension:()=>Oi,getExtensionContext:()=>ki});f();u();c();p();m();f();u();c();p();m();function Oi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();u();c();p();m();function ki(e){return e}var yn={};vt(yn,{validator:()=>Di});f();u();c();p();m();f();u();c();p();m();function Di(...e){return t=>t}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var wn,Mi,_i,Ni,Fi=!0;typeof y<"u"&&({FORCE_COLOR:wn,NODE_DISABLE_COLORS:Mi,NO_COLOR:_i,TERM:Ni}=y.env||{},Fi=y.stdout&&y.stdout.isTTY);var Xa={enabled:!Mi&&_i==null&&Ni!=="dumb"&&(wn!=null&&wn!=="0"||Fi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Xa.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Pm=j(0,0),pr=j(1,22),mr=j(2,22),vm=j(3,23),Li=j(4,24),Tm=j(7,27),Am=j(8,28),Rm=j(9,29),Cm=j(30,39),Ye=j(31,39),Ui=j(32,39),Bi=j(33,39),qi=j(34,39),Sm=j(35,39),Vi=j(36,39),Im=j(37,39),$i=j(90,39),Om=j(90,39),km=j(40,49),Dm=j(41,49),Mm=j(42,49),_m=j(43,49),Nm=j(44,49),Fm=j(45,49),Lm=j(46,49),Um=j(47,49);f();u();c();p();m();var el=100,ji=["green","yellow","blue","magenta","cyan","red"],fr=[],Gi=Date.now(),tl=0,En=typeof y<"u"?y.env:{};globalThis.DEBUG??=En.DEBUG??"";globalThis.DEBUG_COLORS??=En.DEBUG_COLORS?En.DEBUG_COLORS==="true":!0;var At={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function rl(e){let t={color:ji[tl++%ji.length],enabled:At.enabled(e),namespace:e,log:At.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>el&&fr.shift(),At.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:nl(g)),d=`+${Date.now()-Gi}ms`;Gi=Date.now(),a(o,...l,d)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(rl,{get:(e,t)=>At[t],set:(e,t,r)=>At[t]=r});function nl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ji(){fr.length=0}f();u();c();p();m();f();u();c();p();m();var vl=Wi(),xn=vl.version;f();u();c();p();m();function Ze(e){let t=kl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Dl())}function kl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Dl(){return"library"}f();u();c();p();m();var eo="prisma+postgres",hr=`${eo}:`;function yr(e){return e?.toString().startsWith(`${hr}//`)??!1}function vn(e){if(!yr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var Ct={};vt(Ct,{error:()=>Fl,info:()=>Nl,log:()=>_l,query:()=>Ll,should:()=>no,tags:()=>Rt,warn:()=>Tn});f();u();c();p();m();var Rt={error:Ye("prisma:error"),warn:Bi("prisma:warn"),info:Vi("prisma:info"),query:qi("prisma:query")},no={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function _l(...e){console.log(...e)}function Tn(e,...t){no.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Nl(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Fl(e,...t){console.error(`${Rt.error} ${e}`,...t)}function Ll(e,...t){console.log(`${Rt.query} ${e}`,...t)}f();u();c();p();m();function Ue(e,t){throw new Error(t)}f();u();c();p();m();f();u();c();p();m();function An({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Ul=An();function Rn(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ul,"")}f();u();c();p();m();function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();u();c();p();m();function wr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();u();c();p();m();function Sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{io.has(e)||(io.add(e),Tn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(Q,"PrismaClientInitializationError");f();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(ne,"PrismaClientKnownRequestError");f();u();c();p();m();var Pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Pe,"PrismaClientRustPanicError");f();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ie,"PrismaClientUnknownRequestError");f();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(X,"PrismaClientValidationError");f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var ge=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();u();c();p();m();function Ie(e){return e.substring(0,1).toLowerCase()+e.substring(1)}f();u();c();p();m();function so(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}f();u();c();p();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();u();c();p();m();function ao(e){return{models:In(e.models),enums:In(e.enums),types:In(e.types)}}function In(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}f();u();c();p();m();function Xe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Er(e){return e.toString()!=="Invalid Date"}f();u();c();p();m();f();u();c();p();m();var et=9e15,Me=1e9,On="0123456789abcdef",Pr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",kn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},po,ve,_=!0,Ar="[DecimalError] ",De=Ar+"Invalid argument: ",mo=Ar+"Precision limit exceeded",fo=Ar+"crypto unavailable",go="[object Decimal]",ee=Math.floor,K=Math.pow,Bl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ql=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ho=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,$l=9007199254740991,jl=Pr.length-1,Dn=vr.length-1,R={toStringTag:go};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,d=e.s;if(!s||!a)return!l||!d?NaN:l!==d?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-d:0;if(l!==d)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Gl(n,xo(n,r)),n.precision=e,n.rounding=t,k(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,d,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*K(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=K(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),d=l.plus(g),n=V(d.plus(g).times(a),d.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return V(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(V(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,d=e,g=new s(8);d--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Cr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),d=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(d))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,V(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?he(t,n,i):new t(0):new t(NaN):e.isZero()?he(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=V(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=he(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding;if(d.isFinite()){if(d.isZero())return new g(d);if(d.abs().eq(1)&&h+4<=Dn)return s=he(g,h+4,T).times(.25),s.s=d.s,s}else{if(!d.s)return new g(NaN);if(h+4<=Dn)return s=he(g,h+4,T).times(.5),s.s=d.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/D),n=1,l=d.times(d),s=new g(d),i=d;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,d=this,g=d.constructor,h=g.precision,T=g.rounding,I=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=d.d,d.s<0||!r||!r[0]||d.eq(1))return new g(r&&!r[0]?-1/0:d.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+I,s=ke(d,a),n=t?Tr(g,a+10):ke(e,a),l=V(s,n,a,1),Ot(l.d,i=h,T))do if(a+=10,s=ke(d,a),n=t?Tr(g,a+10):ke(e,a),l=V(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Ot(l.d,i+=10,T));return _=!0,k(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.constructor;if(e=new S(e),!I.d||!e.d)return!I.s||!e.s?e=new S(NaN):I.d?e.s=-e.s:e=new S(e.d||I.s!==e.s?I:NaN),e;if(I.s!=e.s)return e.s=-e.s,I.plus(e);if(d=I.d,T=e.d,a=S.precision,l=S.rounding,!d[0]||!T[0]){if(T[0])e.s=-e.s;else if(d[0])e=new S(I);else return new S(l===3?-0:0);return _?k(e,a,l):e}if(r=ee(e.e/D),g=ee(I.e/D),d=d.slice(),o=g-r,o){for(h=o<0,h?(t=d,o=-o,s=T.length):(t=T,r=g,s=d.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=d.length,s=T.length,h=n0;--n)d[s++]=0;for(n=T.length;n>o;){if(d[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=d.length,i=g.length,s-i<0&&(i=s,r=g,g=d,d=r),t=0;i;)t=(d[--i]=d[i]+g[i]+t)/pe|0,d[i]%=pe;for(t&&(d.unshift(t),++n),s=d.length;d[--s]==0;)d.pop();return e.d=d,e.e=Rr(d,n),_?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=yo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ql(n,xo(n,r)),n.precision=e,n.rounding=t,k(ve>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,d=s.s,g=s.constructor;if(d!==1||!a||!a[0])return new g(!d||d<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,d=Math.sqrt(+s),d==0||d==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),d=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),d==1/0?t="5e"+l:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(d.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(V(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=V(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,d,g=this,h=g.constructor,T=g.d,I=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!I||!I[0])return new h(!e.s||T&&!T[0]&&!I||I&&!I[0]&&!T?NaN:!T||!I?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,d=I.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+I[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Rr(o,r),_?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return _n(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Me),t===void 0?t=n.rounding:oe(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,!0):(oe(e,0,Me),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e+1,t),r=ye(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ye(i):(oe(e,0,Me),t===void 0?t=o.rounding:oe(t,0,8),n=k(new o(i),e+i.e+1,t),r=ye(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,d,g,h,T,I=this,S=I.d,C=I.constructor;if(!S)return new C(I);if(d=r=new C(1),n=l=new C(0),t=new C(n),o=t.e=yo(S)-I.e-1,s=o%D,t.d[0]=K(10,s<0?D+s:s),e==null)e=o>0?t:d;else{if(a=new C(e),!a.isInt()||a.lt(d))throw Error(De+a);e=a.gt(t)?o>0?t:d:a}for(_=!1,a=new C(Y(S)),g=C.precision,C.precision=o=S.length*D*2;h=V(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=d,d=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=V(e.minus(r),n,0,1,1),l=l.plus(i.times(d)),r=r.plus(i.times(n)),l.s=d.s=I.s,T=V(d,n,o,1).minus(I).abs().cmp(V(l,r,o,1).minus(I).abs())<1?[d,n]:[l,r],C.precision=g,_=!0,T};R.toHexadecimal=R.toHex=function(e,t){return _n(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=V(r,e,0,t,1).times(e),_=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return _n(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,d=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(K(+a,d));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=ee(e.e/D),t>=e.d.length-1&&(r=d<0?-d:d)<=$l)return i=wo(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Mn(e.times(ke(a,n+r)),n),i.d&&(i=k(i,n+5,1),Ot(i.d,n,o)&&(t=n+10,i=k(Mn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ye(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Me),t===void 0?t=i.rounding:oe(t,0,8),n=k(new i(n),e,t),r=ye(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Me),t===void 0?t=n.rounding:oe(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=ye(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function Ot(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=K(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==K(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==K(10,t-3)-1,s}function br(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Gl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var V=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var d,g,h,T,I,S,C,M,F,B,O,L,le,J,sn,or,Pt,an,ce,sr,ar=n.constructor,ln=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ar(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?ln*0:ln/0);for(l?(I=1,g=n.e-i.e):(l=pe,I=D,g=ee(n.e/I)-ee(i.e/I)),ce=$.length,Pt=Z.length,F=new ar(ln),B=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ar.precision,s=ar.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)B.push(1),S=!0;else{if(J=J/I+2|0,h=0,ce==1){for(T=0,$=$[0],J++;(h1&&($=e($,T,l),Z=e(Z,T,l),ce=$.length,Pt=Z.length),or=ce,O=Z.slice(0,ce),L=O.length;L=l/2&&++an;do T=0,d=t($,O,ce,L),d<0?(le=O[0],ce!=L&&(le=le*l+(O[1]||0)),T=le/an|0,T>1?(T>=l&&(T=l-1),C=e($,T,l),M=C.length,L=O.length,d=t(C,O,M,L),d==1&&(T--,r(C,ce=10;T/=10)h++;F.e=h+g*I-1,k(F,a?o+F.e+1:o,s,S)}return F}}();function k(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/K(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/K(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%K(10,i-s-1)),d=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/K(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,d?(t-=e.e+1,h[0]=K(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=K(10,D-o),h[T]=s>0?(g/K(10,i-s)%K(10,s)|0)*a:0),d)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>I.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function Rr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function Tr(e,t,r){if(t>jl)throw _=!0,r&&(e.precision=r),Error(mo);return k(new e(Pr),t,1,!0)}function he(e,t,r){if(t>Dn)throw Error(mo);return k(new e(vr),t,r,!0)}function yo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function wo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(_=!1;;){if(r%2&&(o=o.times(t),uo(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),uo(t.d,s)}return _=!0,o}function lo(e){return e.d[e.d.length-1]&1}function Eo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=S):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(K(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(V(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(d<3&&Ot(s.d,l-n,I,d))T.precision=l+=10,r=o=a=new T(1),g=0,d++;else return k(s,T.precision=S,I,_=!0);else return T.precision=S,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,d,g,h,T,I=1,S=10,C=e,M=C.d,F=C.constructor,B=F.rounding,O=F.precision;if(C.s<0||!M||!M[0]||!C.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:C.s!=1?NaN:M?0:C);if(t==null?(_=!1,g=O):g=t,F.precision=g+=S,r=Y(M),n=r.charAt(0),Math.abs(o=C.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=Y(C.d),n=r.charAt(0),I++;o=C.e,n>1?(C=new F("0."+r),o++):C=new F(n+"."+r.slice(1))}else return d=Tr(F,g+2,O).times(o+""),C=ke(new F(n+"."+r.slice(1)),g-S).plus(d),F.precision=O,t==null?k(C,O,B,_=!0):C;for(h=C,l=s=C=V(C.minus(1),C.plus(1),g,1),T=k(C.times(C),g,1),i=3;;){if(s=k(s.times(T),g,1),d=l.plus(V(s,new F(i),g,1)),Y(d.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Tr(F,g+2,O).times(o+""))),l=V(l,new F(I),g,1),t==null)if(Ot(l.d,g-S,B,a))F.precision=g+=S,d=s=C=V(h.minus(1),h.plus(1),g,1),T=k(C.times(C),g,1),i=a=1;else return k(l,F.precision=O,B,_=!0);else return F.precision=O,l;l=d,i+=2}}function bo(e){return String(e.s*e.s/0)}function xr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ho.test(t))return xr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ql.test(t))r=16,t=t.toLowerCase();else if(Bl.test(t))r=2;else if(Vl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=wo(n,new n(r),o,o*2)),d=br(t,r,pe),g=d.length-1,o=g;d[o]===0;--o)d.pop();return o<0?new n(e.s*0):(e.e=Rr(d,g),e.d=d,_=!1,s&&(e=V(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?K(2,l):Te.pow(2,l))),_=!0,e)}function Ql(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,d=1,g=e.precision,h=Math.ceil(g/D);for(_=!1,l=r.times(r),a=new e(n);;){if(s=V(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=V(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,d++}return _=!0,s.d.length=h+1,s}function Cr(e,t){for(var r=e;--t;)r*=e;return r}function xo(e,t){var r,n=t.s<0,i=he(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=lo(r)?n?2:3:n?4:1,t;ve=lo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function _n(e,t,r,n){var i,o,s,a,l,d,g,h,T,I=e.constructor,S=r!==void 0;if(S?(oe(r,1,Me),n===void 0?n=I.rounding:oe(n,0,8)):(r=I.precision,n=I.rounding),!e.isFinite())g=bo(e);else{for(g=ye(e),s=g.indexOf("."),S?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new I(1),T.e=g.length-s,T.d=br(ye(T),10,i),T.e=T.d.length),h=br(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=S?"0p+0":"0";else{if(s<0?o--:(e=new I(e),e.d=h,e.e=o,e=V(e,T,r,n,0,i),h=e.d,o=e.e,d=po),s=h[r],a=i/2,d=d||h[r+1]!==void 0,d=n<4?(s!==void 0||d)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||d||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,d)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=br(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Kl(e){return new this(e).abs()}function Wl(e){return new this(e).acos()}function Hl(e){return new this(e).acosh()}function zl(e,t){return new this(e).plus(t)}function Yl(e){return new this(e).asin()}function Zl(e){return new this(e).asinh()}function Xl(e){return new this(e).atan()}function eu(e){return new this(e).atanh()}function tu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=he(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?he(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=he(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(V(e,t,o,1)),t=he(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(V(e,t,o,1)),r}function ru(e){return new this(e).cbrt()}function nu(e){return k(e=new this(e),e.e+1,2)}function iu(e,t,r){return new this(e).clamp(t,r)}function ou(e){if(!e||typeof e!="object")throw Error(Ar+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=kn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(fo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function su(e){return new this(e).cos()}function au(e){return new this(e).cosh()}function Po(e){var t,r,n;function i(o){var s,a,l,d=this;if(!(d instanceof i))return new i(o);if(d.constructor=i,co(o)){d.s=o.s,_?!o.d||o.e>i.maxE?(d.e=NaN,d.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(d.e=NaN,d.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(fo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Du});f();u();c();p();m();f();u();c();p();m();function Du(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();u();c();p();m();var kt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(kt||{});var Mu=Qe(ro());var _u={red:Ye,gray:$i,dim:mr,bold:pr,underline:Li,highlightSource:e=>e.highlight()},Nu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Fu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Lu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(Uu(t))),i){a.push("");let d=[i.toString()];o&&(d.push(o),d.push(s.dim(")"))),a.push(d.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Uu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?_u:Nu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Fu(e),Lu(r,t)}f();u();c();p();m();var ko=Qe(Nn());f();u();c();p();m();function Ro(e,t,r){let n=Co(e),i=Bu(n),o=Vu(i);o?Ir(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Co(e){return e.errors.flatMap(t=>t.kind==="Union"?Co(t):[t])}function Bu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function qu(e,t){return[...new Set(e.concat(t))]}function Vu(e){return Sn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Ao(t)-Ao(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ao(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();u();c();p();m();f();u();c();p();m();Io();f();u();c();p();m();var nt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};So();f();u();c();p();m();f();u();c();p();m();var Or=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();u();c();p();m();var kr=e=>e,Dr={bold:kr,red:kr,green:kr,dim:kr,enabled:!1},Oo={bold:pr,red:Ye,green:Ui,dim:mr,enabled:!0},it={write(e){e.writeLine(",")}};f();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();u();c();p();m();var _e=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ot=class extends _e{items=[];addItem(t){return this.items.push(new Or(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(it,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var st=class e extends _e{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ot&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(it,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();u();c();p();m();var H=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();u();c();p();m();var Mt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(it,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ir(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":$u(e,t);break;case"IncludeOnScalar":ju(e,t);break;case"EmptySelection":Gu(e,t,r);break;case"UnknownSelectionField":Wu(e,t);break;case"InvalidSelectionValue":Hu(e,t);break;case"UnknownArgument":zu(e,t);break;case"UnknownInputField":Yu(e,t);break;case"RequiredArgumentMissing":Zu(e,t);break;case"InvalidArgumentType":Xu(e,t);break;case"InvalidArgumentValue":ec(e,t);break;case"ValueTooLarge":tc(e,t);break;case"SomeFieldsMissing":rc(e,t);break;case"TooManyFieldsGiven":nc(e,t);break;case"Union":Ro(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function $u(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ju(e,t){let[r,n]=at(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${_t(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Gu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ju(e,t,i);return}if(n.hasField("select")){Qu(e,t);return}}if(r?.[Ie(e.outputType.name)]){Ku(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Ju(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Qu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${_t(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Ku(e,t){let r=new Mt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=at(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new st;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Wu(e,t){let r=No(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":ic(n,e.outputType);break;case"omit":oc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(_t(n)),i.join(" ")})}function Hu(e,t){let r=No(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function zu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),sc(n,e.arguments)),t.addErrorMessage(i=>Do(i,r,e.arguments.map(o=>o.name)))}function Yu(e,t){let[r,n]=at(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Fo(o,e.inputType)}t.addErrorMessage(o=>Do(o,n,e.inputType.fields.map(s=>s.name)))}function Do(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=lc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(_t(e)),n.join(" ")}function Zu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=at(e.argumentPath),s=new Mt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=at(e.dependentArgumentPath);t.addErrorMessage(d=>`Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Xu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Mr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function ec(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function tc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function rc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Fo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Mr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(_t(i)),o.join(" ")})}function nc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function ic(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function sc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function No(e,t){let[r,n]=at(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Fo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function at(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function _t({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var ac=3;function lc(e,t){let r=1/0,n;for(let i of t){let o=(0,ko.default)(e,i);o>ac||o`}};function lt(e){return e instanceof Nt}f();u();c();p();m();var _r=Symbol(),Ln=new WeakMap,Re=class{constructor(t){t===_r?Ln.set(this,`Prisma.${this._getName()}`):Ln.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ln.get(this)}},Ft=class extends Re{_getNamespace(){return"NullTypes"}},Lt=class extends Ft{#e};Un(Lt,"DbNull");var Ut=class extends Ft{#e};Un(Ut,"JsonNull");var Bt=class extends Ft{#e};Un(Bt,"AnyNull");var Nr={classes:{DbNull:Lt,JsonNull:Ut,AnyNull:Bt},instances:{DbNull:new Lt(_r),JsonNull:new Ut(_r),AnyNull:new Bt(_r)}};function Un(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();u();c();p();m();var Lo=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Bn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function ut(e){return new Bn(Uo(e))}function Uo(e){let t=new st;for(let[r,n]of Object.entries(e)){let i=new Fr(r,Bo(n));t.addField(i)}return t}function Bo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(rt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Er(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Re?new H(`Prisma.${e._getName()}`):lt(e)?new H(`prisma.${Ie(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?uc(e):typeof e=="object"?Uo(e):new H(Object.prototype.toString.call(e))}function uc(e){let t=new ot;for(let r of e)t.addItem(Bo(r));return t}function Lr(e,t){let r=t==="pretty"?Oo:Dr,n=e.renderAllMessages(r),i=new nt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ut(e);for(let h of t)Ir(h,a,s);let{message:l,args:d}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:d});throw new X(g,{clientVersion:o})}f();u();c();p();m();f();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}f();u();c();p();m();function Vo(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:cc({...e,...qo(t.name,e,t.result.$allModels),...qo(t.name,e,t.result[n])})}function cc(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return wr(e,n=>({...n,needs:r(n.name,new Set)}))}function qo(e,t,r){return r?wr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:pc(t,o,i)})):{}}function pc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function $o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ge;modelExtensionsCache=new ge;queryCallbacksCache=new ge;clientExtensions=It(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=It(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Vo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Go(e){return e instanceof qr}function Jo(e){return new qr(e)}f();u();c();p();m();f();u();c();p();m();var Qo=Symbol(),qt=class{constructor(t){if(t!==Qo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Vr:t}},Vr=new qt(Qo);function be(e){return e instanceof qt}var mc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ko="explicitly `undefined` values are not allowed";function $r({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g}){let h=new qn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:d,globalOmit:g});return{modelName:e,action:mc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ho(r,n),selection:fc(e,t,i,n)}}function fc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),yc(e,n)):dc(n,t,r)}function dc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&gc(n,t,e),hc(n,r,e),n}function gc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Vn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function hc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=jo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Vn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function yc(e,t){let r={},n=t.getComputedFields(),i=$o(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Vn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Xe(e)){if(Er(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Go(e))return{$type:"Param",value:e.name};if(lt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return wc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Ec(e))return e.values;if(rt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Re){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(bc(e))return e.toJSON();if(typeof e=="object")return Ho(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ho(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Ko}))}return r}function wc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ie(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ue(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();u();c();p();m();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var pt=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};f();u();c();p();m();function Yo(e,t){let r=It(()=>xc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function xc(e){return{datamodel:{models:$n(e.models),enums:$n(e.enums),types:$n(e.types)}}}function $n(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();u();c();p();m();var jn=new WeakMap,jr="$$PrismaTypedSql",$t=class{constructor(t,r){jn.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return jn.get(this).sql}get values(){return jn.get(this).values}};function Zo(e){return(...t)=>new $t(e,t)}function Gr(e){return e!=null&&e[jr]===jr}f();u();c();p();m();var ha=Qe(Pn());f();u();c();p();m();Xo();Ki();Zi();f();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();u();c();p();m();f();u();c();p();m();var Qr={enumerable:!0,configurable:!0,writable:!0};function Kr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Qr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var rs=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Pc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ns(Reflect.ownKeys(o),r),a=ns(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Qr,...l?.getPropertyDescriptor(s)}:Qr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[rs]=function(){let o={...this};return delete o[rs],o},i}function Pc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ns(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();u();c();p();m();function Wr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();u();c();p();m();function is(e){if(e===void 0)return"";let t=ut(e);return new nt(0,{colors:Dr}).write(t).toString()}f();u();c();p();m();var vc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(Tc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Tc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===vc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Qn=class{getLocation(){return null}};function Ne(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qn}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var os={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=Rc(e);return Object.entries(t).reduce((n,[i,o])=>(os[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Rc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ss(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();u();c();p();m();function Cc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function Sc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function as(e,t){return t({action:"count",unpacker:Sc(e),argsMapper:Cc})(e)}f();u();c();p();m();function Ic(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ls(e,t){return t({action:"groupBy",unpacker:Oc(e),argsMapper:Ic})(e)}function us(e,t,r){if(t==="aggregate")return n=>ss(n,r);if(t==="count")return n=>as(n,r);if(t==="groupBy")return n=>ls(n,r)}f();u();c();p();m();function cs(e,t){let r=t.fields.filter(i=>!i.relationName),n=so(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Nt(e,o,s.type,s.isList,s.kind==="enum")},...Kr(Object.keys(n))})}f();u();c();p();m();f();u();c();p();m();var ps=e=>Array.isArray(e)?e:e.split("."),Kn=(e,t)=>ps(t).reduce((r,n)=>r&&r[n],e),ms=(e,t,r)=>ps(t).reduceRight((n,i,o,s)=>Object.assign({},Kn(e,s.slice(0,o)),{[i]:n}),r);function kc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Dc(e,t,r){return t===void 0?e??{}:ms(t,r,e||!0)}function Wn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,d)=>({...l,[d.name]:d}),{});return l=>{let d=Ne(e._errorFormat),g=kc(n,i),h=Dc(l,o,g),T=r({dataPath:g,callsite:d})(h),I=Mc(e,t);return new Proxy(T,{get(S,C){if(!I.includes(C))return S[C];let F=[a[C].type,r,C],B=[g,h];return Wn(e,...F,...B)},...Kr([...I,...Object.getOwnPropertyNames(T)])})}}function Mc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var _c=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Nc=["aggregate","count","groupBy"];function Hn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Fc(e,t),Uc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Fc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let d=Ne(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:d};return e._request({...h,...a})},{action:o,args:l,model:t})};return _c.includes(o)?Wn(e,t,s):Lc(i)?us(e,i,s):s({})}}}function Lc(e){return Nc.includes(e)}function Uc(e,t){return Be(te("fields",()=>{let r=e._runtimeDataModel.models[t];return cs(t,r)}))}f();u();c();p();m();function fs(e){return e.replace(/^./,t=>t.toUpperCase())}var zn=Symbol();function Gt(e){let t=[Bc(e),qc(e),te(zn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),me(e,t)}function Bc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function qc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Be({getKeys(){return n},getPropertyValue(i){let o=fs(i);if(e._runtimeDataModel.models[o]!==void 0)return Hn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Hn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ds(e){return e[zn]?e[zn]:e}function gs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Gt(t)}f();u();c();p();m();f();u();c();p();m();function hs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let d=l.needs.filter(g=>n[g]);d.length>0&&a.push(mt(d))}else if(r){if(!r[l.name])continue;let d=l.needs.filter(g=>!r[g]);d.length>0&&a.push(mt(d))}Vc(e,l.needs)&&s.push($c(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Vc(e,t){return t.every(r=>Cn(e,r))}function $c(e,t){return Be(te(e.name,()=>e.compute(t)))}f();u();c();p();m();function Yr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let d=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:d,modelName:l.type,runtimeDataModel:n})}}function ws({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,d)=>{let g=Ee(l);return hs({result:a,modelName:g,select:d.select,omit:d.select?void 0:{...o?.[g],...d.omit},extensions:n})}})}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var jc=["$connect","$disconnect","$on","$transaction","$extends"],Es=jc;function bs(e){if(e instanceof se)return Gc(e);if(Gr(e))return Jc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:bs(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(o,l),a.args=s,Ps(e,a,r,n+1)}})})}function vs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ps(e,t,s)}function Ts(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?As(r,n,0,e):e(r)}}function As(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(i,l),As(a,t,r+1,n)}})}var xs=e=>e;function Rs(e=xs,t=xs){return r=>e(t(r))}f();u();c();p();m();var Cs=z("prisma:client"),Ss={Vercel:"vercel","Netlify CI":"netlify"};function Is({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Cs("checkPlatformCaching:postinstall",e),Cs("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in Ss){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Ss[t]}-build`;throw console.error(i),new Q(i,r)}}f();u();c();p();m();function Os(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();function ks(e,t){throw new Error(t)}function Qc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Kc(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function dt(e){return e===null?e:Array.isArray(e)?e.map(dt):typeof e=="object"?Qc(e)?Wc(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Kc(e,dt):e}function Wc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Te(t);case"Json":return JSON.parse(t);default:ks(t,"Unknown tagged value")}}var Ds="6.19.3";f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var zc=()=>globalThis.process?.release?.name==="node",Yc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Zc=()=>!!globalThis.Deno,Xc=()=>typeof globalThis.Netlify=="object",ep=()=>typeof globalThis.EdgeRuntime=="object",tp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function rp(){return[[Xc,"netlify"],[ep,"edge-light"],[tp,"workerd"],[Zc,"deno"],[Yc,"bun"],[zc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var np={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Zr(){let e=rp();return{id:e,prettyName:np[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new Q(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();u();c();p();m();f();u();c();p();m();f();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var qe=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};N(qe,"InvalidDatasourceError");function Ms(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=gt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==hr)throw new qe(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new qe(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=vn(i)?"http:":"https:";y.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(l="http:");let d=new URL(i.href.replace(o,l));return{apiKey:a,url:d}}f();u();c();p();m();var _s=Qe(Xi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":_s.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};f();u();c();p();m();function ip(e){return e[0]*1e3+e[1]/1e6}function Yn(e){return new Date(ip(e))}f();u();c();p();m();f();u();c();p();m();var ht=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};N(ht,"ForcedRetryError");f();u();c();p();m();var Ve=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};N(Ve,"NotImplementedYetError");f();u();c();p();m();f();u();c();p();m();var G=class extends ae{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var $e=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};N($e,"SchemaMissingError");f();u();c();p();m();f();u();c();p();m();var Zn="This request could not be understood by the server",Qt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Zn,U(t,!1)),n&&(this.code=n)}};N(Qt,"BadRequestError");f();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};N(Kt,"HealthcheckTimeoutError");f();u();c();p();m();var Wt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};N(Wt,"EngineStartupError");f();u();c();p();m();var Ht=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};N(Ht,"EngineVersionNotSupportedError");f();u();c();p();m();var Xn="Request timed out",zt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Xn){super(r,U(t,!1))}};N(zt,"GatewayTimeoutError");f();u();c();p();m();var op="Interactive transaction error",Yt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=op){super(r,U(t,!1))}};N(Yt,"InteractiveTransactionError");f();u();c();p();m();var sp="Request parameters are invalid",Zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=sp){super(r,U(t,!1))}};N(Zt,"InvalidRequestError");f();u();c();p();m();var ei="Requested resource does not exist",Xt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=ei){super(r,U(t,!1))}};N(Xt,"NotFoundError");f();u();c();p();m();var ti="Unknown server error",yt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ti,U(t,!0)),this.logs=n}};N(yt,"ServerError");f();u();c();p();m();var ri="Unauthorized, check your connection string",er=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ri){super(r,U(t,!1))}};N(er,"UnauthorizedError");f();u();c();p();m();var ni="Usage exceeded, retry again later",tr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ni){super(r,U(t,!0))}};N(tr,"UsageExceededError");async function ap(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function rr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await ap(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new $e(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Ht(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Wt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new Q(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Yt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new er(r,wt(ri,n));if(e.status===404)return new Xt(r,wt(ei,n));if(e.status===429)throw new tr(r,wt(ni,n));if(e.status===504)throw new zt(r,wt(Xn,n));if(e.status>=500)throw new yt(r,wt(ti,n));if(e.status>=400)throw new Qt(r,wt(Zn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();u();c();p();m();function Ns(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Fs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,d,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,d=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[d];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}f();u();c();p();m();function Ls(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new Q("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();u();c();p();m();var Us={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();u();c();p();m();f();u();c();p();m();var nr=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,U(r,!0))}};N(nr,"RequestError");async function je(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new nr(a,{clientVersion:n,cause:s})}}var up=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Bs=z("prisma:client:dataproxyEngine");async function cp(e,t){let r=Us["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&up.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,d]=s.split("."),g=pp(`<=${a}.${l}.${d}`),h=await je(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Bs("length of body fetched from unpkg.com",T.length);let I;try{I=JSON.parse(T)}catch(S){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),S}return I.version}throw new Ve("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function qs(e,t){let r=await cp(e,t);return Bs("version",r),r}function pp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Vs=3,ir=z("prisma:client:dataproxyEngine"),Et=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ls(t),this.config=t,this.env=t.env,this.inlineSchema=Fs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await qs(this.host,this.config),ir("host",this.host),ir("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":ir(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Yn(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Yn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await je(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||ir("schema response status",r.status);let n=await rr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Wr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||ir("graphql response status",a.status),await this.handleError(await rr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await je(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await rr(l,this.clientVersion));let d=await l.json(),{extensions:g}=d;g&&this.propagateResponseExtensions(g);let h=d.id,T=d["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await je(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await rr(a,this.clientVersion));let l=await a.json(),{extensions:d}=l;d&&this.propagateResponseExtensions(d);return}}})}getURLAndAPIKey(){return Ms({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new Ve("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Vs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Vs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ns(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof $e)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};f();u();c();p();m();function $s({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=C=>{i.push({_tag:"warning",value:C})},a=C=>{let M=C.join(` +`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),d=yr(e),g=!!t,h=l||d;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let I={accelerate:T,ppg:d,driverAdapters:g};function S(C){return C.length>0}return S(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:I}:{ok:!0,diagnostics:{warnings:i},isUsing:I}}function js({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=$s({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)St(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",d=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new Et(t):(i.driverAdapters,new Et(t))}f();u();c();p();m();function Gs({generator:e}){return e?.previewFeatures??[]}f();u();c();p();m();var Js=e=>({command:e});f();u();c();p();m();f();u();c();p();m();var Qs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();u();c();p();m();function bt(e){try{return Ks(e,"fast")}catch{return Ks(e,"slow")}}function Ks(e,t){return JSON.stringify(e.map(r=>Hs(r,t)))}function Hs(e,t){if(Array.isArray(e))return e.map(r=>Hs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Xe(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ae.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(mp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?zs(e):e}function mp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():zs(e)}var fp=/^(\s*alter\s)/i,Ys=z("prisma:client");function ii(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&fp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var oi=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Gr(r))n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:bt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:bt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Qs(r),i={values:bt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ys(`prisma.${e}(${n}, ${i.values})`):Ys(`prisma.${e}(${n})`),{query:n,parameters:i}},Zs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Xs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();u();c();p();m();function si(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=ea(r(s)):ea(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ea(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();u();c();p();m();var dp=xn.split(".")[0],gp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ai=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${dp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??gp}};function ta(){return new ai}f();u();c();p();m();function ra(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();u();c();p();m();function na(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();u();c();p();m();f();u();c();p();m();function tn(e){return typeof e.batchRequestIdx=="number"}f();u();c();p();m();function ia(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(li(e.query.arguments)),t.push(li(e.query.selection)),t.join("")}function li(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${li(n)})`:r}).join(" ")})`}f();u();c();p();m();var hp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ui(e){return hp[e]}f();u();c();p();m();var rn=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iGe("bigint",r));case"bytes-array":return t.map(r=>Ge("bytes",r));case"decimal-array":return t.map(r=>Ge("decimal",r));case"datetime-array":return t.map(r=>Ge("datetime",r));case"date-array":return t.map(r=>Ge("date",r));case"time-array":return t.map(r=>Ge("time",r));default:return t}}function nn(e){let t=[],r=yp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),d=n.some(h=>ui(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Ep(o),containsWrite:d,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(I){return I}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ui(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ia(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(wp(t),bp(t,i))throw t;if(t instanceof ne&&xp(t)){let d=sa(t.meta);Ur({args:o,errors:[d],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Sr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let d=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:d,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Pe(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof Pe)throw new Pe(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?Rn(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(d=>d!=="select"&&d!=="include"),a=Kn(o,s),l=i==="queryRaw"?nn(a):dt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Ep(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};Ue(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function bp(e,t){return tn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function xp(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();u();c();p();m();var aa=Ds;f();u();c();p();m();var ma=Qe(Nn());f();u();c();p();m();var q=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(q,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],Pp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ua.includes(e)){let t=xt(e,ua);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ca.includes(r)){let n=xt(r,ca);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Tp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(d=>d.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Ap(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function fa(e,t){for(let[r,n]of Object.entries(e)){if(!la.includes(r)){let i=xt(r,la);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Pp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=vp(e,t);return r?` Did you mean "${r}"?`:""}function vp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ma.default)(e,i)}));r.sort((i,o)=>i.distanceIe(n)===t);if(r)return e[r]}function Ap(e,t){let r=ut(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Lr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();u();c();p();m();function da(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=d=>{o||(o=!0,r(d))};for(let d=0;d{n[d]=g,a()},g=>{if(!tn(g)){l(g);return}g.batchRequestIdx===d?l(g):(i||(i=g),a())})})}var Fe=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Rp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Cp=Symbol.for("prisma.client.transaction.id"),Sp={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=si();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Is(e),n&&fa(n,e);let i=new Jr().on("error",()=>{});this._extensions=ct.empty(),this._previewFeatures=Gs(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ta();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&dr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},d=l.__internal??{},g=d.debug===!0;g&&z.enable("prisma:client");let h=dr.resolve(e.dirname,e.relativePath);Qi.existsSync(h)||(h=e.dirname),Fe("dirname",e.dirname),Fe("relativePath",e.relativePath),Fe("cwd",h);let T=d.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&na(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(I=>typeof I=="string"?I==="query":I.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Os(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:gt,getBatchRequestPayload:Wr,prismaGraphQLToJSError:Hr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:ne,debug:z("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Fe("clientVersion",e.clientVersion),this._engine=js(e,this._engineConfig),this._requestHandler=new on(this,i),l.log)for(let I of l.log){let S=typeof I=="string"?I:I.emit==="stdout"?I.level:null;S&&this.$on(S,C=>{Ct.log(`${Ct.tags[S]??""}`,C.message||C.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ji()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return ii(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(ii(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Js,callsite:Ne(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Ne(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Sp.nextId(),s=ra(n.length),a=n.map((l,d)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:d,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return da(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let d={kind:"itx",...a};l=await n(this._createItxClient(d)),await this._engine.transaction("commit",o,a)}catch(d){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),d}return l}_createItxClient(n){return me(Gt(me(ds(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>si(n)),te(Cp,()=>n.id)])),[mt(Es)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Rp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:d,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&d===!1&&delete T.transaction;let I=await vs(this,T);return T.model?ws({result:I,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):I};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:d,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:I}){try{n=d?d(n):n;let S={name:"serialize"},C=this._tracingHelper.runInChildSpan(S,()=>$r({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Fe("Prisma Client call:"),Fe(`prisma.${i}(${is(n)})`),Fe("Generated request:"),Fe(JSON.stringify(C,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:C,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:I})}catch(S){throw S.clientVersion=this._clientVersion,S}}$metrics=new pt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=gs}return t}function ga(e,t){return Ip(e)?[new se(e,t),Zs]:[e,Xs]}function Ip(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();u();c();p();m();var Op=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Op.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();u();c();p();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=edge.js.map diff --git a/lib/generated/prisma/runtime/index-browser.d.ts b/lib/generated/prisma/runtime/index-browser.d.ts new file mode 100644 index 0000000..d11f410 --- /dev/null +++ b/lib/generated/prisma/runtime/index-browser.d.ts @@ -0,0 +1,370 @@ +declare class AnyNull extends NullTypesEnumValue { + #private; +} + +declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +declare class DbNull extends NullTypesEnumValue { + #private; +} + +export declare function Decimal(n: Decimal.Value): Decimal; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: RuntimeName; + prettyName: string; + isEdge: boolean; +}; + +declare class JsonNull extends NullTypesEnumValue { + #private; +} + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +declare type Narrowable = string | number | bigint | boolean | []; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +export { } diff --git a/lib/generated/prisma/runtime/index-browser.js b/lib/generated/prisma/runtime/index-browser.js new file mode 100644 index 0000000..086502f --- /dev/null +++ b/lib/generated/prisma/runtime/index-browser.js @@ -0,0 +1,17 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var pe=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var Ye=e=>{throw TypeError(e)};var Oe=(e,n)=>{for(var i in n)pe(e,i,{get:n[i],enumerable:!0})},xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ke(n))!Qe.call(e,r)&&r!==i&&pe(e,r,{get:()=>n[r],enumerable:!(t=Xe(n,r))||t.enumerable});return e};var ze=e=>xe(pe({},"__esModule",{value:!0}),e);var ne=(e,n,i)=>n.has(e)?Ye("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i);var ii={};Oe(ii,{Decimal:()=>Je,Public:()=>ge,getRuntime:()=>_e,makeStrictEnum:()=>qe,objectEnumValues:()=>Ae});module.exports=ze(ii);var ge={};Oe(ge,{validator:()=>Re});function Re(...e){return n=>n}var ie=Symbol(),me=new WeakMap,we=class{constructor(n){n===ie?me.set(this,"Prisma.".concat(this._getName())):me.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return me.get(this)}},G=class extends we{_getNamespace(){return"NullTypes"}},Ne,J=class extends G{constructor(){super(...arguments);ne(this,Ne)}};Ne=new WeakMap;ke(J,"DbNull");var ve,X=class extends G{constructor(){super(...arguments);ne(this,ve)}};ve=new WeakMap;ke(X,"JsonNull");var Ee,K=class extends G{constructor(){super(...arguments);ne(this,Ee)}};Ee=new WeakMap;ke(K,"AnyNull");var Ae={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ie),JsonNull:new X(ie),AnyNull:new K(ie)}};function ke(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var ye=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function qe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!ye.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var en=()=>{var e,n;return((n=(e=globalThis.process)==null?void 0:e.release)==null?void 0:n.name)==="node"},nn=()=>{var e,n;return!!globalThis.Bun||!!((n=(e=globalThis.process)==null?void 0:e.versions)!=null&&n.bun)},tn=()=>!!globalThis.Deno,rn=()=>typeof globalThis.Netlify=="object",sn=()=>typeof globalThis.EdgeRuntime=="object",on=()=>{var e;return((e=globalThis.navigator)==null?void 0:e.userAgent)==="Cloudflare-Workers"};function un(){var i;return(i=[[rn,"netlify"],[sn,"edge-light"],[on,"workerd"],[tn,"deno"],[nn,"bun"],[en,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0))!=null?i:""}var fn={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function _e(){let e=un();return{id:e,prettyName:fn[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var V=9e15,H=1e9,Se="0123456789abcdef",se="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",oe="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Me={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-V,maxE:V,crypto:!1},Le,Z,w=!0,fe="[DecimalError] ",$=fe+"Invalid argument: ",Ie=fe+"Precision limit exceeded",Ze=fe+"crypto unavailable",Ue="[object Decimal]",R=Math.floor,C=Math.pow,cn=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ln=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,an=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Be=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,dn=9007199254740991,hn=se.length-1,Ce=oe.length-1,h={toStringTag:Ue};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,c=s.s,f=e.s;if(!o||!u)return!c||!f?NaN:c!==f?c:o===u?0:!o^c<0?1:-1;if(!o[0]||!u[0])return o[0]?c:u[0]?-f:0;if(c!==f)return c;if(s.e!==e.e)return s.e>e.e^c<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^c<0?1:-1;return t===r?0:t>r^c<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=pn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,c,f,l=this,a=l.constructor;if(!l.isFinite()||l.isZero())return new a(l);for(w=!1,s=l.s*C(l.s*l,1/3),!s||Math.abs(s)==1/0?(i=b(l.d),e=l.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=R((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=l.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,c=u.times(u).times(u),f=c.plus(l),t=k(f.plus(l).times(u),f.plus(c),o+2,1),b(u.d).slice(0,o)===(i=b(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(l))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(l));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-R(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return k(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(k(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/le(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var c,f=e,l=new o(8);f--;)c=s.times(s),s=u.minus(c.times(l.minus(c.times(l))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/le(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),c=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(c.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,k(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e=this,n=e.constructor,i=e.abs().cmp(1),t=n.precision,r=n.rounding;return i!==-1?i===0?e.isNeg()?F(n,t,r):new n(0):new n(NaN):e.isZero()?F(n,t+4,r).times(.5):(n.precision=t+6,n.rounding=1,e=new n(1).minus(e).div(e.plus(1)).sqrt().atan(),n.precision=t,n.rounding=r,e.times(2))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=k(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=F(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding;if(f.isFinite()){if(f.isZero())return new l(f);if(f.abs().eq(1)&&a+4<=Ce)return o=F(l,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new l(NaN);if(a+4<=Ce)return o=F(l,a+4,d).times(.5),o.s=f.s,o}for(l.precision=u=a+10,l.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,c=f.times(f),o=new l(f),r=f;e!==-1;)if(r=r.times(c),s=o.minus(r.div(t+=2)),r=r.times(c),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding,g=5;if(e==null)e=new l(10),n=!0;else{if(e=new l(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new l(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new l(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),Q(c.d,r=a,d))do if(u+=10,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),!s){+b(c.d).slice(r+1,r+15)+1==1e14&&(c=p(c,a+1,0));break}while(Q(c.d,r+=10,d));return w=!0,p(c,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,c=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(c===3?-0:0);return w?p(e,u,c):e}if(i=R(e.e/m),l=R(g.e/m),f=f.slice(),s=l-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=l,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=l.length,o-r<0&&(r=o,i=l,l=f,f=i),n=0;r;)n=(f[--r]=f[r]+l[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ce(f,t),w?p(e,u,c):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=$e(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=mn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,c=o.e,f=o.s,l=o.constructor;if(f!==1||!u||!u[0])return new l(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=b(u),(n.length+c)%2==0&&(n+="0"),f=Math.sqrt(n),c=R((c+1)/2)-(c<0||c%2),f==1/0?n="5e"+c:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),t=new l(n)):t=new l(f.toString()),i=(c=l.precision)+3;;)if(s=t,t=s.plus(k(o,s,i+2,1)).times(.5),b(s.d).slice(0,i)===(n=b(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,c+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,c+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,c,l.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=k(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,c,f,l=this,a=l.constructor,d=l.d,g=(e=new a(e)).d;if(e.s*=l.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=R(l.e/m)+R(e.e/m),c=d.length,f=g.length,c=0;){for(n=0,r=c+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ce(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return Pe(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(q(e,0,H),n===void 0?n=t.rounding:q(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,!0):(q(e,0,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e+1,n),i=L(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=L(r):(q(e,0,H),n===void 0?n=s.rounding:q(n,0,8),t=p(new s(r),e+r.e+1,n),i=L(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=c=new N(0),n=new N(t),s=n.e=$e(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(b(v)),l=N.precision,N.precision=s=v.length*m*2;a=k(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=c.plus(a.times(r)),c=r,r=n,n=u.minus(a.times(r)),u=r;return r=k(e.minus(i),t,0,1,1),c=c.plus(r.times(f)),i=i.plus(r.times(t)),c.s=f.s=g.s,d=k(f,t,s,1).minus(g).abs().cmp(k(c,i,s,1).minus(g).abs())<1?[f,t]:[c,i],N.precision=l,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return Pe(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:q(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=k(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return Pe(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,c=u.constructor,f=+(e=new c(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new c(C(+u,f));if(u=new c(u),u.eq(1))return u;if(t=c.precision,s=c.rounding,e.eq(1))return p(u,t,s);if(n=R(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=dn)return r=He(c,u,i,t),e.s<0?new c(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nc.maxE+1||n0?o/0:0):(w=!1,c.rounding=u.s=1,i=Math.min(12,(n+"").length),r=be(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(be(e.times(B(u,n+i)),n),n+5,1),+b(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,c.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(q(e,1,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e,n),i=L(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(q(e,1,H),n===void 0?n=t.rounding:q(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function b(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function te(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function pn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/le(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var k=function(){function e(t,r,s){var o,u=0,c=t.length;for(t=t.slice();c--;)o=t[c]*r+u,t[c]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,c;if(s!=o)c=s>o?1:-1;else for(u=c=0;ur[u]?1:-1;break}return c}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,c){var f,l,a,d,g,v,N,A,M,_,E,P,x,I,ae,z,W,de,T,y,ee=t.constructor,he=t.s==r.s?1:-1,O=t.d,S=r.d;if(!O||!O[0]||!S||!S[0])return new ee(!t.s||!r.s||(O?S&&O[0]==S[0]:!S)?NaN:O&&O[0]==0||!S?he*0:he/0);for(c?(g=1,l=t.e-r.e):(c=D,g=m,l=R(t.e/g)-R(r.e/g)),T=S.length,W=O.length,M=new ee(he),_=M.d=[],a=0;S[a]==(O[a]||0);a++);if(S[a]>(O[a]||0)&&l--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)_.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,S=S[0],I++;(a1&&(S=e(S,d,c),O=e(O,d,c),T=S.length,W=O.length),z=T,E=O.slice(0,T),P=E.length;P=c/2&&++de;do d=0,f=n(S,E,T,P),f<0?(x=E[0],T!=P&&(x=x*c+(E[1]||0)),d=x/de|0,d>1?(d>=c&&(d=c-1),N=e(S,d,c),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+l*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,l=a[d=0],c=l/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);l=c=0,r=1,s%=m,o=s-m+1}else break e;else{for(l=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,c=o<0?0:l/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?l:l%C(10,r-o-1)),f=i<4?(c||t)&&(i==0||i==(e.s<0?3:2)):c>5||c==5&&(i==4||t||i==6&&(s>0?o>0?l/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(l/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ce(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function ue(e,n,i){if(n>hn)throw w=!0,i&&(e.precision=i),Error(Ie);return p(new e(se),n,1,!0)}function F(e,n,i){if(n>Ce)throw Error(Ie);return p(new e(oe),n,i,!0)}function $e(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function He(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),De(s.d,o)&&(r=!0)),i=R(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),De(n.d,o)}return w=!0,s}function Te(e){return e.d[e.d.length-1]&1}function Ve(e,n,i){for(var t,r,s=new e(n[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,c=v):c=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,c+=t,i=s=o=new d(1),d.precision=c;;){if(s=p(s.times(e),c,1),i=i.times(++l),u=o.plus(k(s,i,c,1)),b(u.d).slice(0,c)===b(o.d).slice(0,c)){for(r=a;r--;)o=p(o.times(o),c,1);if(n==null)if(f<3&&Q(o.d,c-t,g,f))d.precision=c+=10,i=s=u=new d(1),l=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,c,f,l,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,_=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,l=E):l=n,M.precision=l+=v,i=b(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=b(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=ue(M,l+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),l-v).plus(f),M.precision=E,n==null?p(N,E,_,w=!0):N;for(a=N,c=o=N=k(N.minus(1),N.plus(1),l,1),d=p(N.times(N),l,1),r=3;;){if(o=p(o.times(d),l,1),f=c.plus(k(o,new M(r),l,1)),b(f.d).slice(0,l)===b(c.d).slice(0,l))if(c=c.times(2),s!==0&&(c=c.plus(ue(M,l+2,E).times(s+""))),c=k(c,new M(g),l,1),n==null)if(Q(c.d,l-v,_,u))M.precision=l+=v,f=o=N=k(a.minus(1),a.plus(1),l,1),d=p(N.times(N),l,1),r=u=1;else return p(c,M.precision=E,_,w=!0);else return M.precision=E,c;c=f,r+=2}}function je(e){return String(e.s*e.s/0)}function re(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Be.test(n))return re(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(ln.test(n))i=16,n=n.toLowerCase();else if(cn.test(n))i=2;else if(an.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(c=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=He(t,new t(i),s,s*2)),f=te(n,i,D),l=f.length-1,s=l;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ce(f,l),e.d=f,w=!1,o&&(e=k(e,r,u*4)),c&&(e=e.times(Math.abs(c)<54?C(2,c):Y.pow(2,c))),w=!0,e)}function mn(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/le(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,c,f=1,l=e.precision,a=Math.ceil(l/m);for(w=!1,c=i.times(i),u=new e(t);;){if(o=k(u.times(c),new e(n++*n++),l,1),u=r?t.plus(o):t.minus(o),t=k(o.times(c),new e(n++*n++),l,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function le(e,n){for(var i=e;--n;)i*=e;return i}function We(e,n){var i,t=n.s<0,r=F(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Te(i)?t?2:3:t?4:1,n;Z=Te(i)?t?1:4:t?3:2}return n.minus(r).abs()}function Pe(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor,v=i!==void 0;if(v?(q(i,1,H),t===void 0?t=g.rounding:q(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())l=je(e);else{for(l=L(e),o=l.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(l=l.replace(".",""),d=new g(1),d.e=l.length-o,d.d=te(L(d),10,r),d.e=d.d.length),a=te(l,10,r),s=c=a.length;a[--c]==0;)a.pop();if(!a[0])l=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=k(e,d,i,t,0,r),a=e.d,s=e.e,f=Le),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(c=a.length;!a[c-1];--c);for(o=0,l="";o1)if(n==16||n==8){for(o=n==16?4:3,--c;c%o;c++)l+="0";for(a=te(l,r,n),c=a.length;!a[c-1];--c);for(o=1,l="1.";oc)for(s-=c;s--;)l+="0";else sn)return e.length=n,!0}function wn(e){return new this(e).abs()}function Nn(e){return new this(e).acos()}function vn(e){return new this(e).acosh()}function En(e,n){return new this(e).plus(n)}function kn(e){return new this(e).asin()}function Sn(e){return new this(e).asinh()}function Mn(e){return new this(e).atan()}function Cn(e){return new this(e).atanh()}function bn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=F(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?F(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=F(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(k(e,n,s,1)),n=F(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(k(e,n,s,1)),i}function Pn(e){return new this(e).cbrt()}function On(e){return p(e=new this(e),e.e+1,2)}function Rn(e,n,i){return new this(e).clamp(n,i)}function An(e){if(!e||typeof e!="object")throw Error(fe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,H,"rounding",0,8,"toExpNeg",-V,0,"toExpPos",0,V,"maxE",0,V,"minE",-V,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Me[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(Ze);else this[i]=!1;else throw Error($+i+": "+t);return this}function qn(e){return new this(e).cos()}function _n(e){return new this(e).cosh()}function Ge(e){var n,i,t;function r(s){var o,u,c,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,Fe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(Ze);else for(;s=10;r/=10)t++;t + * MIT Licence + *) +*/ +//# sourceMappingURL=index-browser.js.map diff --git a/lib/generated/prisma/runtime/library.d.ts b/lib/generated/prisma/runtime/library.d.ts new file mode 100644 index 0000000..5e26c55 --- /dev/null +++ b/lib/generated/prisma/runtime/library.d.ts @@ -0,0 +1,3982 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: AccelerateUtils; +}; + +/** + * A stripped down interface of `fetch` that `@prisma/extension-accelerate` + * relies on. It must be in sync with the corresponding definition in the + * Accelerate extension. + * + * This is the actual interface exposed by the extension. We can't use the + * custom fetch function provided by it as normal fetch because the API is + * different. Notably, `headers` must be an object and not a `Headers` + * instance, and `url` must be a `string` and not a `URL`. + * + * The return type is `Response` but we can't specify this in an exported type + * because it would end up referencing external types from `@types/node` or DOM + * which can fail typechecking depending on TypeScript configuration in a user's + * project. + */ +declare type AccelerateExtensionFetch = (url: string, options: { + body?: string; + method?: string; + headers: Record; +}) => Promise; + +declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch; + +declare type AccelerateUtils = EngineConfig['accelerateUtils']; + +export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +declare type ActiveConnectorType = Exclude; + +/** + * An interface that exposes some basic information about the + * adapter like its name and provider type. + */ +declare interface AdapterInfo { + readonly provider: Provider; + readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); +} + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { + #private; +} + +export declare type ApplyOmit = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +declare type ArgScalarType = 'string' | 'int' | 'bigint' | 'float' | 'decimal' | 'boolean' | 'enum' | 'uuid' | 'json' | 'datetime' | 'bytes' | 'unknown'; + +declare type ArgType = { + scalarType: ArgScalarType; + dbType?: string; + arity: Arity; +}; + +declare type Arity = 'scalar' | 'list'; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResultData | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +/** + * Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array` in TypeScript 5.7 and beyond. + */ +export declare type Bytes = ReturnType; + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; + +export declare type ClientOtherOps = { + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $queryRawTyped(query: TypedSql): PrismaPromise; + $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $runCommandRaw(command: InputJsonObject): PrismaPromise; +}; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +declare type CompactedBatchResponse = { + type: 'compacted'; + plan: QueryPlanNode; + arguments: Record[]; + nestedSelection: string[]; + keys: string[]; + expectNonEmpty: boolean; +}; + +declare type CompilerWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryCompiler: QueryCompilerConstructor; + }>; + /** + * Loads the raw wasm module for the wasm compiler engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by ClientEngine + */ + getQueryCompilerWasmModule: () => Promise; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; + maxBindValues?: number; + supportsRelationJoins: boolean; +}; + +declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb'; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +export declare function createParam(name: string): Param; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + indexes: Index[]; +}>; + +declare type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; +}>; + +declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; + +declare type DataRule = { + type: 'rowCountEq'; + args: number; +} | { + type: 'rowCountNeq'; + args: number; +} | { + type: 'affectedRowCountEq'; + args: number; +} | { + type: 'never'; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { + #private; +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare function Decimal(n: Decimal.Value): Decimal; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$extends"]; + +declare type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; +}>; + +declare type DeserializedResponse = Array>; + +export declare function deserializeJsonResponse(result: unknown): unknown; + +export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +export declare namespace DMMF { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +declare namespace DMMF_2 { + export { + datamodelEnumToSchemaEnum, + Document_2 as Document, + Mappings, + OtherOperationMappings, + DatamodelEnum, + SchemaEnum, + EnumValue, + Datamodel, + uniqueIndex, + PrimaryKey, + Model, + FieldKind, + FieldNamespace, + FieldLocation, + Field, + FieldDefault, + FieldDefaultScalar, + Index, + IndexType, + IndexField, + SortOrder, + Schema, + Query, + QueryOutput, + TypeRef, + InputTypeRef, + SchemaArg, + OutputType, + SchemaField, + OutputTypeRef, + Deprecation, + InputType, + FieldRefType, + FieldRefAllowType, + ModelMapping, + ModelAction + } +} + +export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; + +declare type Document_2 = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; +}>; + +/** + * A generic driver adapter factory that allows the user to instantiate a + * driver adapter. The query and result types are specific to the adapter. + */ +declare interface DriverAdapterFactory extends AdapterInfo { + /** + * Instantiate a driver adapter. + */ + connect(): Promise>; +} + +declare type DynamicArgType = ArgType | { + arity: 'tuple'; + elements: ArgType[]; +}; + +/** Client */ +export declare type DynamicClientExtensionArgs> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; +} & { + [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; +}; + +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult> : (args: Exact) => DynamicModelExtensionFnResult>; + +export declare type DynamicModelExtensionThis> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; + applyPendingMigrations(): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + /** + * @remarks this field is used internally by Policy, do not rename or remove + */ + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: SqlDriverAdapterFactory; + /** + * The contents of the schema encoded into a string + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + * @remarks this field is used internally by Policy, do not rename or remove + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineSpan = { + id: EngineSpanId; + parentId: string | null; + name: string; + startTime: HrTime; + endTime: HrTime; + kind: EngineSpanKind; + attributes?: Record; + links?: EngineSpanId[]; +}; + +declare type EngineSpanId = string; + +declare type EngineSpanKind = 'client' | 'internal'; + +declare type EngineWasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => Promise<{ + __wbg_set_wasm(exports: unknown): void; + QueryEngine: QueryEngineConstructor; + }>; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine + */ + getQueryEngineWasmModule: () => Promise; +}; + +declare type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; +}>; + +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; + +declare type Error_2 = MappedError & { + originalCode?: string; + originalMessage?: string; +}; + +declare type ErrorCapturingFunction = T extends (...args: infer A) => Promise ? (...args: A) => Promise>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4> : T; + +declare type ErrorCapturingInterface = { + [K in keyof T]: ErrorCapturingFunction; +}; + +declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +declare type ExtendedSpanOptions = SpanOptions & { + /** The name of the span */ + name: string; + internal?: boolean; + /** Whether it propagates context (?=true) */ + active?: boolean; + /** The context to append the span to */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResultExtensionKeys, + GetPayloadResultExtensionObject, + GetPayloadResult, + GetSelect, + GetOmit, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + ClientOptionDef, + ClientOtherOps, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + +declare type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + /** + * Native database type, if specified. + * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, + * `@db.Text` is encoded as `['Text', []]`. + */ + nativeType?: [string, string[]] | null; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationOnUpdate?: string; + relationName?: string; + documentation?: string; +}>; + +declare type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: Array; +}>; + +declare type FieldDefaultScalar = string | boolean | number; + +declare type FieldInitializer = { + type: 'value'; + value: PrismaValue; +} | { + type: 'lastInsertId'; +}; + +declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + +declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + +declare type FieldNamespace = 'model' | 'prisma'; + +declare type FieldOperation = { + type: 'set'; + value: PrismaValue; +} | { + type: 'add'; + value: PrismaValue; +} | { + type: 'subtract'; + value: PrismaValue; +} | { + type: 'multiply'; + value: PrismaValue; +} | { + type: 'divide'; + value: PrismaValue; +}; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + +declare type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; +}>; + +declare type FieldScalarType = { + type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported'; +} | { + type: 'enum'; + name: string; +} | { + type: 'bytes'; + encoding: 'array' | 'base64' | 'hex'; +}; + +declare type FieldType = { + arity: Arity; +} & FieldScalarType; + +declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare type Fragment = { + type: 'stringChunk'; + chunk: string; +} | { + type: 'parameter'; +} | { + type: 'parameterTuple'; +} | { + type: 'parameterTupleList'; + itemPrefix: string; + itemSeparator: string; + itemSuffix: string; + groupSeparator: string; +}; + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: { + /** `output` is a reserved name and will only be available directly at `generator.output` */ + output?: never; + /** `provider` is a reserved name and will only be available directly at `generator.provider` */ + provider?: never; + /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ + binaryTargets?: never; + /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ + previewFeatures?: never; + } & { + [key: string]: string | string[] | undefined; + }; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; + envPaths?: EnvPaths; + sourceFilePath: string; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection : unknown) : DefaultSelection; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; +}; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; + +export declare type GetPayloadResultExtensionKeys = KR; + +export declare type GetPayloadResultExtensionObject = { + [K in GetPayloadResultExtensionKeys]: R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _previewFeatures: string[]; + _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; + _extensions: MergedExtensionsList; + /** + * @remarks This is used internally by Policy, do not rename or remove + */ + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + $on(eventType: E, callback: EventCallback): any; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Counterpart to $queryRaw, that returns strongly typed results + * @param typedSql + */ + $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +export declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths?: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: ActiveConnectorType; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: EngineWasmLoadingConfig; + compilerWasm?: CompilerWasmLoadingConfig; +}; + +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; + updateMany: GetBatchResult; + updateManyAndReturn: GetFindResult[]; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $queryRawTyped: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[OperationName]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: RuntimeName; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type GlobalOmitOptions = { + [modelName: string]: { + [fieldName: string]: boolean; + }; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; + globalOmit?: GlobalOmitOptions; +}; + +declare type HrTime = [number, number]; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime_2 = [number, number]; + +declare type Index = ReadonlyDeep_2<{ + model: string; + type: IndexType; + isDefinedOnField: boolean; + name?: string; + dbName?: string; + algorithm?: string; + clustered?: boolean; + fields: IndexField[]; +}>; + +declare type IndexField = ReadonlyDeep_2<{ + name: string; + sortOrder?: SortOrder; + length?: number; + operatorClass?: string; +}>; + +declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; + +declare type InMemoryOps = { + pagination: Pagination | null; + distinct: string[] | null; + reverse: boolean; + linkingFields: string[] | null; + nested: Record; +}; + +/** + * Matches a JSON array. + * Unlike \`JsonArray\`, readonly arrays are assignable to this type. + */ +export declare interface InputJsonArray extends ReadonlyArray { +} + +/** + * Matches a JSON object. + * Unlike \`JsonObject\`, this type allows undefined and read-only properties. + */ +export declare type InputJsonObject = { + readonly [Key in string]?: InputJsonValue | null; +}; + +/** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike \`JsonValue\`, this + * type allows read-only arrays and read-only object properties and disallows + * \`null\` at the top level. + * + * \`null\` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or + * \`Prisma.DbNull\` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { + toJSON(): unknown; +}; + +declare type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + grouping?: string; + }; + fields: SchemaArg[]; +}>; + +declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +} & Omit; + +declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; + +declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable'; + +declare function isSkip(value: unknown): value is Skip; + +export declare function isTypedSql(value: unknown): value is UnknownTypedSql; + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +declare type JoinExpression = { + child: QueryPlanNode; + on: [left: string, right: string][]; + parentField: string; + isRelationUnique: boolean; +}; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + omit?: Omission; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ +export declare interface JsonArray extends Array { +} + +export declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: IsolationLevel_2; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { + #private; +} + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +export declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; + +declare type MappedError = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'InvalidIsolationLevel'; + level: string; +} | { + kind: 'LengthMismatch'; + column?: string; +} | { + kind: 'UniqueConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'NullConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'ForeignKeyConstraintViolation'; + constraint?: { + fields: string[]; + } | { + index: string; + } | { + foreignKey: {}; + }; +} | { + kind: 'DatabaseNotReachable'; + host?: string; + port?: number; +} | { + kind: 'DatabaseDoesNotExist'; + db?: string; +} | { + kind: 'DatabaseAlreadyExists'; + db?: string; +} | { + kind: 'DatabaseAccessDenied'; + db?: string; +} | { + kind: 'ConnectionClosed'; +} | { + kind: 'TlsConnectionError'; + reason: string; +} | { + kind: 'AuthenticationFailed'; + user?: string; +} | { + kind: 'TransactionWriteConflict'; +} | { + kind: 'TableDoesNotExist'; + table?: string; +} | { + kind: 'ColumnNotFound'; + column?: string; +} | { + kind: 'TooManyConnections'; + cause: string; +} | { + kind: 'ValueOutOfRange'; + cause: string; +} | { + kind: 'MissingFullTextSearchIndex'; +} | { + kind: 'SocketTimeout'; +} | { + kind: 'InconsistentColumnData'; + cause: string; +} | { + kind: 'TransactionAlreadyClosed'; + cause: string; +} | { + kind: 'postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +} | { + kind: 'mssql'; + code: number; + message: string; +}; + +declare type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; +}>; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _client; + constructor(client: Client); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + schema: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; +}>; + +declare enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + createManyAndReturn = "createManyAndReturn", + update = "update", + updateMany = "updateMany", + updateManyAndReturn = "updateManyAndReturn", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist in DMMF + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +declare type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + createManyAndReturn?: string | null; + update?: string | null; + updateMany?: string | null; + updateManyAndReturn?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; +}>; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +declare type MultiBatchResponse = { + type: 'multi'; + plans: QueryPlanNode[]; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-better-sqlite3", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-mssql", "@prisma/adapter-mariadb"]; + +export declare type Omission = Record; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + name: string; + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + /** Timeout for starting the transaction */ + maxWait?: number; + /** Timeout for the transaction body */ + timeout?: number; + /** Transaction isolation level */ + isolationLevel?: IsolationLevel_2; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +declare type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; +}>; + +declare type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; +}>; + +declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + +declare type Pagination = { + cursor: Record | null; + take: number | null; + skip: number | null; +}; + +export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; + +export declare type Param = { + readonly name: $Value; +}; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +declare interface PlaceholderFormat { + prefix: string; + hasNumbering: boolean; +} + +declare type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; +}>; + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: SqlDriverAdapterFactory | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + omit?: GlobalOmitOptions; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +declare type PrismaOperationSpec = { + args: TArgs; + action: TAction; + model: string; +}; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 = any> extends Promise { + get spec(): TSpec; + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: TResult) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel_2; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = >(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator; + +declare type PrismaValueGenerator = { + prisma__type: 'generatorCall'; + prisma__value: { + name: string; + args: PrismaValue[]; + }; +}; + +declare type PrismaValuePlaceholder = { + prisma__type: 'param'; + prisma__value: { + name: string; + type: string; + }; +}; + +export declare const PrivateResultType: unique symbol; + +declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; +}>; + +declare interface Queryable extends AdapterInfo { + /** + * Execute a query and return its result. + */ + queryRaw(params: Query): Promise; + /** + * Execute a query and return the number of affected rows. + */ + executeRaw(params: Query): Promise; +} + +declare type QueryCompiler = { + compile(request: string): {}; + compileBatch(batchRequest: string): BatchResponse; + free(): void; +}; + +declare interface QueryCompilerConstructor { + new (options: QueryCompilerOptions): QueryCompiler; +} + +declare type QueryCompilerOptions = { + datamodel: string; + provider: Provider; + connectionInfo: ConnectionInfo; +}; + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: IsolationLevel_2; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + engineProtocol: QueryEngineProtocol; + enableTracing: boolean; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string, requestId: string): Promise; + disconnect(headers: string, requestId: string): Promise; + /** + * Frees any resources allocated by the engine's WASM instance. This method is automatically created by WASM bindgen. + * Noop for other engines. + */ + free?(): void; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; + sdlSchema?(): Promise; + startTransaction(options: string, traceHeaders: string, requestId: string): Promise; + commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; + rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; + metrics?(options: string): Promise; + applyPendingMigrations?(): Promise; + trace(requestId: string): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineProtocol = 'graphql' | 'json'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResultData = { + data: T; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +declare type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; +}>; + +declare type QueryPlanBinding = { + name: string; + expr: QueryPlanNode; +}; + +declare type QueryPlanDbQuery = { + type: 'rawSql'; + sql: string; + args: PrismaValue[]; + argTypes: ArgType[]; +} | { + type: 'templateSql'; + fragments: Fragment[]; + placeholderFormat: PlaceholderFormat; + args: PrismaValue[]; + argTypes: DynamicArgType[]; + chunkable: boolean; +}; + +declare type QueryPlanNode = { + type: 'value'; + args: PrismaValue; +} | { + type: 'seq'; + args: QueryPlanNode[]; +} | { + type: 'get'; + args: { + name: string; + }; +} | { + type: 'let'; + args: { + bindings: QueryPlanBinding[]; + expr: QueryPlanNode; + }; +} | { + type: 'getFirstNonEmpty'; + args: { + names: string[]; + }; +} | { + type: 'query'; + args: QueryPlanDbQuery; +} | { + type: 'execute'; + args: QueryPlanDbQuery; +} | { + type: 'reverse'; + args: QueryPlanNode; +} | { + type: 'sum'; + args: QueryPlanNode[]; +} | { + type: 'concat'; + args: QueryPlanNode[]; +} | { + type: 'unique'; + args: QueryPlanNode; +} | { + type: 'required'; + args: QueryPlanNode; +} | { + type: 'join'; + args: { + parent: QueryPlanNode; + children: JoinExpression[]; + }; +} | { + type: 'mapField'; + args: { + field: string; + records: QueryPlanNode; + }; +} | { + type: 'transaction'; + args: QueryPlanNode; +} | { + type: 'dataMap'; + args: { + expr: QueryPlanNode; + structure: ResultNode; + enums: Record>; + }; +} | { + type: 'validate'; + args: { + expr: QueryPlanNode; + rules: DataRule[]; + } & ValidationError; +} | { + type: 'if'; + args: { + value: QueryPlanNode; + rule: DataRule; + then: QueryPlanNode; + else: QueryPlanNode; + }; +} | { + type: 'unit'; +} | { + type: 'diff'; + args: { + from: QueryPlanNode; + to: QueryPlanNode; + fields: string[]; + }; +} | { + type: 'initializeRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'mapRecord'; + args: { + expr: QueryPlanNode; + fields: Record; + }; +} | { + type: 'process'; + args: { + expr: QueryPlanNode; + operations: InMemoryOps; + }; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; + +declare type RawResponse = { + columns: string[]; + types: QueryIntrospectionBuiltinType[]; + rows: unknown[][]; +}; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; + customDataProxyFetch?: AccelerateExtensionFetchDecorator; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; + name: ''; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + ApplyOmit, + OmitValue, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult, + ExtractGlobalOmit + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare type ResultNode = { + type: 'affectedRows'; +} | { + type: 'object'; + fields: Record; + serializedName: string | null; + skipNulls: boolean; +} | { + type: 'field'; + dbName: string; + fieldType: FieldType; +}; + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +export declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; + +declare type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma?: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; +}>; + +declare type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + requiresOtherFields?: string[]; + deprecation?: Deprecation; +}>; + +declare type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; +}>; + +declare type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; +}>; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; + +declare type SerializeParams = { + runtimeDataModel: RuntimeDataModel; + modelName?: string; + action: Action; + args?: JsArgs; + extensions?: MergedExtensionsList; + callsite?: CallSite; + clientMethod: string; + clientVersion: string; + errorFormat: ErrorFormat; + previewFeatures: string[]; + globalOmit?: GlobalOmitOptions; +}; + +declare class Skip { + constructor(param?: symbol); + ifUndefined(value: T | undefined): T | Skip; +} + +export declare const skip: Skip; + +declare type SortOrder = 'asc' | 'desc'; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get sql(): string; + get statement(): string; + get text(): string; + inspect(): { + sql: string; + statement: string; + text: string; + values: unknown[]; + }; +} + +declare interface SqlDriverAdapter extends SqlQueryable { + /** + * Execute multiple SQL statements separated by semicolon. + */ + executeScript(script: string): Promise; + /** + * Start new transaction. + */ + startTransaction(isolationLevel?: IsolationLevel): Promise; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): ConnectionInfo; + /** + * Dispose of the connection and release any resources. + */ + dispose(): Promise; +} + +export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory { + connect(): Promise; +} + +declare type SqlQuery = { + sql: string; + args: Array; + argTypes: Array; +}; + +declare interface SqlQueryable extends Queryable { +} + +declare interface SqlResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime_2 | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + dispatchEngineSpans(spans: EngineSpan[]): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends AdapterInfo, SqlQueryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise; + /** + * Roll back the transaction. + */ + rollback(): Promise; +} + +declare namespace Transaction_2 { + export { + Options, + IsolationLevel_2 as IsolationLevel, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare class TypedSql { + [PrivateResultType]: Result; + constructor(sql: string, values: Values); + get sql(): string; + get values(): Values; +} + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; +}; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + isSkip, + Skip, + skip, + UnknownTypedSql, + OperationPayload as Payload + } +} +export { Types } + +declare type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; +}>; + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +export declare type UnknownTypedSql = TypedSql; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare type ValidationError = { + error_identifier: 'RELATION_VIOLATION'; + context: { + relation: string; + modelA: string; + modelB: string; + }; +} | { + error_identifier: 'MISSING_RELATED_RECORD'; + context: { + model: string; + relation: string; + relationType: string; + operation: string; + neededFor?: string; + }; +} | { + error_identifier: 'MISSING_RECORD'; + context: { + operation: string; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_INPUT'; + context: { + expectedRows: number; + }; +} | { + error_identifier: 'INCOMPLETE_CONNECT_OUTPUT'; + context: { + expectedRows: number; + relation: string; + relationType: string; + }; +} | { + error_identifier: 'RECORDS_NOT_CONNECTED'; + context: { + relation: string; + parent: string; + child: string; + }; +}; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +export { } diff --git a/lib/generated/prisma/runtime/react-native.js b/lib/generated/prisma/runtime/react-native.js new file mode 100644 index 0000000..fb252ec --- /dev/null +++ b/lib/generated/prisma/runtime/react-native.js @@ -0,0 +1,84 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ha=Object.create;var rr=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var ba=Object.getPrototypeOf,xa=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},ni=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wa(t))!xa.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=ya(t,i))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?ha(ba(e)):{},ni(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),Ea=e=>ni(rr({},"__esModule",{value:!0}),e);var y,E,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:E}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var x,d=he(()=>{"use strict";x=()=>{};x.prototype=x});var b,f=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var Pi=Ve(nt=>{"use strict";m();c();p();d();f();var li=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pa=li(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=O;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=S);var _=F===S?0:4-F%4;return[F,_]}function l(C){var S=a(C),F=S[0],_=S[1];return(F+_)*3/4-_}function u(C,S,F){return(S+F)*3/4-F}function g(C){var S,F=a(C),_=F[0],L=F[1],k=new n(u(C,_,L)),q=0,Y=L>0?_-4:_,U;for(U=0;U>16&255,k[q++]=S>>8&255,k[q++]=S&255;return L===2&&(S=r[C.charCodeAt(U)]<<2|r[C.charCodeAt(U+1)]>>4,k[q++]=S&255),L===1&&(S=r[C.charCodeAt(U)]<<10|r[C.charCodeAt(U+1)]<<4|r[C.charCodeAt(U+2)]>>2,k[q++]=S>>8&255,k[q++]=S&255),k}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,F){for(var _,L=[],k=S;kY?Y:q+k));return _===1?(S=C[F-1],L.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[F-2]<<8)+C[F-1],L.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),L.join("")}}),va=li(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,O=n?-1:1,C=t[r+T];for(T+=O,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=O,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=O,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,O=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+T>=1?r+=O/u:r+=O*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=F*128}}),Xr=Pa(),tt=va(),ii=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=A;nt.SlowBuffer=Oa;nt.INSPECT_MAX_BYTES=50;var nr=2147483647;nt.kMaxLength=nr;A.TYPED_ARRAY_SUPPORT=Ta();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ta(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function Ce(e){if(e>nr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return rn(e)}return ui(e,t,r)}A.poolSize=8192;function ui(e,t,r){if(typeof e=="string")return Ca(e,t);if(ArrayBuffer.isView(e))return Sa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return pi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Ra(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return ui(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function ci(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Aa(e,t,r){return ci(e),e<=0?Ce(e):t!==void 0?typeof r=="string"?Ce(e).fill(t,r):Ce(e).fill(t):Ce(e)}A.alloc=function(e,t,r){return Aa(e,t,r)};function rn(e){return ci(e),Ce(e<0?0:nn(e)|0)}A.allocUnsafe=function(e){return rn(e)};A.allocUnsafeSlow=function(e){return rn(e)};function Ca(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=di(e,t)|0,n=Ce(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function en(e){let t=e.length<0?0:nn(e.length)|0,r=Ce(t);for(let n=0;n=nr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+nr.toString(16)+" bytes");return e|0}function Oa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function di(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return tn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Ei(e).length;default:if(i)return n?-1:tn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=di;function ka(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return ja(this,t,r);case"utf8":case"utf-8":return mi(this,t,r);case"ascii":return qa(this,t,r);case"latin1":case"binary":return Ba(this,t,r);case"base64":return La(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};ii&&(A.prototype[ii]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,sn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:oi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):oi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function oi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ia(this,e,t,r);case"utf8":case"utf-8":return Fa(this,e,t,r);case"ascii":case"latin1":case"binary":return Ma(this,e,t,r);case"base64":return _a(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function La(e,t,r){return t===0&&r===e.length?Xr.fromByteArray(e):Xr.fromByteArray(e.slice(t,r))}function mi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Na(n)}var si=4096;function Na(e){let t=e.length;if(t<=si)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=_e(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=_e(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Ct(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function gi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function hi(e,t,r,n,i){xi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=_e(function(e,t=0){return gi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=_e(function(e,t=0){return hi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=_e(function(e,t=0){return gi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=_e(function(e,t=0){return hi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function wi(e,t,r,n,i){return t=+t,r=r>>>0,i||yi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return wi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return wi(this,e,t,!1,r)};function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||yi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return bi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ai(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ai(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ai(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ua(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Ct(t,e.length-(r+1))}function xi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new et.ERR_OUT_OF_RANGE("value",a,e)}Ua(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function Ct(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Va=/[^+/0-9A-Za-z-_]/g;function Qa(e){if(e=e.split("=")[0],e=e.trim().replace(Va,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ja(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Ei(e){return Xr.toByteArray(Qa(e))}function ir(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function sn(e){return e!==e}var Wa=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function _e(e){return typeof BigInt>"u"?Ka:e}function Ka(){throw new Error("BigInt not supported")}});var w,m=he(()=>{"use strict";w=Qe(Pi())});function hl(){return!1}function pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function yl(){return pn()}function wl(){return[]}function bl(e){e(null,[])}function xl(){return""}function El(){return""}function Pl(){}function vl(){}function Tl(){}function Al(){}function Cl(){}function Sl(){}function Rl(){}function Ol(){}function kl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Il(e,t){t(null,pn())}var Fl,Ml,sr,dn=he(()=>{"use strict";m();c();p();d();f();Fl={},Ml={existsSync:hl,lstatSync:pn,stat:Il,statSync:yl,readdirSync:wl,readdir:bl,readlinkSync:xl,realpathSync:El,chmodSync:Pl,renameSync:vl,mkdirSync:Tl,rmdirSync:Al,rmSync:Cl,unlinkSync:Sl,watchFile:Rl,unwatchFile:Ol,watch:kl,promises:Fl},sr=Ml});var Di=Ve((If,_l)=>{_l.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Ll(...e){return e.join("/")}function Nl(...e){return e.join("/")}function ql(e){let t=Li(e),r=Ni(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Li(e){let t=e.split("/");return t[t.length-1]}function Ni(e){return e.split("/").slice(0,-1).join("/")}function jl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var qi,Bl,$l,Ul,Re,gn=he(()=>{"use strict";m();c();p();d();f();qi="/",Bl=":";$l={sep:qi},Ul={basename:Li,delimiter:Bl,dirname:Ni,join:Nl,normalize:jl,parse:ql,posix:$l,resolve:Ll,sep:qi},Re=Ul});var $i=Ve((Dm,ji)=>{"use strict";m();c();p();d();f();ji.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Gi=Ve((Xm,Ji)=>{"use strict";m();c();p();d();f();Ji.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ki=Ve((Vg,cr)=>{"use strict";m();c();p();d();f();cr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};cr.exports.default=cr.exports});var In=Ve((o0,wo)=>{"use strict";m();c();p();d();f();wo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";m();c();p();d();f()});var To=he(()=>{"use strict";m();c();p();d();f()});var Ko=Ve((Ov,$c)=>{$c.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var jr,zo=he(()=>{"use strict";m();c();p();d();f();jr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var ad={};Xe(ad,{DMMF:()=>Bt,Debug:()=>z,Decimal:()=>Fe,Extensions:()=>an,MetricsClient:()=>bt,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>te,Public:()=>ln,Sql:()=>le,createParam:()=>jo,defineDmmfProperty:()=>Go,deserializeJsonResponse:()=>Pt,deserializeRawResult:()=>Hr,dmmfToRuntimeDataModel:()=>Zi,empty:()=>Yo,getPrismaClient:()=>fa,getRuntime:()=>Ds,join:()=>Ho,makeStrictEnum:()=>ma,makeTypedQueryFactory:()=>Wo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Nr,skip:()=>Lr,sqltag:()=>$n,warnEnvConflicts:()=>void 0,warnOnce:()=>Lt});module.exports=Ea(ad);m();c();p();d();f();var an={};Xe(an,{defineExtension:()=>vi,getExtensionContext:()=>Ti});m();c();p();d();f();m();c();p();d();f();function vi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function Ti(e){return e}var ln={};Xe(ln,{validator:()=>Ai});m();c();p();d();f();m();c();p();d();f();function Ai(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var or={};Xe(or,{$:()=>ki,bgBlack:()=>il,bgBlue:()=>ll,bgCyan:()=>cl,bgGreen:()=>sl,bgMagenta:()=>ul,bgRed:()=>ol,bgWhite:()=>pl,bgYellow:()=>al,black:()=>el,blue:()=>We,bold:()=>de,cyan:()=>Se,dim:()=>St,gray:()=>It,green:()=>Ot,grey:()=>nl,hidden:()=>Za,inverse:()=>Ya,italic:()=>Ha,magenta:()=>tl,red:()=>Ge,reset:()=>za,strikethrough:()=>Xa,underline:()=>Rt,white:()=>rl,yellow:()=>kt});m();c();p();d();f();var un,Ci,Si,Ri,Oi=!0;typeof y<"u"&&({FORCE_COLOR:un,NODE_DISABLE_COLORS:Ci,NO_COLOR:Si,TERM:Ri}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var ki={enabled:!Ci&&Si==null&&Ri!=="dumb"&&(un!=null&&un!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ki.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var za=V(0,0),de=V(1,22),St=V(2,22),Ha=V(3,23),Rt=V(4,24),Ya=V(7,27),Za=V(8,28),Xa=V(9,29),el=V(30,39),Ge=V(31,39),Ot=V(32,39),kt=V(33,39),We=V(34,39),tl=V(35,39),Se=V(36,39),rl=V(37,39),It=V(90,39),nl=V(90,39),il=V(40,49),ol=V(41,49),sl=V(42,49),al=V(43,49),ll=V(44,49),ul=V(45,49),cl=V(46,49),pl=V(47,49);m();c();p();d();f();var dl=100,Ii=["green","yellow","blue","magenta","cyan","red"],Ft=[],Fi=Date.now(),fl=0,cn=typeof y<"u"?y.env:{};globalThis.DEBUG??=cn.DEBUG??"";globalThis.DEBUG_COLORS??=cn.DEBUG_COLORS?cn.DEBUG_COLORS==="true":!0;var Mt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ml(e){let t={color:Ii[fl++%Ii.length],enabled:Mt.enabled(e),namespace:e,log:Mt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Ft.push([o,...n]),Ft.length>dl&&Ft.shift(),Mt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:gl(g)),u=`+${Date.now()-Fi}ms`;Fi=Date.now(),globalThis.DEBUG_COLORS?a(or[s](de(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ml,{get:(e,t)=>Mt[t],set:(e,t,r)=>Mt[t]=r});function gl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Mi(e=7500){let t=Ft.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Oe(t,e.queryRaw.bind(e)),executeRaw:Oe(t,e.executeRaw.bind(e)),executeScript:Oe(t,e.executeScript.bind(e)),dispose:Oe(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Oe(t,e.startTransaction.bind(e))(...n)).map(o=>Jl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=Gl(t,e.getConnectionInfo.bind(e))),r},Jl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Oe(e,t.queryRaw.bind(t)),executeRaw:Oe(e,t.executeRaw.bind(t)),commit:Oe(e,t.commit.bind(t)),rollback:Oe(e,t.rollback.bind(t))});function Oe(e,t){return async(...r)=>{try{return ar(await t(...r))}catch(n){if(Bi("[error@wrapAsync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function Gl(e,t){return(...r)=>{try{return ar(t(...r))}catch(n){if(Bi("[error@wrapSync]",n),hn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}m();c();p();d();f();var Ui=Qe($i(),1);function wn(e){let t=(0,Ui.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}m();c();p();d();f();var Vi="prisma+postgres",Qi=`${Vi}:`;function bn(e){return e?.toString().startsWith(`${Qi}//`)??!1}var Dt={};Xe(Dt,{error:()=>zl,info:()=>Kl,log:()=>Wl,query:()=>Hl,should:()=>Wi,tags:()=>_t,warn:()=>xn});m();c();p();d();f();var _t={error:Ge("prisma:error"),warn:kt("prisma:warn"),info:Se("prisma:info"),query:We("prisma:query")},Wi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Wl(...e){console.log(...e)}function xn(e,...t){Wi.warn()&&console.warn(`${_t.warn} ${e}`,...t)}function Kl(e,...t){console.info(`${_t.info} ${e}`,...t)}function zl(e,...t){console.error(`${_t.error} ${e}`,...t)}function Hl(e,...t){console.log(`${_t.query} ${e}`,...t)}m();c();p();d();f();function ur(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function ze(e,t){throw new Error(t)}m();c();p();d();f();m();c();p();d();f();function En({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Yl=En();function ot(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Yl,"")}m();c();p();d();f();gn();function Pn(e){return Re.sep===Re.posix.sep?e:e.split(Re.sep).join(Re.posix.sep)}m();c();p();d();f();function vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();function pr(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function Tn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{zi.has(e)||(zi.add(e),xn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");m();c();p();d();f();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};ue(se,"PrismaClientKnownRequestError");m();c();p();d();f();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");m();c();p();d();f();var G=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};ue(G,"PrismaClientUnknownRequestError");m();c();p();d();f();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var we=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function De(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();d();f();function Yi(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}m();c();p();d();f();function Nt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Zi(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}m();c();p();d();f();function st(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function dr(e){return e.toString()!=="Invalid Date"}m();c();p();d();f();m();c();p();d();f();var at=9e15,Be=1e9,Cn="0123456789abcdef",gr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",hr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},ro,ke,D=!0,wr="[DecimalError] ",qe=wr+"Invalid argument: ",no=wr+"Precision limit exceeded",io=wr+"crypto unavailable",oo="[object Decimal]",re=Math.floor,W=Math.pow,Zl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,eu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,so=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,M=7,tu=9007199254740991,ru=gr.length-1,Rn=hr.length-1,R={toStringTag:oo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)};R.ceil=function(){return I(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(qe+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=nu(n,po(n,r)),n.precision=e,n.rounding=t,I(ke==2||ke==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(D=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=$(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return D=!0,I(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return $(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return I($(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return I(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/xr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return I(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=lt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/xr(5,e)),i=lt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,I(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?be(t,n,i):new t(0):new t(NaN):e.isZero()?be(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=be(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=be(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=be(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(D=!1,t=Math.ceil(a/M),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding,O=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(D=!1,a=h+O,s=Ne(u,a),n=t?yr(g,a+10):Ne(e,a),l=$(s,n,a,1),qt(l.d,i=h,T))do if(a+=10,s=Ne(u,a),n=t?yr(g,a+10):Ne(e,a),l=$(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,h+1,0));break}while(qt(l.d,i+=10,T));return D=!0,I(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,O=this,C=O.constructor;if(e=new C(e),!O.d||!e.d)return!O.s||!e.s?e=new C(NaN):O.d?e.s=-e.s:e=new C(e.d||O.s!==e.s?O:NaN),e;if(O.s!=e.s)return e.s=-e.s,O.plus(e);if(u=O.d,T=e.d,a=C.precision,l=C.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new C(O);else return new C(l===3?-0:0);return D?I(e,a,l):e}if(r=re(e.e/M),g=re(O.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=T.length,h=n0;--n)u[s++]=0;for(n=T.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=br(u,n),D?I(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(qe+e);return r.d?(t=ao(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=ou(n,po(n,r)),n.precision=e,n.rounding=t,I(ke>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(D=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(I(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(I(n,l+1,1),e=!n.times(n).eq(s));break}return D=!0,I(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(ke==2||ke==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,T=g.d,O=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!O||!O[0])return new h(!e.s||T&&!T[0]&&!O||O&&!O[0]&&!T?NaN:!T||!O?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=O.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+O[n]*T[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=br(o,r),D?I(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return kn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),I(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e+1,t),r=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=xe(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=I(new o(i),e+i.e+1,t),r=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,O=this,C=O.d,S=O.constructor;if(!C)return new S(O);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=ao(C)-O.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error(qe+a);e=a.gt(t)?o>0?t:u:a}for(D=!1,a=new S(Z(C)),g=S.precision,S.precision=o=C.length*M*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=O.s,T=$(u,n,o,1).minus(O).abs().cmp($(l,r,o,1).minus(O).abs())<1?[u,n]:[l,r],S.precision=g,D=!0,T};R.toHexadecimal=R.toHex=function(e,t){return kn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(D=!1,r=$(r,e,0,t,1).times(e),D=!0,I(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return kn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return I(a,n,o);if(t=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=tu)return i=lo(l,a,r,n),e.s<0?new l(1).div(i):I(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(D=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=On(e.times(Ne(a,n+r)),n),i.d&&(i=I(i,n+5,1),qt(i.d,n,o)&&(t=n+10,i=I(On(e.times(Ne(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=s,D=!0,l.rounding=o,I(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=I(new i(n),e,t),r=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),I(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return I(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(qe+e)}function qt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function fr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function nu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/xr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,O,C,S,F,_,L,k,q,Y,U,At,J,ie,Ae,X,Ze,tr=n.constructor,Zr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new tr(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Zr*0:Zr/0);for(l?(O=1,g=n.e-i.e):(l=fe,O=M,g=re(n.e/O)-re(i.e/O)),X=B.length,ie=ee.length,_=new tr(Zr),L=_.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?(U=o=tr.precision,s=tr.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)L.push(1),C=!0;else{if(U=U/O+2|0,h=0,X==1){for(T=0,B=B[0],U++;(h1&&(B=e(B,T,l),ee=e(ee,T,l),X=B.length,ie=ee.length),J=X,k=ee.slice(0,X),q=k.length;q=l/2&&++Ae;do T=0,u=t(B,k,X,q),u<0?(Y=k[0],X!=q&&(Y=Y*l+(k[1]||0)),T=Y/Ae|0,T>1?(T>=l&&(T=l-1),S=e(B,T,l),F=S.length,q=k.length,u=t(S,k,F,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*O-1,I(_,a?o+_.e+1:o,s,C)}return _}}();function I(e,t,r,n){var i,o,s,a,l,u,g,h,T,O=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=fe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return D&&(e.e>O.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Le(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Le(-i-1)+o,r&&(n=r-s)>0&&(o+=Le(n))):i>=s?(o+=Le(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Le(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Le(n))),o}function br(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>ru)throw D=!0,r&&(e.precision=r),Error(no);return I(new e(gr),t,1,!0)}function be(e,t,r){if(t>Rn)throw Error(no);return I(new e(hr),t,r,!0)}function ao(e){var t=e.length-1,r=t*M+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Le(e){for(var t="";e--;)t+="0";return t}function lo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(D=!1;;){if(r%2&&(o=o.times(t),eo(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),eo(t.d,s)}return D=!0,o}function Xi(e){return e.d[e.d.length-1]&1}function uo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(D=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=I(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=I(s.times(s),l,1);if(t==null)if(u<3&&qt(s.d,l-n,O,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return I(s,T.precision=C,O,D=!0);else return T.precision=C,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,g,h,T,O=1,C=10,S=e,F=S.d,_=S.constructor,L=_.rounding,k=_.precision;if(S.s<0||!F||!F[0]||!S.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:S.s!=1?NaN:F?0:S);if(t==null?(D=!1,g=k):g=t,_.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),O++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=yr(_,g+2,k).times(o+""),S=Ne(new _(n+"."+r.slice(1)),g-C).plus(u),_.precision=k,t==null?I(S,k,L,D=!0):S;for(h=S,l=s=S=$(S.minus(1),S.plus(1),g,1),T=I(S.times(S),g,1),i=3;;){if(s=I(s.times(T),g,1),u=l.plus($(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(yr(_,g+2,k).times(o+""))),l=$(l,new _(O),g,1),t==null)if(qt(l.d,g-C,L,a))_.precision=g+=C,u=s=S=$(h.minus(1),h.plus(1),g,1),T=I(S.times(S),g,1),i=a=1;else return I(l,_.precision=k,L,D=!0);else return _.precision=k,l;l=u,i+=2}}function co(e){return String(e.s*e.s/0)}function mr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),so.test(t))return mr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xl.test(t))r=16,t=t.toLowerCase();else if(Zl.test(t))r=2;else if(eu.test(t))r=8;else throw Error(qe+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=lo(n,new n(r),o,o*2)),u=fr(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=br(u,g),e.d=u,D=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):Ie.pow(2,l))),D=!0,e)}function ou(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/xr(5,r)),t=lt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function lt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/M);for(D=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return D=!0,s.d.length=h+1,s}function xr(e,t){for(var r=e;--t;)r*=e;return r}function po(e,t){var r,n=t.s<0,i=be(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ke=n?4:1,t;if(r=t.divToInt(i),r.isZero())ke=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ke=Xi(r)?n?2:3:n?4:1,t;ke=Xi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function kn(e,t,r,n){var i,o,s,a,l,u,g,h,T,O=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=O.rounding:ae(n,0,8)):(r=O.precision,n=O.rounding),!e.isFinite())g=co(e);else{for(g=xe(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new O(1),T.e=g.length-s,T.d=fr(xe(T),10,i),T.e=T.d.length),h=fr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new O(e),e.d=h,e.e=o,e=$(e,T,r,n,0,i),h=e.d,o=e.e,u=ro),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=fr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function su(e){return new this(e).abs()}function au(e){return new this(e).acos()}function lu(e){return new this(e).acosh()}function uu(e,t){return new this(e).plus(t)}function cu(e){return new this(e).asin()}function pu(e){return new this(e).asinh()}function du(e){return new this(e).atan()}function fu(e){return new this(e).atanh()}function mu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=be(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?be(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=be(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=be(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function gu(e){return new this(e).cbrt()}function hu(e){return I(e=new this(e),e.e+1,2)}function yu(e,t,r){return new this(e).clamp(t,r)}function wu(e){if(!e||typeof e!="object")throw Error(wr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-at,0,"toExpPos",0,at,"maxE",0,at,"minE",-at,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(qe+r+": "+n);if(r="crypto",i&&(this[r]=Sn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(io);else this[r]=!1;else throw Error(qe+r+": "+n);return this}function bu(e){return new this(e).cos()}function xu(e){return new this(e).cosh()}function fo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,to(o)){u.s=o.s,D?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;D?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(io);else for(;o=10;i/=10)n++;nct,datamodelEnumToSchemaEnum:()=>Ju});m();c();p();d();f();m();c();p();d();f();function Ju(e){return{name:e.name,values:e.values.map(t=>t.name)}}m();c();p();d();f();var ct=(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.updateManyAndReturn="updateManyAndReturn",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw",k))(ct||{});var yo=Qe(Gi());m();c();p();d();f();dn();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var mo={keyword:Se,entity:Se,value:e=>de(We(e)),punctuation:We,directive:Se,function:Se,variable:e=>de(We(e)),string:e=>de(Ot(e)),boolean:kt,number:Se,comment:It};var Gu=e=>e,Er={},Wu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof me)continue;if(Y&&J!=t.length-1){L.lastIndex=ie;var h=L.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=J,l=ie;for(let B=t.length;a=l&&(++J,ie=l);if(t[J]instanceof me)continue;u=a-J,Ae=e.slice(ie,l),h.index-=ie}else{L.lastIndex=0;var h=L.exec(Ae),u=1}if(!h){if(o)break;continue}q&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),T=g+h.length,O=Ae.slice(0,g),C=Ae.slice(T);let X=[J,u];O&&(++J,ie+=O.length,X.push(O));let Ze=new me(S,k?N.tokenize(h,k):h,At,h,Y);if(X.push(Ze),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,J,ie,!0,S),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):Ku(e.type)(e.content)};function Ku(e){return mo[e]||Gu}function go(e){return zu(e,N.languages.javascript)}function zu(e,t){return N.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();function ho(e){return wn(e)}var Pr=class e{firstLineNumber;lines;static read(t){let r;try{r=sr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,ho(n).split(` +`))}highlight(){let t=go(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var Hu={red:Ge,gray:It,dim:St,bold:de,underline:Rt,highlightSource:e=>e.highlight()},Yu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Zu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Xu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Zu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Pr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=tc(g),T=ec(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let O=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,S)=>o.gray(String(S).padStart(O))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+O+1;C+=2,s.callArguments=(0,yo.default)(i,C).slice(C)}}return s}function ec(e){let t=Object.keys(ct).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function tc(e){let t=0;for(let r=0;r"Unknown error")}function Po(e){return e.errors.flatMap(t=>t.kind==="Union"?Po(t):[t])}function ic(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:oc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function oc(e,t){return[...new Set(e.concat(t))]}function sc(e){return Tn(e,(t,r)=>{let n=bo(t),i=bo(r);return n!==i?n-i:xo(t)-xo(r)})}function bo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function xo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();To();m();c();p();d();f();var pt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};vo();m();c();p();d();f();m();c();p();d();f();var Ar=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var Cr=e=>e,Sr={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},Ao={bold:de,red:Ge,green:Ot,dim:St,enabled:!0},dt={write(e){e.writeLine(",")}};m();c();p();d();f();var Ee=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var je=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ft=class extends je{items=[];addItem(t){return this.items.push(new Ar(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Ee("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(dt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var mt=class e extends je{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ft&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Ee("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(dt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var H=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ee(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var jt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(dt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":ac(e,t);break;case"IncludeOnScalar":lc(e,t);break;case"EmptySelection":uc(e,t,r);break;case"UnknownSelectionField":fc(e,t);break;case"InvalidSelectionValue":mc(e,t);break;case"UnknownArgument":gc(e,t);break;case"UnknownInputField":hc(e,t);break;case"RequiredArgumentMissing":yc(e,t);break;case"InvalidArgumentType":wc(e,t);break;case"InvalidArgumentValue":bc(e,t);break;case"ValueTooLarge":xc(e,t);break;case"SomeFieldsMissing":Ec(e,t);break;case"TooManyFieldsGiven":Pc(e,t);break;case"Union":Eo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function ac(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function lc(e,t){let[r,n]=gt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${$t(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function uc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){cc(e,t,i);return}if(n.hasField("select")){pc(e,t);return}}if(r?.[De(e.outputType.name)]){dc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function cc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function pc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Oo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${$t(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function dc(e,t){let r=new jt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=gt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new mt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function fc(e,t){let r=ko(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Oo(n,e.outputType);break;case"include":vc(n,e.outputType);break;case"omit":Tc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push($t(n)),i.join(" ")})}function mc(e,t){let r=ko(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function gc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ac(n,e.arguments)),t.addErrorMessage(i=>So(i,r,e.arguments.map(o=>o.name)))}function hc(e,t){let[r,n]=gt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Io(o,e.inputType)}t.addErrorMessage(o=>So(o,n,e.inputType.fields.map(s=>s.name)))}function So(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Sc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push($t(e)),n.join(" ")}function yc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=gt(e.argumentPath),s=new jt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Ro).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=gt(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Ro(e){return e.kind==="list"?`${Ro(e.elementType)}[]`:e.name}function wc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Rr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function bc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Rr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function xc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ec(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Io(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Rr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push($t(i)),o.join(" ")})}function Pc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Rr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Oo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function vc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Tc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ac(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ko(e,t){let[r,n]=gt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Io(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function gt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function $t({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Rr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Cc=3;function Sc(e,t){let r=1/0,n;for(let i of t){let o=(0,Co.default)(e,i);o>Cc||o`}};function ht(e){return e instanceof Ut}m();c();p();d();f();var Or=Symbol(),Mn=new WeakMap,Me=class{constructor(t){t===Or?Mn.set(this,`Prisma.${this._getName()}`):Mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mn.get(this)}},Vt=class extends Me{_getNamespace(){return"NullTypes"}},Qt=class extends Vt{#e};_n(Qt,"DbNull");var Jt=class extends Vt{#e};_n(Jt,"JsonNull");var Gt=class extends Vt{#e};_n(Gt,"AnyNull");var kr={classes:{DbNull:Qt,JsonNull:Jt,AnyNull:Gt},instances:{DbNull:new Qt(Or),JsonNull:new Jt(Or),AnyNull:new Gt(Or)}};function _n(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var Fo=": ",Ir=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Fo.length}write(t){let r=new Ee(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Fo).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function yt(e){return new Dn(Mo(e))}function Mo(e){let t=new mt;for(let[r,n]of Object.entries(e)){let i=new Ir(r,_o(n));t.addField(i)}return t}function _o(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(ut(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=dr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Me?new H(`Prisma.${e._getName()}`):ht(e)?new H(`prisma.${De(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Rc(e):typeof e=="object"?Mo(e):new H(Object.prototype.toString.call(e))}function Rc(e){let t=new ft;for(let r of e)t.addItem(_o(r));return t}function Fr(e,t){let r=t==="pretty"?Ao:Sr,n=e.renderAllMessages(r),i=new pt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Mr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=yt(e);for(let h of t)Tr(h,a,s);let{message:l,args:u}=Fr(a,r),g=vr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Lo(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Oc({...e,...Do(t.name,e,t.result.$allModels),...Do(t.name,e,t.result[n])})}function Oc(e){let t=new we,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return pr(e,n=>({...n,needs:r(n.name,new Set)}))}function Do(e,t,r){return r?pr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:kc(t,o,i)})):{}}function kc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function qo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var _r=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Nt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Nt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Lo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},wt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new _r(t))}isEmpty(){return this.head===void 0}append(t){return new e(new _r(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();var Dr=class{constructor(t){this.name=t}};function Bo(e){return e instanceof Dr}function jo(e){return new Dr(e)}m();c();p();d();f();m();c();p();d();f();var $o=Symbol(),Wt=class{constructor(t){if(t!==$o)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new Wt($o);function ve(e){return e instanceof Wt}var Ic={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Uo="explicitly `undefined` values are not allowed";function Nr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=wt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Ln({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Ic[t],query:Kt(r,h)}}function Kt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Qo(r,n),selection:Fc(e,t,i,n)}}function Fc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Lc(e,n)):Mc(n,t,r)}function Mc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&_c(n,t,e),Dc(n,r,e),n}function _c(e,t,r){for(let[n,i]of Object.entries(t)){if(ve(i))continue;let o=r.nestSelection(n);if(Nn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Kt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Kt(i,o)}}function Dc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=qo(i,n);for(let[s,a]of Object.entries(o)){if(ve(a))continue;Nn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Lc(e,t){let r={},n=t.getComputedFields(),i=No(e,n);for(let[o,s]of Object.entries(i)){if(ve(s))continue;let a=t.nestSelection(o);Nn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ve(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Kt({},a):r[o]=!0;continue}r[o]=Kt(s,a)}}return r}function Vo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(st(e)){if(dr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Bo(e))return{$type:"Param",value:e.name};if(ht(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Nc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(qc(e))return e.values;if(ut(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Bc(e))return e.toJSON();if(typeof e=="object")return Qo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Qo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ve(i)||(i!==void 0?r[n]=Vo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Uo}))}return r}function Nc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[De(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ze(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();function Jo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var bt=class{_client;constructor(t){this._client=t}prometheus(t){return Jo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Jo(this._client),this._client._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Go(e,t){let r=Nt(()=>jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function jc(e){return{datamodel:{models:qn(e.models),enums:qn(e.enums),types:qn(e.types)}}}function qn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Bn=new WeakMap,qr="$$PrismaTypedSql",zt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,qr,{value:qr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Wo(e){return(...t)=>new zt(e,t)}function Br(e){return e!=null&&e[qr]===qr}m();c();p();d();f();var da=Qe(Ko());m();c();p();d();f();zo();dn();gn();m();c();p();d();f();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var $r={enumerable:!0,configurable:!0,writable:!0};function Ur(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>$r,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Zo=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Uc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Xo(Reflect.ownKeys(o),r),a=Xo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...$r,...l?.getPropertyDescriptor(s)}:$r:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Zo]=function(){let o={...this};return delete o[Zo],o},i}function Uc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Xo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function xt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function Vr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function es(e){if(e===void 0)return"";let t=yt(e);return new pt(0,{colors:Sr}).write(t).toString()}m();c();p();d();f();var Vc="P2037";function Qr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Qc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Qc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Vc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Yt="";function ts(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=Wc(n)||zc(n)||Zc(n)||rp(n)||ep(n);return i&&r.push(i),r},[])}var Jc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Wc(e){var t=Jc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Gc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Yt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Kc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function zc(e){var t=Kc.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Hc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Yc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Zc(e){var t=Hc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Yc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Yt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Xc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function ep(e){var t=Xc.exec(e);return t?{file:t[3],methodName:t[1]||Yt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var tp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function rp(e){var t=tp.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Un=class{getLocation(){return null}},Vn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ts(t).find(i=>{if(!i.file)return!1;let o=Pn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function $e(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Un:new Vn}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var rs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Et(e={}){let t=ip(e);return Object.entries(t).reduce((n,[i,o])=>(rs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ip(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ns(e,t){let r=Jr(e);return t({action:"aggregate",unpacker:r,argsMapper:Et})(e)}m();c();p();d();f();function op(e={}){let{select:t,...r}=e;return typeof t=="object"?Et({...r,_count:t}):Et({...r,_count:{_all:!0}})}function sp(e={}){return typeof e.select=="object"?t=>Jr(e)(t)._count:t=>Jr(e)(t)._count._all}function is(e,t){return t({action:"count",unpacker:sp(e),argsMapper:op})(e)}m();c();p();d();f();function ap(e={}){let t=Et(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function lp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function os(e,t){return t({action:"groupBy",unpacker:lp(e),argsMapper:ap})(e)}function ss(e,t,r){if(t==="aggregate")return n=>ns(n,r);if(t==="count")return n=>is(n,r);if(t==="groupBy")return n=>os(n,r)}m();c();p();d();f();function as(e,t){let r=t.fields.filter(i=>!i.relationName),n=Yi(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ut(e,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var ls=e=>Array.isArray(e)?e:e.split("."),Qn=(e,t)=>ls(t).reduce((r,n)=>r&&r[n],e),us=(e,t,r)=>ls(t).reduceRight((n,i,o,s)=>Object.assign({},Qn(e,s.slice(0,o)),{[i]:n}),r);function up(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function cp(e,t,r){return t===void 0?e??{}:us(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=$e(e._errorFormat),g=up(n,i),h=cp(l,o,g),T=r({dataPath:g,callsite:u})(h),O=pp(e,t);return new Proxy(T,{get(C,S){if(!O.includes(S))return C[S];let _=[a[S].type,r,S],L=[g,h];return Jn(e,..._,...L)},...Ur([...O,...Object.getOwnPropertyNames(T)])})}}function pp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var dp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],fp=["aggregate","count","groupBy"];function Gn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[mp(e,t),hp(e,t),Ht(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function mp(e,t){let r=Pe(t),n=Object.keys(ct).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=$e(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return dp.includes(o)?Jn(e,t,s):gp(i)?ss(e,i,s):s({})}}}function gp(e){return fp.includes(e)}function hp(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return as(t,r)}))}m();c();p();d();f();function cs(e){return e.replace(/^./,t=>t.toUpperCase())}var Wn=Symbol();function Zt(e){let t=[yp(e),wp(e),ne(Wn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ht(r)),ge(e,t)}function yp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function wp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=cs(i);if(e._runtimeDataModel.models[o]!==void 0)return Gn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Gn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ps(e){return e[Wn]?e[Wn]:e}function ds(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Zt(t)}m();c();p();d();f();m();c();p();d();f();function fs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(xt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(xt(u))}bp(e,l.needs)&&s.push(xp(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function bp(e,t){return t.every(r=>vn(e,r))}function xp(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function Gr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Gr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function gs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Gr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return fs({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Ep=["$connect","$disconnect","$on","$transaction","$extends"],hs=Ep;function ys(e){if(e instanceof le)return Pp(e);if(Br(e))return vp(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ys(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(o,l),a.args=s,bs(e,a,r,n+1)}})})}function xs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return bs(e,t,s)}function Es(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ps(r,n,0,e):e(r)}}function Ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(i,l),Ps(a,t,r+1,n)}})}var ws=e=>e;function vs(e=ws,t=ws){return r=>e(t(r))}m();c();p();d();f();var Ts=z("prisma:client"),As={Vercel:"vercel","Netlify CI":"netlify"};function Cs({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Ts("checkPlatformCaching:postinstall",e),Ts("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in As){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${As[t]}-build`;throw console.error(i),new Q(i,r)}}m();c();p();d();f();function Ss(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Rs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Os(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}m();c();p();d();f();var ks=Qe(Ki());function Is({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ks.default)({user:t,repo:r,template:n,title:e,body:i})}function Fs({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Mi(6e3-(s?.length??0)),l=Os(ot(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",g=ot(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${y.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?Rs(s):""} +\`\`\` +`),h=Is({title:r,body:g});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${Rt(h)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Ms(e,t){throw new Error(t)}function Tp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Ap(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Pt(e){return e===null?e:Array.isArray(e)?e.map(Pt):typeof e=="object"?Tp(e)?Cp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Ap(e,Pt):e}function Cp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=w.Buffer.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new Ie(t);case"Json":return JSON.parse(t);default:Ms(t,"Unknown tagged value")}}var _s="6.19.3";m();c();p();d();f();m();c();p();d();f();var Rp=()=>globalThis.process?.release?.name==="node",Op=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,kp=()=>!!globalThis.Deno,Ip=()=>typeof globalThis.Netlify=="object",Fp=()=>typeof globalThis.EdgeRuntime=="object",Mp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _p(){return[[Ip,"netlify"],[Fp,"edge-light"],[Mp,"workerd"],[kp,"deno"],[Op,"bun"],[Rp,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Dp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ds(){let e=_p();return{id:e,prettyName:Dp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function Wr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ls(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var Kn=class{engineObject;constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},Ns={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:Kn}}};var Lp="P2036",Te=z("prisma:client:libraryEngine");function Np(e){return e.item_type==="query"&&"query"in e}function qp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var TO=[...fn,"native"],Bp=0xffffffffffffffffn,zn=1n;function jp(){let e=zn++;return zn>Bp&&(zn=1n),e}var er=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=Ns,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=jp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if($p(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new G(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Te("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr));let r=await this.adapterPromise;r&&Te("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Np(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):qp(r)?this.loggerRustPanic=new ce(Hn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Te("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr)),await this.adapterPromise,Te("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Te("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Te("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Te("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Te(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Hn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Te("requestBatch");let i=Vr(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ls(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new G(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Hn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Qr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===Lp&&r){let n=t.meta?.id;ur(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return ur(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function $p(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Hn(e,t){return Fs({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}m();c();p();d();f();function qs({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let F=S.join(` +`);o.push({_tag:"error",value:F})},l=!!e?.startsWith("prisma://"),u=bn(e),g=!!t,h=l||u;!g&&r&&h&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):h?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let O={accelerate:T,ppg:u,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:O}:{ok:!0,diagnostics:{warnings:i},isUsing:O}}function Bs({copyEngine:e=!0},t){let r;try{r=Wr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=qs({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Lt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new er(t)}m();c();p();d();f();function js({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var $s=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Us=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function vt(e){try{return Vs(e,"fast")}catch{return Vs(e,"slow")}}function Vs(e,t){return JSON.stringify(e.map(r=>Js(r,t)))}function Js(e,t){if(Array.isArray(e))return e.map(r=>Js(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(st(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Fe.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Up(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Gs(e):e}function Up(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Gs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Qs);let t={};for(let r of Object.keys(e))t[r]=Qs(e[r]);return t}function Qs(e){return typeof e=="bigint"?e.toString():Gs(e)}var Vp=/^(\s*alter\s)/i,Ws=z("prisma:client");function Yn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Vp.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Zn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Br(r))n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Us(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Ws(`prisma.${e}(${n}, ${i.values})`):Ws(`prisma.${e}(${n})`),{query:n,parameters:i}},Ks={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Xn(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Hs(r(s)):Hs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Hs(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var Qp=mn.split(".")[0],Jp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ei=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Qp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Jp}};function Ys(){return new ei}m();c();p();d();f();function Zs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function Xs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();m();c();p();d();f();function Kr(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function ea(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ti(e.query.arguments)),t.push(ti(e.query.selection)),t.join("")}function ti(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ti(n)})`:r}).join(" ")})`}m();c();p();d();f();var Gp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ri(e){return Gp[e]}m();c();p();d();f();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Hr(e){let t=[],r=Wp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ri(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:zp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(O){return O}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ta(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ri(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ea(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Kp(t),Hp(t,i))throw t;if(t instanceof se&&Yp(t)){let u=ra(t.meta);Mr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=vr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof G)throw new G(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?ot(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Qn(o,s),l=i==="queryRaw"?Hr(a):Pt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function zp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ta(e)};ze(e,"Unknown transaction kind")}}function ta(e){return{id:e.id,payload:e.payload}}function Hp(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Yp(e){return e.code==="P2009"||e.code==="P2012"}function ra(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ra)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var na=_s;m();c();p();d();f();var la=Qe(In());m();c();p();d();f();var j=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};ue(j,"PrismaClientConstructorValidationError");var ia=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],oa=["pretty","colorless","minimal"],sa=["info","query","warn","error"],Zp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Tt(r,t)||` Available datasources: ${t.join(", ")}`;throw new j(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new j(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new j(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&it(t.generator)==="client")throw new j('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new j('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(it(t.generator)==="binary")throw new j('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new j(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!oa.includes(e)){let t=Tt(e,oa);throw new j(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new j(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!sa.includes(r)){let n=Tt(r,sa);throw new j(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Tt(i,o);throw new j(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new j(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new j(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new j(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new j('"omit" option is expected to be an object.');if(e===null)throw new j('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=ed(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new j(td(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new j(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Tt(r,t);throw new j(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ua(e,t){for(let[r,n]of Object.entries(e)){if(!ia.includes(r)){let i=Tt(r,ia);throw new j(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Zp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new j('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Tt(e,t){if(t.length===0||typeof e!="string")return"";let r=Xp(e,t);return r?` Did you mean "${r}"?`:""}function Xp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,la.default)(e,i)}));r.sort((i,o)=>i.distanceDe(n)===t);if(r)return e[r]}function td(e,t){let r=yt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Fr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}m();c();p();d();f();function ca(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Ue=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var rd={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},nd=Symbol.for("prisma.client.transaction.id"),id={id:0,nextId(){return++this.id}};function fa(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Xn();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Cs(e),n&&ua(n,e);let i=new jr().on("error",()=>{});this._extensions=wt.empty(),this._previewFeatures=js(e),this._clientVersion=e.clientVersion??na,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Ys();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Re.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Re.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&z.enable("prisma:client");let h=Re.resolve(e.dirname,e.relativePath);sr.existsSync(h)||(h=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("cwd",h);let T=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Xs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(O=>typeof O=="string"?O==="query":O.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ss(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Wr,getBatchRequestPayload:Vr,prismaGraphQLToJSError:Qr,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:z("prisma:client:accelerateEngine"),engineVersion:da.version,clientVersion:e.clientVersion}},Ue("clientVersion",e.clientVersion),this._engine=Bs(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let O of l.log){let C=typeof O=="string"?O:O.emit==="stdout"?O.level:null;C&&this.$on(C,S=>{Dt.log(`${Dt.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{_i()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zn({clientMethod:i,activeProvider:a}),callsite:$e(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=pa(n,i);return Yn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Yn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:$s,callsite:$e(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zn({clientMethod:i,activeProvider:a}),callsite:$e(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...pa(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=id.nextId(),s=Zs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ca(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return ge(Zt(ge(ps(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Xn(n)),ne(nd,()=>n.id)])),[xt(hs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??rd,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async l=>{let{runInTransaction:u,args:g,...h}=l,T={...n,...h};g&&(T.args=i.middlewareArgsToRequestArgs(g)),n.transaction!==void 0&&u===!1&&delete T.transaction;let O=await xs(this,T);return T.model?gs({result:O,modelName:T.model,args:T.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):O};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:O}){try{n=u?u(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Nr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${es(n)})`),Ue("Generated request:"),Ue(JSON.stringify(S,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:O})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new bt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ds}return t}function pa(e,t){return od(e)?[new le(e,t),Ks]:[e,zs]}function od(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var sd=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ma(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!sd.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=react-native.js.map diff --git a/lib/generated/prisma/runtime/wasm-compiler-edge.js b/lib/generated/prisma/runtime/wasm-compiler-edge.js new file mode 100644 index 0000000..dc6d8f9 --- /dev/null +++ b/lib/generated/prisma/runtime/wasm-compiler-edge.js @@ -0,0 +1,85 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var ou=Object.create;var Kr=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var au=Object.getOwnPropertyNames;var lu=Object.getPrototypeOf,cu=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},Vo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of au(t))!cu.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=su(t,i))||n.enumerable});return e};var $e=(e,t,r)=>(r=e!=null?ou(lu(e)):{},Vo(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e)),qo=e=>Vo(Kr({},"__esModule",{value:!0}),e);function ui(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(du.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(w=0){return Y(w,"offset"),de(w,"offset"),ee(w,"offset",this.length-1),new DataView(this.buffer)[r[a]](w,f)},o=(a,f)=>function(w,A=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),S=mu[R];return Y(A,"offset"),de(A,"offset"),ee(A,"offset",this.length-1),pu(w,"value",S[0],S[1]),new DataView(this.buffer)[r[a]](A,w,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function jo(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function zr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=yu+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function Y(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function de(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function pu(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Bo(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function hu(e,t="utf8"){return h.from(e,t)}var h,mu,du,fu,gu,yu,y,pi,c=ye(()=>{"use strict";h=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Bo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return ui(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return gu.includes(t)}static compare(t,r){zr(t,"buff1"),zr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return ui(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Y(t,"offset"),de(t,"offset"),ee(t,"offset",this.length-1),Y(r,"byteLength"),de(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Y(r,"offset"),de(r,"offset"),ee(r,"offset",this.length-1),Y(n,"byteLength"),de(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,w)=>(i?w<=a:w>=a)&&this[w]===s[0]&&s.every((R,S)=>this[w+S]===R))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return fu.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+pi(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+pi(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");jo(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};mu={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},du=new TextEncoder,fu=new TextDecoder,gu=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],yu=4294967295;uu(h.prototype);y=new Proxy(hu,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),pi=String.fromCodePoint});var g,x,u=ye(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ye(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ye(()=>{"use strict";E=()=>{};E.prototype=E});var d=ye(()=>{"use strict"});function Jo(e,t){var r,n,i,o,s,a,f,w,A=e.constructor,R=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),W?q(t,R):t;if(f=e.d,w=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=w.length):(n=w,i=s,a=f.length),s=Math.ceil(R/H),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=w.length,a-o<0&&(o=a,n=w,w=f,f=n),r=0;o;)r=(f[--o]=f[o]+w[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,W?q(t,R):t}function Re(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(di+Z(e));if(!e.s)return new A(he);for(t==null?(W=!1,a=R):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),w+=5;for(n=Math.log(ze(2,w))/Math.LN10*2+5|0,a+=n,r=i=o=new A(he),A.precision=a;;){if(i=q(i.times(e),a),r=r.times(++f),s=o.plus(_e(i,r,a)),Ae(s.d).slice(0,a)===Ae(o.d).slice(0,a)){for(;w--;)o=q(o.times(o),a);return A.precision=R,t==null?(W=!0,q(o,R)):o}o=s}}function Z(e){for(var t=e.e*H,r=e.d[0];r>=10;r/=10)t++;return t}function mi(e,t,r){if(t>e.LN10.sd())throw W=!0,r&&(e.precision=r),Error(be+"LN10 precision limit exceeded");return q(new e(e.LN10),t)}function Ve(e){for(var t="";e--;)t+="0";return t}function Kt(e,t){var r,n,i,o,s,a,f,w,A,R=1,S=10,C=e,L=C.d,k=C.constructor,M=k.precision;if(C.s<1)throw Error(be+(C.s?"NaN":"-Infinity"));if(C.eq(he))return new k(0);if(t==null?(W=!1,w=M):w=t,C.eq(10))return t==null&&(W=!0),mi(k,w);if(w+=S,k.precision=w,r=Ae(L),n=r.charAt(0),o=Z(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(e),r=Ae(C.d),n=r.charAt(0),R++;o=Z(C),n>1?(C=new k("0."+r),o++):C=new k(n+"."+r.slice(1))}else return f=mi(k,w+2,M).times(o+""),C=Kt(new k(n+"."+r.slice(1)),w-S).plus(f),k.precision=M,t==null?(W=!0,q(C,M)):C;for(a=s=C=_e(C.minus(he),C.plus(he),w),A=q(C.times(C),w),i=3;;){if(s=q(s.times(A),w),f=a.plus(_e(s,new k(i),w)),Ae(f.d).slice(0,w)===Ae(a.d).slice(0,w))return a=a.times(2),o!==0&&(a=a.plus(mi(k,w+2,M).times(o+""))),a=_e(a,new k(R),w),k.precision=M,t==null?(W=!0,q(a,M)):a;a=f,i+=2}}function Qo(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dt(r/H),e.d=[],n=(r+1)%H,r<0&&(n+=H),nYr||e.e<-Yr))throw Error(di+r)}else e.s=0,e.e=0,e.d=[0];return e}function q(e,t,r){var n,i,o,s,a,f,w,A,R=e.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=H,i=t,w=R[A=0];else{if(A=Math.ceil((n+1)/H),o=R.length,A>=o)return e;for(w=o=R[A],s=1;o>=10;o/=10)s++;n%=H,i=n-H+s}if(r!==void 0&&(o=ze(10,s-i-1),a=w/o%10|0,f=t<0||R[A+1]!==void 0||w%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?w/ze(10,s-i):0:R[A-1])%10&1||r==(e.s<0?8:7))),t<1||!R[0])return f?(o=Z(e),R.length=1,t=t-o-1,R[0]=ze(10,(H-t%H)%H),e.e=dt(-t/H)||0):(R.length=1,R[0]=e.e=e.s=0),e;if(n==0?(R.length=A,o=1,A--):(R.length=A+1,o=ze(10,H-n),R[A]=i>0?(w/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(R[0]+=o)==te&&(R[0]=1,++e.e);break}else{if(R[A]+=o,R[A]!=te)break;R[A--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(W&&(e.e>Yr||e.e<-Yr))throw Error(di+Z(e));return e}function Ko(e,t){var r,n,i,o,s,a,f,w,A,R,S=e.constructor,C=S.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new S(e),W?q(t,C):t;if(f=e.d,R=t.d,n=t.e,w=e.e,f=f.slice(),s=w-n,s){for(A=s<0,A?(r=f,s=-s,a=R.length):(r=R,n=w,a=f.length),i=Math.max(Math.ceil(C/H),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,A=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ve(-i-1)+o,r&&(n=r-s)>0&&(o+=Ve(n))):i>=s?(o+=Ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ve(n))),e.s<0?"-"+o:o}function Ho(e,t){if(e.length>t)return e.length=t,!0}function zo(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ye+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Qo(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,bu.test(o))Qo(s,o);else throw Error(Ye+o)}if(i.prototype=I,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=zo,i.config=i.set=Eu,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,wu,fi,W,be,Ye,di,dt,ze,bu,he,te,H,Go,Yr,I,_e,fi,Zr,Yo=ye(()=>{"use strict";c();u();p();m();d();l();mt=1e9,wu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W=!0,be="[DecimalError] ",Ye=be+"Invalid argument: ",di=be+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,bu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,H=7,Go=9007199254740991,Yr=dt(Go/H),I={};I.absoluteValue=I.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};I.comparedTo=I.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};I.decimalPlaces=I.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*H;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};I.dividedBy=I.div=function(e){return _e(this,new this.constructor(e))};I.dividedToIntegerBy=I.idiv=function(e){var t=this,r=t.constructor;return q(_e(t,new r(e),0,1),r.precision)};I.equals=I.eq=function(e){return!this.cmp(e)};I.exponent=function(){return Z(this)};I.greaterThan=I.gt=function(e){return this.cmp(e)>0};I.greaterThanOrEqualTo=I.gte=function(e){return this.cmp(e)>=0};I.isInteger=I.isint=function(){return this.e>this.d.length-2};I.isNegative=I.isneg=function(){return this.s<0};I.isPositive=I.ispos=function(){return this.s>0};I.isZero=function(){return this.s===0};I.lessThan=I.lt=function(e){return this.cmp(e)<0};I.lessThanOrEqualTo=I.lte=function(e){return this.cmp(e)<1};I.logarithm=I.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(he))throw Error(be+"NaN");if(r.s<1)throw Error(be+(r.s?"NaN":"-Infinity"));return r.eq(he)?new n(0):(W=!1,t=_e(Kt(r,o),Kt(e,o),o),W=!0,q(t,i))};I.minus=I.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ko(t,e):Jo(t,(e.s=-e.s,e))};I.modulo=I.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(be+"NaN");return r.s?(W=!1,t=_e(r,e,0,1).times(e),W=!0,r.minus(t)):q(new n(r),i)};I.naturalExponential=I.exp=function(){return Wo(this)};I.naturalLogarithm=I.ln=function(){return Kt(this)};I.negated=I.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};I.plus=I.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jo(t,e):Ko(t,(e.s=-e.s,e))};I.precision=I.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=Z(i)+1,n=i.d.length-1,r=n*H+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};I.squareRoot=I.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(be+"NaN")}for(e=Z(a),W=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(_e(a,o,s+2)).times(.5),Ae(o.d).slice(0,s)===(t=Ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(q(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return W=!0,q(n,r)};I.times=I.mul=function(e){var t,r,n,i,o,s,a,f,w,A=this,R=A.constructor,S=A.d,C=(e=new R(e)).d;if(!A.s||!e.s)return new R(0);for(e.s*=A.s,r=A.e+e.e,f=S.length,w=C.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+C[n]*S[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,W?q(e,R.precision):e};I.toDecimalPlaces=I.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Re(e,0,mt),t===void 0?t=n.rounding:Re(t,0,8),q(r,e+Z(r)+1,t))};I.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Re(e,0,mt),t===void 0?t=i.rounding:Re(t,0,8),n=q(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};I.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Re(e,0,mt),t===void 0?t=o.rounding:Re(t,0,8),n=q(new o(i),e+Z(i)+1,t),r=Ze(n.abs(),!1,e+Z(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};I.toInteger=I.toint=function(){var e=this,t=e.constructor;return q(new t(e),Z(e)+1,t.rounding)};I.toNumber=function(){return+this};I.toPower=I.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,w=12,A=+(e=new f(e));if(!e.s)return new f(he);if(a=new f(a),!a.s){if(e.s<1)throw Error(be+"Infinity");return a}if(a.eq(he))return a;if(n=f.precision,e.eq(he))return q(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Go){for(i=new f(he),t=Math.ceil(n/H+4),W=!1;r%2&&(i=i.times(a),Ho(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),Ho(a.d,t);return W=!0,e.s<0?new f(he).div(i):q(i,n)}}else if(o<0)throw Error(be+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,W=!1,i=e.times(Kt(a,n+w)),W=!0,i=Wo(i),i.s=o,i};I.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Z(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Re(e,1,mt),t===void 0?t=o.rounding:Re(t,0,8),i=q(new o(i),e,t),r=Z(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};I.toSignificantDigits=I.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Re(e,1,mt),t===void 0?t=n.rounding:Re(t,0,8)),q(new n(r),e,t)};I.toString=I.valueOf=I.val=I.toJSON=I[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Z(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};_e=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,w,A,R,S,C,L,k,M,De,ue,B,pe,Ke,ci,xe,Jr,Wr=n.constructor,iu=n.s==i.s?1:-1,ve=n.d,z=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(be+"Division by zero");for(f=n.e-i.e,xe=z.length,Ke=ve.length,C=new Wr(iu),L=C.d=[],w=0;z[w]==(ve[w]||0);)++w;if(z[w]>(ve[w]||0)&&--f,o==null?ue=o=Wr.precision:s?ue=o+(Z(n)-Z(i))+1:ue=o,ue<0)return new Wr(0);if(ue=ue/H+2|0,w=0,xe==1)for(A=0,z=z[0],ue++;(w1&&(z=e(z,A),ve=e(ve,A),xe=z.length,Ke=ve.length),pe=xe,k=ve.slice(0,xe),M=k.length;M=te/2&&++ci;do A=0,a=t(z,k,xe,M),a<0?(De=k[0],xe!=M&&(De=De*te+(k[1]||0)),A=De/ci|0,A>1?(A>=te&&(A=te-1),R=e(z,A),S=R.length,M=k.length,a=t(R,k,S,M),a==1&&(A--,r(R,xe{"use strict";Yo();v=class extends Zr{static isDecimal(t){return t instanceof Zr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Zr(`0.${n.slice(0,t)}`)}}},se=v});function Ru(){return!1}function bi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Cu(){return bi()}function Su(){return[]}function Iu(e){e(null,[])}function ku(){return""}function Ou(){return""}function Du(){}function _u(){}function Mu(){}function Nu(){}function Lu(){}function Uu(){}function Fu(){}function $u(){}function Vu(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function qu(e,t){t(null,bi())}var Bu,ju,fs,gs=ye(()=>{"use strict";c();u();p();m();d();l();Bu={},ju={existsSync:Ru,lstatSync:bi,stat:qu,statSync:Cu,readdirSync:Su,readdir:Iu,readlinkSync:ku,realpathSync:Ou,chmodSync:Du,renameSync:_u,mkdirSync:Mu,rmdirSync:Nu,rmSync:Lu,unlinkSync:Uu,watchFile:Fu,unwatchFile:$u,watch:Vu,promises:Bu},fs=ju});var ys=me(()=>{"use strict";c();u();p();m();d();l()});var hs=me((Vy,Qu)=>{Qu.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Gu(...e){return e.join("/")}function Ju(...e){return e.join("/")}function Wu(e){let t=ws(e),r=bs(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function ws(e){let t=e.split("/");return t[t.length-1]}function bs(e){return e.split("/").slice(0,-1).join("/")}function zu(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Es,Ku,Yu,Zu,rn,xs=ye(()=>{"use strict";c();u();p();m();d();l();Es="/",Ku=":";Yu={sep:Es},Zu={basename:ws,delimiter:Ku,dirname:bs,join:Ju,normalize:zu,parse:Wu,posix:Yu,resolve:Gu,sep:Es},rn=Zu});var xi={};pt(xi,{Hash:()=>Zt,createHash:()=>Ps,default:()=>yt,randomFillSync:()=>sn,randomUUID:()=>on,webcrypto:()=>Xt});function on(){return globalThis.crypto.randomUUID()}function sn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function Ps(e){return new Zt(e)}var Xt,Zt,yt,Xe=ye(()=>{"use strict";c();u();p();m();d();l();Xt=globalThis.crypto;Zt=class{#t=[];#e;constructor(t){this.#e=t}update(t){this.#t.push(t)}async digest(){let t=new Uint8Array(this.#t.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#t)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#e,t);return new Uint8Array(n)}},yt={webcrypto:Xt,randomUUID:on,randomFillSync:sn,createHash:Ps,Hash:Zt}});var Pi=me(($h,tp)=>{tp.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Ts=me(an=>{"use strict";c();u();p();m();d();l();Object.defineProperty(an,"__esModule",{value:!0});an.enginesVersion=void 0;an.enginesVersion=Pi().prisma.enginesVersion});var Rs=me((ew,As)=>{"use strict";c();u();p();m();d();l();As.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ss=me((Lw,un)=>{"use strict";c();u();p();m();d();l();un.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};un.exports.default=un.exports});var Ii=me((SP,_s)=>{"use strict";c();u();p();m();d();l();_s.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";c();u();p();m();d();l()});var $s=ye(()=>{"use strict";c();u();p();m();d();l()});var kn,ca=ye(()=>{"use strict";c();u();p();m();d();l();kn=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Xi=me(rt=>{"use strict";c();u();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Zi;rt.abytes=ol;rt.ahash=Nm;rt.aexists=Lm;rt.aoutput=Um;function Zi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Mm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ol(e,...t){if(!Mm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Nm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zi(e.outputLen),Zi(e.blockLen)}function Lm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Um(e,t){ol(e);let r=t.outputLen;if(e.length{"use strict";c();u();p();m();d();l();Object.defineProperty(_,"__esModule",{value:!0});_.add5L=_.add5H=_.add4H=_.add4L=_.add3H=_.add3L=_.rotlBL=_.rotlBH=_.rotlSL=_.rotlSH=_.rotr32L=_.rotr32H=_.rotrBL=_.rotrBH=_.rotrSL=_.rotrSH=_.shrSL=_.shrSH=_.toBig=void 0;_.fromBig=to;_.split=sl;_.add=El;var Fn=BigInt(2**32-1),eo=BigInt(32);function to(e,t=!1){return t?{h:Number(e&Fn),l:Number(e>>eo&Fn)}:{h:Number(e>>eo&Fn)|0,l:Number(e&Fn)|0}}function sl(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);_.toBig=al;var ll=(e,t,r)=>e>>>r;_.shrSH=ll;var cl=(e,t,r)=>e<<32-r|t>>>r;_.shrSL=cl;var ul=(e,t,r)=>e>>>r|t<<32-r;_.rotrSH=ul;var pl=(e,t,r)=>e<<32-r|t>>>r;_.rotrSL=pl;var ml=(e,t,r)=>e<<64-r|t>>>r-32;_.rotrBH=ml;var dl=(e,t,r)=>e>>>r-32|t<<64-r;_.rotrBL=dl;var fl=(e,t)=>t;_.rotr32H=fl;var gl=(e,t)=>e;_.rotr32L=gl;var yl=(e,t,r)=>e<>>32-r;_.rotlSH=yl;var hl=(e,t,r)=>t<>>32-r;_.rotlSL=hl;var wl=(e,t,r)=>t<>>64-r;_.rotlBH=wl;var bl=(e,t,r)=>e<>>64-r;_.rotlBL=bl;function El(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var xl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);_.add3L=xl;var Pl=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;_.add3H=Pl;var Tl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);_.add4L=Tl;var vl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;_.add4H=vl;var Al=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);_.add5L=Al;var Rl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;_.add5H=Rl;var Fm={fromBig:to,split:sl,toBig:al,shrSH:ll,shrSL:cl,rotrSH:ul,rotrSL:pl,rotrBH:ml,rotrBL:dl,rotr32H:fl,rotr32L:gl,rotlSH:yl,rotlSL:hl,rotlBH:wl,rotlBL:bl,add:El,add3L:xl,add3H:Pl,add4L:Tl,add4H:vl,add5H:Rl,add5L:Al};_.default=Fm});var Sl=me($n=>{"use strict";c();u();p();m();d();l();Object.defineProperty($n,"__esModule",{value:!0});$n.crypto=void 0;var He=(Xe(),qo(xi));$n.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Ol=me(U=>{"use strict";c();u();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=$m;U.u8=Vm;U.u32=qm;U.createView=Bm;U.rotr=jm;U.rotl=Qm;U.byteSwap=io;U.byteSwap32=Hm;U.bytesToHex=Jm;U.hexToBytes=Wm;U.asyncLoop=zm;U.utf8ToBytes=kl;U.toBytes=Vn;U.concatBytes=Ym;U.checkOpts=Zm;U.wrapConstructor=Xm;U.wrapConstructorWithOpts=ed;U.wrapXOFConstructorWithOpts=td;U.randomBytes=rd;var Mt=Sl(),no=Xi();function $m(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Vm(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function qm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function jm(e,t){return e<<32-t|e>>>t}function Qm(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function io(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>io(e);function Hm(e){for(let t=0;tt.toString(16).padStart(2,"0"));function Jm(e){(0,no.abytes)(e);let t="";for(let r=0;r=Le._0&&e<=Le._9)return e-Le._0;if(e>=Le.A&&e<=Le.F)return e-(Le.A-10);if(e>=Le.a&&e<=Le.f)return e-(Le.a-10)}function Wm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=Km;async function zm(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Vn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function ed(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function td(e){let t=(n,i)=>e(i).update(Vn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function rd(e=32){if(Mt.crypto&&typeof Mt.crypto.getRandomValues=="function")return Mt.crypto.getRandomValues(new Uint8Array(e));if(Mt.crypto&&typeof Mt.crypto.randomBytes=="function")return Mt.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var $l=me(J=>{"use strict";c();u();p();m();d();l();Object.defineProperty(J,"__esModule",{value:!0});J.shake256=J.shake128=J.keccak_512=J.keccak_384=J.keccak_256=J.keccak_224=J.sha3_512=J.sha3_384=J.sha3_256=J.sha3_224=J.Keccak=void 0;J.keccakP=Ul;var Nt=Xi(),Pr=Cl(),Ue=Ol(),Ml=[],Nl=[],Ll=[],nd=BigInt(0),xr=BigInt(1),id=BigInt(2),od=BigInt(7),sd=BigInt(256),ad=BigInt(113);for(let e=0,t=xr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ml.push(2*(5*n+r)),Nl.push((e+1)*(e+2)/2%64);let i=nd;for(let o=0;o<7;o++)t=(t<>od)*ad)%sd,t&id&&(i^=xr<<(xr<r>32?(0,Pr.rotlBH)(e,t,r):(0,Pr.rotlSH)(e,t,r),_l=(e,t,r)=>r>32?(0,Pr.rotlBL)(e,t,r):(0,Pr.rotlSL)(e,t,r);function Ul(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,w=r[f],A=r[f+1],R=Dl(w,A,1)^r[a],S=_l(w,A,1)^r[a+1];for(let C=0;C<50;C+=10)e[s+C]^=R,e[s+C+1]^=S}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Nl[s],f=Dl(i,o,a),w=_l(i,o,a),A=Ml[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=w}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=ld[n],e[1]^=cd[n]}r.fill(0)}var Tr=class e extends Ue.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Nt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Ue.u32)(this.state)}keccak(){Ue.isLE||(0,Ue.byteSwap32)(this.state32),Ul(this.state32,this.rounds),Ue.isLE||(0,Ue.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Nt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Ue.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Nt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Nt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};J.Keccak=Tr;var Ge=(e,t,r)=>(0,Ue.wrapConstructor)(()=>new Tr(t,e,r));J.sha3_224=Ge(6,144,224/8);J.sha3_256=Ge(6,136,256/8);J.sha3_384=Ge(6,104,384/8);J.sha3_512=Ge(6,72,512/8);J.keccak_224=Ge(1,144,224/8);J.keccak_256=Ge(1,136,256/8);J.keccak_384=Ge(1,104,384/8);J.keccak_512=Ge(1,72,512/8);var Fl=(e,t,r)=>(0,Ue.wrapXOFConstructorWithOpts)((n={})=>new Tr(t,e,n.dkLen===void 0?r:n.dkLen,!0));J.shake128=Fl(31,168,128/8);J.shake256=Fl(31,136,256/8)});var Jl=me((RL,Je)=>{"use strict";c();u();p();m();d();l();var{sha3_512:ud}=$l(),ql=24,vr=32,oo=(e=4,t=Math.random)=>{let r="";for(;r.lengthBl(ud(e)).toString(36).slice(1),Vl=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),pd=e=>Vl[Math.floor(e()*Vl.length)],Ql=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+oo(vr,t):oo(vr,t);return jl(n).substring(0,vr)},Hl=e=>()=>e++,md=476782367,Gl=({random:e=Math.random,counter:t=Hl(Math.floor(e()*md)),length:r=ql,fingerprint:n=Ql({random:e})}={})=>function(){let o=pd(e),s=Date.now().toString(36),a=t().toString(36),f=oo(r,e),w=`${s+f+a+n}`;return`${o+jl(w).substring(1,r)}`},dd=Gl(),fd=(e,{minLength:t=2,maxLength:r=vr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};Je.exports.getConstants=()=>({defaultLength:ql,bigLength:vr});Je.exports.init=Gl;Je.exports.createId=dd;Je.exports.bufToBigInt=Bl;Je.exports.createCounter=Hl;Je.exports.createFingerprint=Ql;Je.exports.isCuid=fd});var Wl=me((_L,Ar)=>{"use strict";c();u();p();m();d();l();var{createId:gd,init:yd,getConstants:hd,isCuid:wd}=Jl();Ar.exports.createId=gd;Ar.exports.init=yd;Ar.exports.getConstants=hd;Ar.exports.isCuid=wd});var $f={};pt($f,{DMMF:()=>or,Debug:()=>K,Decimal:()=>se,Extensions:()=>gi,MetricsClient:()=>St,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>ae,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>ie,Public:()=>yi,Sql:()=>fe,createParam:()=>ta,defineDmmfProperty:()=>aa,deserializeJsonResponse:()=>Qe,deserializeRawResult:()=>ai,dmmfToRuntimeDataModel:()=>Ds,empty:()=>pa,getPrismaClient:()=>tu,getRuntime:()=>ti,join:()=>ua,makeStrictEnum:()=>ru,makeTypedQueryFactory:()=>la,objectEnumValues:()=>En,raw:()=>Fi,serializeJsonQuery:()=>Cn,skip:()=>Rn,sqltag:()=>$i,warnEnvConflicts:()=>void 0,warnOnce:()=>rr});module.exports=qo($f);c();u();p();m();d();l();var gi={};pt(gi,{defineExtension:()=>Zo,getExtensionContext:()=>Xo});c();u();p();m();d();l();c();u();p();m();d();l();function Zo(e){return typeof e=="function"?e:t=>t.$extends(e)}c();u();p();m();d();l();function Xo(e){return e}var yi={};pt(yi,{validator:()=>es});c();u();p();m();d();l();c();u();p();m();d();l();function es(...e){return t=>t}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var hi,ts,rs,ns,is=!0;typeof g<"u"&&({FORCE_COLOR:hi,NODE_DISABLE_COLORS:ts,NO_COLOR:rs,TERM:ns}=g.env||{},is=g.stdout&&g.stdout.isTTY);var xu={enabled:!ts&&rs==null&&ns!=="dumb"&&(hi!=null&&hi!=="0"||is)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!xu.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ug=j(0,0),Xr=j(1,22),en=j(2,22),Fg=j(3,23),tn=j(4,24),$g=j(7,27),Vg=j(8,28),qg=j(9,29),Bg=j(30,39),ft=j(31,39),os=j(32,39),ss=j(33,39),as=j(34,39),jg=j(35,39),ls=j(36,39),Qg=j(37,39),cs=j(90,39),Hg=j(90,39),Gg=j(40,49),Jg=j(41,49),Wg=j(42,49),Kg=j(43,49),zg=j(44,49),Yg=j(45,49),Zg=j(46,49),Xg=j(47,49);c();u();p();m();d();l();var Pu=100,us=["green","yellow","blue","magenta","cyan","red"],zt=[],ps=Date.now(),Tu=0,wi=typeof g<"u"?g.env:{};globalThis.DEBUG??=wi.DEBUG??"";globalThis.DEBUG_COLORS??=wi.DEBUG_COLORS?wi.DEBUG_COLORS==="true":!0;var Yt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function vu(e){let t={color:us[Tu++%us.length],enabled:Yt.enabled(e),namespace:e,log:Yt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&zt.push([o,...n]),zt.length>Pu&&zt.shift(),Yt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Au(A)),w=`+${Date.now()-ps}ms`;ps=Date.now(),a(o,...f,w)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(vu,{get:(e,t)=>Yt[t],set:(e,t,r)=>Yt[t]=r});function Au(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ms(e=7500){let t=zt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.lengthip,info:()=>np,log:()=>rp,query:()=>op,should:()=>Cs,tags:()=>er,warn:()=>vi});c();u();p();m();d();l();var er={error:ft("prisma:error"),warn:ss("prisma:warn"),info:ls("prisma:info"),query:as("prisma:query")},Cs={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function vi(e,...t){Cs.warn()&&console.warn(`${er.warn} ${e}`,...t)}function np(e,...t){console.info(`${er.info} ${e}`,...t)}function ip(e,...t){console.error(`${er.error} ${e}`,...t)}function op(e,...t){console.log(`${er.query} ${e}`,...t)}c();u();p();m();d();l();function Me(e,t){throw new Error(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ai({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var sp=Ai();function ht(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(sp,"")}c();u();p();m();d();l();function Ri(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();u();p();m();d();l();function pn(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();u();p();m();d();l();function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Is.has(e)||(Is.add(e),vi(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};D(F,"PrismaClientInitializationError");c();u();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};D(X,"PrismaClientKnownRequestError");c();u();p();m();d();l();var ae=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};D(ae,"PrismaClientRustPanicError");c();u();p();m();d();l();var ne=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};D(ne,"PrismaClientUnknownRequestError");c();u();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};D(ie,"PrismaClientValidationError");c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Ce=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();u();p();m();d();l();function qe(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();u();p();m();d();l();function Os(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}c();u();p();m();d();l();function nr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();u();p();m();d();l();function Ds(e){return{models:Si(e.models),enums:Si(e.enums),types:Si(e.types)}}function Si(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}c();u();p();m();d();l();function wt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function mn(e){return e.toString()!=="Invalid Date"}c();u();p();m();d();l();l();function bt(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();u();p();m();d();l();c();u();p();m();d();l();var or={};pt(or,{ModelAction:()=>ir,datamodelEnumToSchemaEnum:()=>ap});c();u();p();m();d();l();c();u();p();m();d();l();function ap(e){return{name:e.name,values:e.values.map(t=>t.name)}}c();u();p();m();d();l();var ir=(B=>(B.findUnique="findUnique",B.findUniqueOrThrow="findUniqueOrThrow",B.findFirst="findFirst",B.findFirstOrThrow="findFirstOrThrow",B.findMany="findMany",B.create="create",B.createMany="createMany",B.createManyAndReturn="createManyAndReturn",B.update="update",B.updateMany="updateMany",B.updateManyAndReturn="updateManyAndReturn",B.upsert="upsert",B.delete="delete",B.deleteMany="deleteMany",B.groupBy="groupBy",B.count="count",B.aggregate="aggregate",B.findRaw="findRaw",B.aggregateRaw="aggregateRaw",B))(ir||{});var lp=$e(Rs());var cp={red:ft,gray:cs,dim:en,bold:Xr,underline:tn,highlightSource:e=>e.highlight()},up={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function pp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function mp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(dp(t))),i){a.push("");let w=[i.toString()];o&&(w.push(o),w.push(s.dim(")"))),a.push(w.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function dp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function dn(e){let t=e.showColors?cp:up,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=pp(e),mp(r,t)}c();u();p();m();d();l();var qs=$e(Ii());c();u();p();m();d();l();function Ls(e,t,r){let n=Us(e),i=fp(n),o=yp(i);o?fn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Us(e){return e.errors.flatMap(t=>t.kind==="Union"?Us(t):[t])}function fp(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:gp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function gp(e,t){return[...new Set(e.concat(t))]}function yp(e){return Ci(e,(t,r)=>{let n=Ms(t),i=Ms(r);return n!==i?n-i:Ns(t)-Ns(r)})}function Ms(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ns(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();u();p();m();d();l();var we=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();u();p();m();d();l();c();u();p();m();d();l();$s();c();u();p();m();d();l();var Et=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Fs();c();u();p();m();d();l();c();u();p();m();d();l();var gn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();u();p();m();d();l();var yn=e=>e,hn={bold:yn,red:yn,green:yn,dim:yn,enabled:!1},Vs={bold:Xr,red:ft,green:os,dim:en,enabled:!0},xt={write(e){e.writeLine(",")}};c();u();p();m();d();l();var Se=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();u();p();m();d();l();var Be=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Pt=class extends Be{items=[];addItem(t){return this.items.push(new gn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Se("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Tt=class e extends Be{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Pt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Se("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();u();p();m();d();l();var re=class extends Be{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Se(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();u();p();m();d();l();var sr=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(xt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function fn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":hp(e,t);break;case"IncludeOnScalar":wp(e,t);break;case"EmptySelection":bp(e,t,r);break;case"UnknownSelectionField":Tp(e,t);break;case"InvalidSelectionValue":vp(e,t);break;case"UnknownArgument":Ap(e,t);break;case"UnknownInputField":Rp(e,t);break;case"RequiredArgumentMissing":Cp(e,t);break;case"InvalidArgumentType":Sp(e,t);break;case"InvalidArgumentValue":Ip(e,t);break;case"ValueTooLarge":kp(e,t);break;case"SomeFieldsMissing":Op(e,t);break;case"TooManyFieldsGiven":Dp(e,t);break;case"Union":Ls(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function hp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function wp(e,t){let[r,n]=vt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new we(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ar(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function bp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Ep(e,t,i);return}if(n.hasField("select")){xp(e,t);return}}if(r?.[qe(e.outputType.name)]){Pp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Ep(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new we(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function xp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Qs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ar(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Pp(e,t){let r=new sr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new we("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=vt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Tt;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Tp(e,t){let r=Hs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Qs(n,e.outputType);break;case"include":_p(n,e.outputType);break;case"omit":Mp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ar(n)),i.join(" ")})}function vp(e,t){let r=Hs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ap(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Np(n,e.arguments)),t.addErrorMessage(i=>Bs(i,r,e.arguments.map(o=>o.name)))}function Rp(e,t){let[r,n]=vt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Gs(o,e.inputType)}t.addErrorMessage(o=>Bs(o,n,e.inputType.fields.map(s=>s.name)))}function Bs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Up(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ar(e)),n.join(" ")}function Cp(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=vt(e.argumentPath),s=new sr,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new we(o,s).makeRequired())}else{let f=e.inputTypes.map(js).join(" | ");a.addSuggestion(new we(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=vt(e.dependentArgumentPath);t.addErrorMessage(w=>`Argument \`${w.green(o)}\` is required because argument \`${w.green(f)}\` was provided.`)}}}function js(e){return e.kind==="list"?`${js(e.elementType)}[]`:e.name}function Sp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=wn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Ip(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=wn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function kp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof re&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Op(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Gs(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${wn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ar(i)),o.join(" ")})}function Dp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${wn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Qs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,"true"))}function _p(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new we(r.name,"true"))}function Mp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new we(r.name,"true"))}function Np(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function Hs(e,t){let[r,n]=vt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Gs(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new we(r.name,r.typeNames.join(" | ")))}function vt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ar({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function wn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Lp=3;function Up(e,t){let r=1/0,n;for(let i of t){let o=(0,qs.default)(e,i);o>Lp||o`}};function At(e){return e instanceof lr}c();u();p();m();d();l();var bn=Symbol(),Oi=new WeakMap,Ne=class{constructor(t){t===bn?Oi.set(this,`Prisma.${this._getName()}`):Oi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Oi.get(this)}},cr=class extends Ne{_getNamespace(){return"NullTypes"}},ur=class extends cr{#t};Di(ur,"DbNull");var pr=class extends cr{#t};Di(pr,"JsonNull");var mr=class extends cr{#t};Di(mr,"AnyNull");var En={classes:{DbNull:ur,JsonNull:pr,AnyNull:mr},instances:{DbNull:new ur(bn),JsonNull:new pr(bn),AnyNull:new mr(bn)}};function Di(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();u();p();m();d();l();var Js=": ",xn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Js.length}write(t){let r=new Se(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Js).write(this.value)}};var _i=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function Rt(e){return new _i(Ws(e))}function Ws(e){let t=new Tt;for(let[r,n]of Object.entries(e)){let i=new xn(r,Ks(n));t.addField(i)}return t}function Ks(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(bt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=mn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Ne?new re(`Prisma.${e._getName()}`):At(e)?new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Fp(e):typeof e=="object"?Ws(e):new re(Object.prototype.toString.call(e))}function Fp(e){let t=new Pt;for(let r of e)t.addItem(Ks(r));return t}function Pn(e,t){let r=t==="pretty"?Vs:hn,n=e.renderAllMessages(r),i=new Et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Tn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Rt(e);for(let R of t)fn(R,a,s);let{message:f,args:w}=Pn(a,r),A=dn({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:w});throw new ie(A,{clientVersion:o})}c();u();p();m();d();l();c();u();p();m();d();l();function Ie(e){return e.replace(/^./,t=>t.toLowerCase())}c();u();p();m();d();l();function Ys(e,t,r){let n=Ie(r);return!t.result||!(t.result.$allModels||t.result[n])?e:$p({...e,...zs(t.name,e,t.result.$allModels),...zs(t.name,e,t.result[n])})}function $p(e){let t=new Ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return pn(e,n=>({...n,needs:r(n.name,new Set)}))}function zs(e,t,r){return r?pn(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Vp(t,o,i)})):{}}function Vp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Zs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Xs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ce;modelExtensionsCache=new Ce;queryCallbacksCache=new Ce;clientExtensions=nr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=nr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ys(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ie(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Ct=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();u();p();m();d();l();var An=class{constructor(t){this.name=t}};function ea(e){return e instanceof An}function ta(e){return new An(e)}c();u();p();m();d();l();c();u();p();m();d();l();var ra=Symbol(),dr=class{constructor(t){if(t!==ra)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Rn:t}},Rn=new dr(ra);function ke(e){return e instanceof dr}var qp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},na="explicitly `undefined` values are not allowed";function Cn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Ct.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A}){let R=new Mi({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:w,globalOmit:A});return{modelName:e,action:qp[t],query:fr(r,R)}}function fr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:oa(r,n),selection:Bp(e,t,i,n)}}function Bp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Gp(e,n)):jp(n,t,r)}function jp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Qp(n,t,e),Hp(n,r,e),n}function Qp(e,t,r){for(let[n,i]of Object.entries(t)){if(ke(i))continue;let o=r.nestSelection(n);if(Ni(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=fr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=fr(i,o)}}function Hp(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Xs(i,n);for(let[s,a]of Object.entries(o)){if(ke(a))continue;Ni(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Gp(e,t){let r={},n=t.getComputedFields(),i=Zs(e,n);for(let[o,s]of Object.entries(i)){if(ke(s))continue;let a=t.nestSelection(o);Ni(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ke(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=fr({},a):r[o]=!0;continue}r[o]=fr(s,a)}}return r}function ia(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(wt(e)){if(mn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ea(e))return{$type:"Param",value:e.name};if(At(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Jp(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(Wp(e))return e.values;if(bt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ne){if(e!==En.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Kp(e))return e.toJSON();if(typeof e=="object")return oa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function oa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ke(i)||(i!==void 0?r[n]=ia(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:na}))}return r}function Jp(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[qe(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();u();p();m();d();l();function sa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var St=class{_client;constructor(t){this._client=t}prometheus(t){return sa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return sa(this._client),this._client._engine.metrics({format:"json",...t})}};c();u();p();m();d();l();function aa(e,t){let r=nr(()=>zp(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function zp(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();u();p();m();d();l();var Ui=new WeakMap,Sn="$$PrismaTypedSql",gr=class{constructor(t,r){Ui.set(this,{sql:t,values:r}),Object.defineProperty(this,Sn,{value:Sn})}get sql(){return Ui.get(this).sql}get values(){return Ui.get(this).values}};function la(e){return(...t)=>new gr(e,t)}function In(e){return e!=null&&e[Sn]===Sn}c();u();p();m();d();l();var eu=$e(Pi());c();u();p();m();d();l();ca();gs();xs();c();u();p();m();d();l();var fe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();u();p();m();d();l();c();u();p();m();d();l();var On={enumerable:!0,configurable:!0,writable:!0};function Dn(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>On,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ma=Symbol.for("nodejs.util.inspect.custom");function Pe(e,t){let r=Yp(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=da(Reflect.ownKeys(o),r),a=da(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...On,...f?.getPropertyDescriptor(s)}:On:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ma]=function(){let o={...this};return delete o[ma],o},i}function Yp(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function da(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();u();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();u();p();m();d();l();function kt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();u();p();m();d();l();function fa(e){if(e===void 0)return"";let t=Rt(e);return new Et(0,{colors:hn}).write(t).toString()}c();u();p();m();d();l();var Zp="P2037";function _n({error:e,user_facing_error:t},r,n){return t.error_code?new X(Xp(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ne(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Xp(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Zp&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Vi=class{getLocation(){return null}};function je(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Vi}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ga={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=tm(e);return Object.entries(t).reduce((n,[i,o])=>(ga[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function tm(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Mn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ya(e,t){let r=Mn(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}c();u();p();m();d();l();function rm(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function nm(e={}){return typeof e.select=="object"?t=>Mn(e)(t)._count:t=>Mn(e)(t)._count._all}function ha(e,t){return t({action:"count",unpacker:nm(e),argsMapper:rm})(e)}c();u();p();m();d();l();function im(e={}){let t=Ot(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function om(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function wa(e,t){return t({action:"groupBy",unpacker:om(e),argsMapper:im})(e)}function ba(e,t,r){if(t==="aggregate")return n=>ya(n,r);if(t==="count")return n=>ha(n,r);if(t==="groupBy")return n=>wa(n,r)}c();u();p();m();d();l();function Ea(e,t){let r=t.fields.filter(i=>!i.relationName),n=Os(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new lr(e,o,s.type,s.isList,s.kind==="enum")},...Dn(Object.keys(n))})}c();u();p();m();d();l();c();u();p();m();d();l();var xa=e=>Array.isArray(e)?e:e.split("."),qi=(e,t)=>xa(t).reduce((r,n)=>r&&r[n],e),Pa=(e,t,r)=>xa(t).reduceRight((n,i,o,s)=>Object.assign({},qi(e,s.slice(0,o)),{[i]:n}),r);function sm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function am(e,t,r){return t===void 0?e??{}:Pa(t,r,e||!0)}function Bi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,w)=>({...f,[w.name]:w}),{});return f=>{let w=je(e._errorFormat),A=sm(n,i),R=am(f,o,A),S=r({dataPath:A,callsite:w})(R),C=lm(e,t);return new Proxy(S,{get(L,k){if(!C.includes(k))return L[k];let De=[a[k].type,r,k],ue=[A,R];return Bi(e,...De,...ue)},...Dn([...C,...Object.getOwnPropertyNames(S)])})}}function lm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var cm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],um=["aggregate","count","groupBy"];function ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[pm(e,t),dm(e,t),yr(r),le("name",()=>t),le("$name",()=>t),le("$parent",()=>e._appliedParent)];return Pe({},n)}function pm(e,t){let r=Ie(t),n=Object.keys(ir).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let w=je(e._errorFormat);return e._createPrismaPromise(A=>{let R={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:w};return e._request({...R,...a})},{action:o,args:f,model:t})};return cm.includes(o)?Bi(e,t,s):mm(i)?ba(e,i,s):s({})}}}function mm(e){return um.includes(e)}function dm(e,t){return et(le("fields",()=>{let r=e._runtimeDataModel.models[t];return Ea(t,r)}))}c();u();p();m();d();l();function Ta(e){return e.replace(/^./,t=>t.toUpperCase())}var Qi=Symbol();function hr(e){let t=[fm(e),gm(e),le(Qi,()=>e),le("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(yr(r)),Pe(e,t)}function fm(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function gm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ie),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=Ta(i);if(e._runtimeDataModel.models[o]!==void 0)return ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function va(e){return e[Qi]?e[Qi]:e}function Aa(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return hr(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ra({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let w=f.needs.filter(A=>n[A]);w.length>0&&a.push(It(w))}else if(r){if(!r[f.name])continue;let w=f.needs.filter(A=>!r[A]);w.length>0&&a.push(It(w))}ym(e,f.needs)&&s.push(hm(f,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function ym(e,t){return t.every(r=>Ri(e,r))}function hm(e,t){return et(le(e.name,()=>e.compute(t)))}c();u();p();m();d();l();function Nn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let w=typeof s=="object"?s:{};t[o]=Nn({visitor:i,result:t[o],args:w,modelName:f.type,runtimeDataModel:n})}}function Sa({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Nn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,w)=>{let A=Ie(f);return Ra({result:a,modelName:A,select:w.select,omit:w.select?void 0:{...o?.[A],...w.omit},extensions:n})}})}c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();var wm=["$connect","$disconnect","$on","$transaction","$extends"],Ia=wm;function ka(e){if(e instanceof fe)return bm(e);if(In(e))return Em(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ka(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=La(o,f),a.args=s,Da(e,a,r,n+1)}})})}function _a(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Da(e,t,s)}function Ma(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Na(r,n,0,e):e(r)}}function Na(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=La(i,f),Na(a,t,r+1,n)}})}var Oa=e=>e;function La(e=Oa,t=Oa){return r=>e(t(r))}c();u();p();m();d();l();var Ua=K("prisma:client"),Fa={Vercel:"vercel","Netlify CI":"netlify"};function $a({postinstall:e,ciName:t,clientVersion:r,generator:n}){if(Ua("checkPlatformCaching:postinstall",e),Ua("checkPlatformCaching:ciName",t),e===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&t&&t in Fa){let i=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Fa[t]}-build`;throw console.error(i),new F(i,r)}}c();u();p();m();d();l();function Va(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function qa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}c();u();p();m();d();l();function Ba(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}c();u();p();m();d();l();var ja=$e(Ss());function Qa({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ja.default)({user:t,repo:r,template:n,title:e,body:i})}function Ha({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=ms(6e3-(s?.length??0)),f=Ba(ht(a)),w=n?`# Description +\`\`\` +${n} +\`\`\``:"",A=ht(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${g.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${w} + +## Logs +\`\`\` +${f} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?qa(s):""} +\`\`\` +`),R=Qa({title:r,body:A});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${tn(R)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();l();function $(e,t){throw new Error(t)}function Hi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Hi(e[r],t[r]))}function Dt(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(se.isDecimal(e[o])||se.isDecimal(t[o])){let s=Ga(e[o]),a=Ga(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Ja(e[o]),a=Ja(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Wa(e[o])?.getTime()===Wa(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return Ka(e[o])===Ka(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return za(e[o])===za(t[o])}return Hi(e[o],t[o])})}function Ga(e){return se.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new se(e):void 0}function Ja(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Wa(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function Ka(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function za(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function br(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():ArrayBuffer.isView(r)?y.from(r.buffer,r.byteOffset,r.byteLength).toString("base64"):r)}function xm(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Pm(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function Qe(e){return e===null?e:Array.isArray(e)?e.map(Qe):typeof e=="object"?xm(e)?Tm(e):e.constructor!==null&&e.constructor.name!=="Object"?e:Pm(e,Qe):e}function Tm({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new v(t);case"Json":return JSON.parse(t);default:$(t,"Unknown tagged value")}}c();u();p();m();d();l();var ce=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function _t(e){if(!nn(e))throw e;let t=vm(e),r=Ya(e);throw!t||!r?e:new ce(r,t,{driverAdapterError:e})}function Ji(e){throw nn(e)?new ce(`Raw query failed. Code: \`${e.cause.originalCode??"N/A"}\`. Message: \`${e.cause.originalMessage??Ya(e)}\``,"P2010",{driverAdapterError:e}):e}function vm(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Ya(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Gi(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Gi(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Gi(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Error in connector: Conversion error: ${e.cause.level}`;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:$(e.cause,`Unknown error: ${e.cause}`)}}function Gi(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}function Za(e,t){let r=e.map(i=>t.keys.reduce((o,s)=>(o[s]=Qe(i[s]),o),{})),n=new Set(t.nestedSelection);return t.arguments.map(i=>{let o=r.findIndex(s=>Dt(s,i));if(o===-1)return t.expectNonEmpty?new ce("An operation failed because it depends on one or more records that were required but not found","P2025"):null;{let s=Object.entries(e[o]).filter(([a])=>n.has(a));return Object.fromEntries(s)}})}c();u();p();m();d();l();l();var G=class extends Error{name="DataMapperError"};function el(e,t,r){switch(t.type){case"affectedRows":if(typeof e!="number")throw new G(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"object":return Ki(e,t.fields,r,t.skipNulls);case"field":return Wi(e,"",t.fieldType,r);default:$(t,`Invalid data mapping type: '${t.type}'`)}}function Ki(e,t,r,n){if(e===null)return null;if(Array.isArray(e)){let i=e;return n&&(i=i.filter(o=>o!==null)),i.map(o=>Xa(o,t,r))}if(typeof e=="object")return Xa(e,t,r);if(typeof e=="string"){let i;try{i=JSON.parse(e)}catch(o){throw new G("Expected an array or object, got a string that is not valid JSON",{cause:o})}return Ki(i,t,r,n)}throw new G(`Expected an array or an object, got: ${typeof e}`)}function Xa(e,t,r){if(typeof e!="object")throw new G(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"affectedRows":throw new G(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new G(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Ki(s,o.fields,r,o.skipNulls);break}case"field":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=Am(e[s],s,o.fieldType,r);else throw new G(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:$(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function Am(e,t,r,n){return e===null?r.arity==="list"?[]:null:r.arity==="list"?e.map((o,s)=>Wi(o,`${t}[${s}]`,r,n)):Wi(e,t,r,n)}function Wi(e,t,r,n){switch(r.type){case"unsupported":return e;case"string":{if(typeof e!="string")throw new G(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new G(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new G(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new G(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"bigint":{if(typeof e!="number"&&typeof e!="string")throw new G(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new G(`Expected a float in column '${t}', got string: ${e}`);return i}throw new G(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(Array.isArray(e)){for(let i of e)if(i!==0)return!0;return!1}throw new G(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"decimal":if(typeof e!="number"&&typeof e!="string"&&!se.isDecimal(e))throw new G(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"datetime":{if(typeof e=="string")return{$type:"DateTime",value:Cm(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new G(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"object":return{$type:"Json",value:br(e)};case"json":return{$type:"Json",value:`${e}`};case"bytes":{switch(r.encoding){case"base64":if(typeof e!="string")throw new G(`Expected a base64-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:e};case"hex":if(typeof e!="string"||!e.startsWith("\\x"))throw new G(`Expected a hex-encoded byte array in column '${t}', got ${typeof e}: ${e}`);return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};case"array":if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new G(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`);default:$(r.encoding,`DataMapper: Unknown bytes encoding: ${r.encoding}`)}break}case"enum":{let i=n[r.name];if(i===void 0)throw new G(`Unknown enum '${r.name}'`);let o=i[`${e}`];if(o===void 0)throw new G(`Value '${e}' not found in enum '${r.name}'`);return o}default:$(r,`DataMapper: Unknown result type: ${r.type}`)}}var Rm=/\d{2}:\d{2}:\d{2}(?:\.\d+)?(Z|[+-]\d{2}(:?\d{2})?)?$/;function Cm(e){let t=Rm.exec(e);if(t===null)return`${e}T00:00:00Z`;let r=e,[n,i,o]=t;if(i!==void 0&&i!=="Z"&&o===void 0?r=`${e}:00`:i===void 0&&(r=`${e}Z`),n.length===e.length)return`1970-01-01T${r}`;let s=t.index-1;return r[s]===" "&&(r=`${r.slice(0,s)}T${r.slice(s+1)}`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Er;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Er||(Er={}));function Sm(e){switch(e){case"postgresql":case"postgres":case"prisma+postgres":return"postgresql";case"sqlserver":return"mssql";case"mysql":case"sqlite":case"cockroachdb":case"mongodb":return e;default:$(e,`Unknown provider: ${e}`)}}async function Ln({query:e,tracingHelper:t,provider:r,onQuery:n,execute:i}){return await t.runInChildSpan({name:"db_query",kind:Er.CLIENT,attributes:{"db.query.text":e.sql,"db.system.name":Sm(r)}},async()=>{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var tl=$e(ys(),1);function Im(){try{return tl.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var rl=2,km=tt(g.pid.toString(36),rl),nl=Im(),Om=nl.length,Dm=tt(nl.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+Om+36).toString(36),rl);function zi(){return km+Dm}c();u();p();m();d();l();c();u();p();m();d();l();function Un(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function Yi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(Xt.getRandomValues(nt),Lt=0),Lt+=e}function so(e=21){Ed(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function vd(){return Cd()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function Ad(e,t){let r="";for(;e>0;e--)r=Pd(t)+r;return r}function Rd(e,t=Zl){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>zl)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${zl}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%Rr,n=Yl.charAt(r)+n,e=(e-r)/Rr;return n}function Cd(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Xl(e,t){let r=t||Td(),n=!e||isNaN(e)?Date.now():e;return Rd(n,Zl)+Ad(xd,r)}c();u();p();m();d();l();c();u();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function qn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}c();u();p();m();d();l();Xe();var jn=new Uint8Array(256),Bn=jn.length;function Ut(){return Bn>jn.length-16&&(sn(jn),Bn=0),jn.slice(Bn,Bn+=16)}c();u();p();m();d();l();c();u();p();m();d();l();Xe();var ao={randomUUID:on};function Sd(e,t,r){if(ao.randomUUID&&!t&&!e)return ao.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ut();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return qn(n)}var lo=Sd;c();u();p();m();d();l();var co={};function Id(e,t,r){let n;if(e)n=ec(e.random??e.rng?.()??Ut(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Ut();kd(co,i,o),n=ec(o,co.msecs,co.seq,t,r)}return t??qn(n)}function kd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ec(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var uo=Id;var Qn=class{#t={};constructor(){this.register("uuid",new mo),this.register("cuid",new fo),this.register("ulid",new go),this.register("nanoid",new yo),this.register("product",new ho)}snapshot(){return Object.create(this.#t,{now:{value:new po}})}register(t,r){this.#t[t]=r}},po=class{#t=new Date;generate(){return this.#t.toISOString()}},mo=class{generate(t){if(t===4)return lo();if(t===7)return uo();throw new Error("Invalid UUID generator arguments")}},fo=class{generate(t){if(t===1)return il();if(t===2)return(0,tc.createId)();throw new Error("Invalid CUID generator arguments")}},go=class{generate(){return Xl()}},yo=class{generate(t){if(typeof t=="number")return so(t);if(t===void 0)return so();throw new Error("Invalid Nanoid generator arguments")}},ho=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};c();u();p();m();d();l();function Hn(e,t){return e==null?e:typeof e=="string"?Hn(JSON.parse(e),t):Array.isArray(e)?Dd(e,t):Od(e,t)}function Od(e,t){if(t.pagination){let{skip:r,take:n,cursor:i}=t.pagination;if(r!==null&&r>0||n===0||i!==null&&!Dt(e,i))return null}return nc(e,t.nested)}function nc(e,t){for(let[r,n]of Object.entries(t))e[r]=Hn(e[r],n);return e}function Dd(e,t){if(t.distinct!==null){let r=t.linkingFields!==null?[...t.distinct,...t.linkingFields]:t.distinct;e=_d(e,r)}return t.pagination&&(e=Md(e,t.pagination,t.linkingFields)),t.reverse&&e.reverse(),Object.keys(t.nested).length===0?e:e.map(r=>nc(r,t.nested))}function _d(e,t){let r=new Set,n=[];for(let i of e){let o=Ft(i,t);r.has(o)||(r.add(o),n.push(i))}return n}function Md(e,t,r){if(r===null)return rc(e,t);let n=new Map;for(let o of e){let s=Ft(o,r);n.has(s)||n.set(s,[]),n.get(s).push(o)}let i=Array.from(n.entries());return i.sort(([o],[s])=>os?1:0),i.flatMap(([,o])=>rc(o,t))}function rc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>Dt(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Ft(e,t){return JSON.stringify(t.map(r=>e[r]))}c();u();p();m();d();l();c();u();p();m();d();l();function wo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function bo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function Po(e,t,r,n){let i=e.args.map(o=>Te(o,t,r));switch(e.type){case"rawSql":return[Ud(e.sql,i,e.argTypes)];case"templateSql":return(e.chunkable?$d(e.fragments,i,n):[i]).map(s=>{if(n!==void 0&&s.length>n)throw new ce("The query parameter limit supported by your database is exceeded.","P2029");return Nd(e.fragments,e.placeholderFormat,s,e.argTypes)});default:$(e.type,"Invalid query type")}}function Te(e,t,r){for(;Fd(e);)if(wo(e)){let n=t[e.prisma__value.name];if(n===void 0)throw new Error(`Missing value for query variable ${e.prisma__value.name}`);e=n}else if(bo(e)){let{name:n,args:i}=e.prisma__value,o=r[n];if(!o)throw new Error(`Encountered an unknown generator '${n}'`);e=o.generate(...i.map(s=>Te(s,t,r)))}else $(e,`Unexpected unevaluated value type: ${e}`);return Array.isArray(e)&&(e=e.map(n=>Te(n,t,r))),e}function Nd(e,t,r,n){let i="",o={placeholderNumber:1},s=[],a=[];for(let f of xo(e,r,n)){if(i+=Ld(f,t,o),f.type==="stringChunk")continue;let w=s.length,A=s.push(...ic(f))-w;if(f.argType.arity==="tuple"){if(A%f.argType.elements.length!==0)throw new Error(`Malformed query template. Expected the number of parameters to match the tuple arity, but got ${A} parameters for a tuple of arity ${f.argType.elements.length}.`);for(let R=0;REo(t,r.placeholderNumber++)).join(",")})`;case"parameterTupleList":return e.value.map(i=>{let o=i.map(()=>Eo(t,r.placeholderNumber++)).join(e.itemSeparator);return`${e.itemPrefix}${o}${e.itemSuffix}`}).join(e.groupSeparator);default:$(n,"Invalid fragment type")}}function Eo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function Ud(e,t,r){return{sql:e,args:t,argTypes:r}}function Fd(e){return wo(e)||bo(e)}function*xo(e,t,r){let n=0;for(let i of e)switch(i.type){case"parameter":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);yield{...i,value:t[n],argType:r?.[n]},n++;break}case"stringChunk":{yield i;break}case"parameterTuple":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];yield{...i,value:Array.isArray(o)?o:[o],argType:r?.[n]},n++;break}case"parameterTupleList":{if(n>=t.length)throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`);let o=t[n];if(!Array.isArray(o))throw new Error("Malformed query template. Tuple list expected.");if(o.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");for(let s of o)if(!Array.isArray(s))throw new Error("Malformed query template. Tuple expected.");yield{...i,value:o,argType:r?.[n]},n++;break}}}function*ic(e){switch(e.type){case"parameter":yield e.value;break;case"stringChunk":break;case"parameterTuple":yield*e.value;break;case"parameterTupleList":for(let t of e.value)yield*t;break}}function $d(e,t,r){let n=0,i=0;for(let s of xo(e,t,void 0)){let a=0;for(let f of ic(s))a++;i=Math.max(i,a),n+=a}let o=[[]];for(let s of xo(e,t,void 0))switch(s.type){case"parameter":{for(let a of o)a.push(s.value);break}case"stringChunk":break;case"parameterTuple":{let a=s.value.length,f=[];if(r&&o.length===1&&a===i&&n>r&&n-af.map(A=>[...w,A]));break}case"parameterTupleList":{let a=s.value.reduce((R,S)=>R+S.length,0),f=[],w=[],A=0;for(let R of s.value)r&&o.length===1&&a===i&&w.length>0&&n-a+A+R.length>r&&(f.push(w),w=[],A=0),w.push(R),A+=R.length;w.length>0&&f.push(w),o=o.flatMap(R=>f.map(S=>[...R,S]));break}}return o}function Vd(e,t){let r=[];for(let n=0;nt.reduce((r,n,i)=>(r[e.columnNames[i]]=n,r),{}))}function sc(e){return{columns:e.columnNames,types:e.columnTypes.map(t=>qd(t)),rows:e.rows.map(t=>t.map((r,n)=>$t(r,e.columnTypes[n])))}}function $t(e,t){if(e===null)return null;switch(t){case O.Int32:switch(typeof e){case"number":return Math.trunc(e);case"string":return Math.trunc(Number(e));default:throw new Error(`Cannot serialize value of type ${typeof e} as Int32`)}case O.Int32Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`);return e.map(r=>$t(r,O.Int32));case O.Int64:switch(typeof e){case"number":return BigInt(Math.trunc(e));case"string":return e;default:throw new Error(`Cannot serialize value of type ${typeof e} as Int64`)}case O.Int64Array:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`);return e.map(r=>$t(r,O.Int64));case O.Json:switch(typeof e){case"string":return JSON.parse(e);default:throw new Error(`Cannot serialize value of type ${typeof e} as Json`)}case O.JsonArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`);return e.map(r=>$t(r,O.Json));case O.Bytes:if(Array.isArray(e))return new Uint8Array(e);throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`);case O.BytesArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`);return e.map(r=>$t(r,O.Bytes));case O.Boolean:switch(typeof e){case"boolean":return e;case"string":return e==="true"||e==="1";case"number":return e===1;default:throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`)}case O.BooleanArray:if(!Array.isArray(e))throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`);return e.map(r=>$t(r,O.Boolean));default:return e}}function qd(e){switch(e){case O.Int32:return"int";case O.Int64:return"bigint";case O.Float:return"float";case O.Double:return"double";case O.Text:return"string";case O.Enum:return"enum";case O.Bytes:return"bytes";case O.Boolean:return"bool";case O.Character:return"char";case O.Numeric:return"decimal";case O.Json:return"json";case O.Uuid:return"uuid";case O.DateTime:return"datetime";case O.Date:return"date";case O.Time:return"time";case O.Int32Array:return"int-array";case O.Int64Array:return"bigint-array";case O.FloatArray:return"float-array";case O.DoubleArray:return"double-array";case O.TextArray:return"string-array";case O.EnumArray:return"string-array";case O.BytesArray:return"bytes-array";case O.BooleanArray:return"bool-array";case O.CharacterArray:return"char-array";case O.NumericArray:return"decimal-array";case O.JsonArray:return"json-array";case O.UuidArray:return"uuid-array";case O.DateTimeArray:return"datetime-array";case O.DateArray:return"date-array";case O.TimeArray:return"time-array";case O.UnknownNumber:return"unknown";case O.Set:return"string";default:$(e,`Unexpected column type: ${e}`)}}c();u();p();m();d();l();function ac(e,t,r){if(!t.every(n=>To(e,n))){let n=Bd(e,r),i=jd(r);throw new ce(n,i,r.context)}}function To(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:$(t,`Unknown rule type: ${t.type}`)}}function Bd(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:$(t,`Unknown error identifier: ${t}`)}}function jd(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:$(e,`Unknown error identifier: ${e}`)}}var Cr=class e{#t;#e;#r;#n=new Qn;#s;#i;#a;#o;#c;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a,connectionInfo:f}){this.#t=t,this.#e=r,this.#r=n,this.#s=i,this.#i=o,this.#a=s??o,this.#o=a,this.#c=f}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:oc,rawSerializer:sc,provider:t.provider,connectionInfo:t.connectionInfo})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#e,this.#n.snapshot()).catch(i=>_t(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:Te(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!lc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(vo(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>Oe(s)+Oe(a)):0}}case"execute":{let o=Po(t.args,n,i,this.#l()),s=0;for(let a of o)s+=await this.#u(a,r,()=>r.executeRaw(a).catch(f=>t.args.type==="rawSql"?Ji(f):_t(f)));return{value:s}}case"query":{let o=Po(t.args,n,i,this.#l()),s;for(let a of o){let f=await this.#u(a,r,()=>r.queryRaw(a).catch(w=>t.args.type==="rawSql"?Ji(w):_t(w)));s===void 0?s=f:(s.rows.push(...f.rows),s.lastInsertId=f.lastInsertId)}return{value:t.args.type==="rawSql"?this.#a(s):this.#i(s),lastInsertId:s?.lastInsertId}}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(lc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:cc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:Qd(o,a),lastInsertId:s}}case"transaction":{if(!this.#t.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#t.manager,s=await o.startInternalTransaction(),a=await o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:el(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return ac(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return To(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=w=>w!==null?Ft(Gn(w),t.args.fields):null,f=new Set(vo(s).map(a));return{value:vo(o).filter(w=>!f.has(a(w)))}}case"process":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:Hn(o,t.args.operations),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=Hd(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:Gn(o);for(let[f,w]of Object.entries(t.args.fields))a[f]=Gd(w,a[f],n,i);return{value:a,lastInsertId:s}}default:$(t,`Unexpected node type: ${t.type}`)}}#l(){return this.#c?.maxBindValues!==void 0?this.#c.maxBindValues:this.#p()}#p(){if(this.#o!==void 0)switch(this.#o){case"cockroachdb":case"postgres":case"postgresql":case"prisma+postgres":return 32766;case"mysql":return 65535;case"sqlite":return 999;case"sqlserver":return 2098;case"mongodb":return;default:$(this.#o,`Unexpected provider: ${this.#o}`)}}#u(t,r,n){return Ln({query:t,execute:n,provider:this.#o??r.provider,tracingHelper:this.#s,onQuery:this.#r})}};function lc(e){return Array.isArray(e)?e.length===0:e==null}function vo(e){return Array.isArray(e)?e:[e]}function Oe(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function Gn(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function cc(e,t){return Array.isArray(e)?e.map(r=>cc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function Qd(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=Gn(a),w=Ft(f,i);s[w]||(s[w]=[]),s[w].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Ft(Gn(a),o);for(let w of s[f]??[])r.isRelationUnique?w[r.parentField]=a:w[r.parentField].push(a)}}return e}function Hd(e,t,r,n){switch(e.type){case"value":return Te(e.value,r,n);case"lastInsertId":return t;default:$(e,`Unexpected field initializer type: ${e.type}`)}}function Gd(e,t,r,n){switch(e.type){case"set":return Te(e.value,r,n);case"add":return Oe(t)+Oe(Te(e.value,r,n));case"subtract":return Oe(t)-Oe(Te(e.value,r,n));case"multiply":return Oe(t)*Oe(Te(e.value,r,n));case"divide":{let i=Oe(t),o=Oe(Te(e.value,r,n));return o===0?null:i/o}default:$(e,`Unexpected field operation type: ${e.type}`)}}c();u();p();m();d();l();c();u();p();m();d();l();async function Jd(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),xi))}async function uc(){return(await Jd()).randomUUID()}c();u();p();m();d();l();var Ee=class extends ce{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Sr=class extends Ee{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},Jn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Wn=class extends Ee{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Kn=class extends Ee{constructor(){super("Unable to start a transaction in the given time.")}},zn=class extends Ee{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`,{operation:t,timeout:r,timeTaken:n})}},Vt=class extends Ee{constructor(t){super(`Internal Consistency Error: ${t}`)}},Yn=class extends Ee{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var Wd=100,Ir=K("prisma:client:transactionManager"),Kd=()=>({sql:"COMMIT",args:[],argTypes:[]}),zd=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),Yd=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),Zd=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),kr=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#t;#e;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#t=i,this.#e=o}async startInternalTransaction(t){let r=t!==void 0?this.#a(t):{};return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async startTransaction(t){let r=t!==void 0?this.#a(t):this.transactionOptions;return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(r))}async#r(t){let r={id:await uc(),status:"waiting",timer:void 0,timeout:t.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(r.id,r);let n=!1,i=pc(()=>n=!0,t.maxWait);switch(i?.unref?.(),r.transaction=await this.driverAdapter.startTransaction(t.isolationLevel).catch(_t),clearTimeout(i),r.status){case"waiting":if(n)throw await this.#i(r,"timed_out"),new Kn;return r.status="running",r.timer=this.#s(r.id,t.timeout),{id:r.id};case"timed_out":case"running":case"committed":case"rolled_back":throw new Vt(`Transaction in invalid state ${r.status} although it just finished startup.`);default:$(r.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.#n(t,"commit");await this.#i(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.#n(t,"rollback");await this.#i(r,"rolled_back")})}async getTransaction(t,r){let n=this.#n(t.id,r);if(n.status==="closing"&&(await n.closing,n=this.#n(t.id,r)),!n.transaction)throw new Sr;return n.transaction}#n(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Ir("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Vt("Active transaction found in closed transactions list.");case"committed":throw new Jn(r);case"rolled_back":throw new Wn(r);case"timed_out":throw new zn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Ir("Transaction not found.",t),new Sr}if(["committed","rolled_back","timed_out"].includes(n.status))throw new Vt("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.#i(t,"rolled_back")))}#s(t,r){let n=Date.now(),i=pc(async()=>{Ir("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let o=this.transactions.get(t);o&&["running","waiting"].includes(o.status)?await this.#i(o,"timed_out"):Ir("Transaction already committed or rolled back when timeout happened.",t)},r);return i?.unref?.(),i}async#i(t,r){let n=async()=>{Ir("Closing transaction.",{transactionId:t.id,status:r});try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#o(Yd(),t.transaction,()=>t.transaction.commit());else{let i=Kd();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#o(Zd(),t.transaction,()=>t.transaction.rollback());else{let i=zd();await this.#o(i,t.transaction,()=>t.transaction.executeRaw(i)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>Wd&&this.closedTransactions.shift()}};t.status==="closing"?(await t.closing,this.#n(t.id,r==="committed"?"commit":"rollback")):await Object.assign(t,{status:"closing",reason:r,closing:n()}).closing}#a(t){if(!t.timeout)throw new Ee("timeout is required");if(!t.maxWait)throw new Ee("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Yn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#o(t,r,n){return Ln({query:t,execute:n,provider:this.#e??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#t})}};function pc(e,t){return t!==void 0?setTimeout(e,t):void 0}var Zn="6.19.3";c();u();p();m();d();l();var Xn=class e{#t;#e;#r;#n;constructor(t,r,n){this.#t=t,this.#e=r,this.#r=n,this.#n=r.getConnectionInfo?.()}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new kr({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#n??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#e.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?await this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#e;return await Cr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#t.onQuery,tracingHelper:this.#t.tracingHelper,provider:this.#t.provider,connectionInfo:this.#n}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#e.dispose()}}apiKey(){return null}};c();u();p();m();d();l();c();u();p();m();d();l();var ei=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function mc(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ei.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!ei.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ei.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!ei.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!ef(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function ef(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function dc(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=tf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let w=f.split("="),A=(w.shift()||"").trimStart().toLowerCase(),R=w.join("=");switch(A){case"expires":{a.expires=new Date(R);break}case"max-age":{a.maxAge=Number.parseInt(R,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=R;break}default:a[A]=R}}return a}function tf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var rf=()=>globalThis.process?.release?.name==="node",nf=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,of=()=>!!globalThis.Deno,sf=()=>typeof globalThis.Netlify=="object",af=()=>typeof globalThis.EdgeRuntime=="object",lf=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function cf(){return[[sf,"netlify"],[af,"edge-light"],[lf,"workerd"],[of,"deno"],[nf,"bun"],[rf,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var uf={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ti(){let e=cf();return{id:e,prettyName:uf[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}function qt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw ti().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ri=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ge=class extends ri{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};c();u();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends ge{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};D(st,"InvalidDatasourceError");function ni(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=qt({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==ln)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Ti(i)?"http:":"https:";g.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(f="http:");let w=new URL(i.href.replace(o,f));return{apiKey:a,url:w}}c();u();p();m();d();l();var fc=$e(Ts()),Bt=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":fc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#t();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#t(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};c();u();p();m();d();l();function pf(e){return e[0]*1e3+e[1]/1e6}function jt(e){return new Date(pf(e))}var gc=K("prisma:client:clientEngine:remoteExecutor"),ii=class{#t;#e;#r;#n;#s;constructor(t){this.#t=t.clientVersion,this.#n=t.logEmitter,this.#s=t.tracingHelper;let{url:r,apiKey:n}=ni({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new Ao(r),this.#e=new Bt({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}apiKey(){return this.#e.apiKey}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#e.build(),body:n,fetch:i});s.ok||await this.#a(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#o(a.extensions),a}async#a(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new X(s,{clientVersion:this.#t,code:n??"P6000",batchRequestIdx:r,meta:a})}#o(t){if(t.logs)for(let r of t.logs)this.#c(r);t.traces&&this.#s.dispatchEngineSpans(t.traces)}#c(t){switch(t.level){case"debug":case"trace":gc(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:jt(t.timestamp),message:t.attributes.message??"",target:t.target??"RemoteExecutor"});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:jt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target??"RemoteExecutor"});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},Ao=class{#t;#e;#r;constructor(t){this.#t=t,this.#e=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#t),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s.href,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return gc(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#s(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#e){if(o.expires&&o.expires0?r.join("; "):void 0}#s(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=dc(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#e.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};c();u();p();m();d();l();var Ro={},yc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);let n;return e.activeProvider===void 0||Ro[e.activeProvider]===void 0?(n=(async()=>{let i=await r.getRuntime(),o=await r.getQueryCompilerWasmModule();if(o==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let s={"./query_compiler_bg.js":i},a=new WebAssembly.Instance(o,s),f=a.exports.__wbindgen_start;return i.__wbg_set_wasm(a.exports),f(),i.QueryCompiler})(),e.activeProvider!==void 0&&(Ro[e.activeProvider]=n)):n=Ro[e.activeProvider],await n}};var mf="P2038",Or=K("prisma:client:clientEngine"),wc=globalThis;wc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new ae(e,Zn)}};var Dr=class{name="ClientEngine";#t;#e={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#s;constructor(t,r,n){if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},Or("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,mf);this.#r=n??yc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#s=i=>{this.logEmitter.emit("query",{...i,params:br(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#e.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#a(),n=await this.#o(r)}catch(o){throw this.#e={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#e={type:"connected",engine:i},i});return this.#e={type:"connecting",promise:t},await t}case"connecting":return await this.#e.promise;case"connected":return this.#e.engine;case"disconnecting":return await this.#e.promise,await this.#i()}}async#a(){return this.#n.remote?new ii({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await Xn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#s,provider:this.config.activeProvider})}async#o(t){let r=this.#t;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#t=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#u(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#c(o)}}#c(t){if(t instanceof ae)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#l(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new ae(hc(this,t.message,r),this.config.clientVersion);if(t instanceof ce)return new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ne(`${n.message} +${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#p(t){return t instanceof ae?t:typeof t.message=="string"&&typeof t.code=="string"?new X(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):typeof t.message=="string"?new ne(t.message,{clientVersion:this.config.clientVersion}):t}#u(t,r,n=!0){let i=wc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#t=void 0,n&&this.stop().catch(s=>Or("failed to disconnect:",s)),new ae(hc(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#e.type){case"disconnected":return;case"connecting":return await this.#e.promise,await this.stop();case"connected":{let t=this.#e.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#e={type:"disconnected"}}});return this.#e={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#e.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Me(t,"Invalid transaction action.")}catch(s){throw this.#l(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){Or("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#l(f,i)}),a;try{a=this.#u(()=>this.#d({queries:[t],execute:()=>s.compile(i)}))}catch(f){throw this.#p(f)}try{Or("query plan created",a);let f={},w=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return Or("query plan executed"),{data:{[t.action]:w}}}catch(f){throw this.#l(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(kt(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(w=>{throw this.#l(w,o)}),f;try{f=this.#u(()=>this.#d({queries:t,execute:()=>a.compileBatch(o)}))}catch(w){throw this.#p(w)}try{let w;r?.kind==="itx"&&(w=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let C=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;w=await this.transaction("start",{},C)}let R=[],S=!1;for(let[C,L]of f.plans.entries())try{let k=await s.execute({plan:L,placeholderValues:A,model:t[C].modelName,operation:t[C].action,batchIndex:C,transaction:w,customFetch:n?.(globalThis.fetch)});R.push({data:{[t[C].action]:k}})}catch(k){R.push(k),S=!0;break}return w!==void 0&&r?.kind!=="itx"&&(S?await this.transaction("rollback",{},w):await this.transaction("commit",{},w)),R}case"compacted":{if(!t.every(C=>C.action===i))throw new Error("All queries in a batch must have the same action");let R=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:w,customFetch:n?.(globalThis.fetch)});return Za(R,f).map(C=>({data:{[i]:C}}))}}}catch(w){throw this.#l(w,o)}}metrics(t){throw new Error("Method not implemented.")}async apiKey(){let{executor:t}=await this.#i();return t.apiKey()}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}#d({queries:t,execute:r}){return this.tracingHelper.runInChildSpan({name:"compile",attributes:{models:t.map(n=>n.modelName).filter(n=>n!==void 0),actions:t.map(n=>n.action)}},r)}};function hc(e,t,r){return Ha({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}c();u();p();m();d();l();c();u();p();m();d();l();var Qt=class extends ge{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};D(Qt,"ForcedRetryError");c();u();p();m();d();l();var at=class extends ge{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};D(at,"NotImplementedYetError");c();u();p();m();d();l();c();u();p();m();d();l();var Q=class extends ge{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends Q{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};D(lt,"SchemaMissingError");c();u();p();m();d();l();c();u();p();m();d();l();var Co="This request could not be understood by the server",_r=class extends Q{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Co,N(t,!1)),n&&(this.code=n)}};D(_r,"BadRequestError");c();u();p();m();d();l();var Mr=class extends Q{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};D(Mr,"HealthcheckTimeoutError");c();u();p();m();d();l();var Nr=class extends Q{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};D(Nr,"EngineStartupError");c();u();p();m();d();l();var Lr=class extends Q{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};D(Lr,"EngineVersionNotSupportedError");c();u();p();m();d();l();var So="Request timed out",Ur=class extends Q{name="GatewayTimeoutError";code="P5009";constructor(t,r=So){super(r,N(t,!1))}};D(Ur,"GatewayTimeoutError");c();u();p();m();d();l();var df="Interactive transaction error",Fr=class extends Q{name="InteractiveTransactionError";code="P5015";constructor(t,r=df){super(r,N(t,!1))}};D(Fr,"InteractiveTransactionError");c();u();p();m();d();l();var ff="Request parameters are invalid",$r=class extends Q{name="InvalidRequestError";code="P5011";constructor(t,r=ff){super(r,N(t,!1))}};D($r,"InvalidRequestError");c();u();p();m();d();l();var Io="Requested resource does not exist",Vr=class extends Q{name="NotFoundError";code="P5003";constructor(t,r=Io){super(r,N(t,!1))}};D(Vr,"NotFoundError");c();u();p();m();d();l();var ko="Unknown server error",Ht=class extends Q{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ko,N(t,!0)),this.logs=n}};D(Ht,"ServerError");c();u();p();m();d();l();var Oo="Unauthorized, check your connection string",qr=class extends Q{name="UnauthorizedError";code="P5007";constructor(t,r=Oo){super(r,N(t,!1))}};D(qr,"UnauthorizedError");c();u();p();m();d();l();var Do="Usage exceeded, retry again later",Br=class extends Q{name="UsageExceededError";code="P5008";constructor(t,r=Do){super(r,N(t,!0))}};D(Br,"UsageExceededError");async function gf(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function jr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await gf(e);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Nr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Mr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Fr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new $r(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new qr(r,Gt(Oo,n));if(e.status===404)return new Vr(r,Gt(Io,n));if(e.status===429)throw new Br(r,Gt(Do,n));if(e.status===504)throw new Ur(r,Gt(So,n));if(e.status>=500)throw new Ht(r,Gt(ko,n));if(e.status>=400)throw new _r(r,Gt(Co,n))}function Gt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}c();u();p();m();d();l();function bc(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}c();u();p();m();d();l();var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ec(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,w,A;for(let R=0;R>18,a=(A&258048)>>12,f=(A&4032)>>6,w=A&63,r+=Fe[s]+Fe[a]+Fe[f]+Fe[w];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=Fe[s]+Fe[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=Fe[s]+Fe[a]+Fe[f]+"="),r}c();u();p();m();d();l();function xc(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}c();u();p();m();d();l();var Pc={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};c();u();p();m();d();l();c();u();p();m();d();l();var Qr=class extends ge{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: +${t}`,N(r,!0))}};D(Qr,"RequestError");async function ct(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Qr(a,{clientVersion:n,cause:s})}}var hf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Tc=K("prisma:client:dataproxyEngine");async function wf(e,t){let r=Pc["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&hf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,w]=s.split("."),A=bf(`<=${a}.${f}.${w}`),R=await ct(A,{clientVersion:n});if(!R.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${R.status} ${R.statusText}, response body: ${await R.text()||""}`);let S=await R.text();Tc("length of body fetched from unpkg.com",S.length);let C;try{C=JSON.parse(S)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",S),L}return C.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function vc(e,t){let r=await wf(e,t);return Tc("version",r),r}function bf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ac=3,Hr=K("prisma:client:dataproxyEngine"),Gr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){xc(t),this.config=t,this.env=t.env,this.inlineSchema=Ec(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Bt({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await vc(this.host,this.config),Hr("host",this.host),Hr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Hr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:jt(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:jt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hr("schema response status",r.status);let n=await jr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=kt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hr("graphql response status",a.status),await this.handleError(await jr(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await jr(f,this.clientVersion));let w=await f.json(),{extensions:A}=w;A&&this.propagateResponseExtensions(A);let R=w.id,S=w["data-proxy"].endpoint;return{id:R,payload:{endpoint:S}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await jr(a,this.clientVersion));let f=await a.json(),{extensions:w}=f;w&&this.propagateResponseExtensions(w);return}}})}getURLAndAPIKey(){return ni({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ge)||!i.isRetryable)throw i;if(r>=Ac)throw i instanceof Qt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ac} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await bc(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new Qt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?_n(t[0],this.config.clientVersion,this.config.activeProvider):new ne(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};c();u();p();m();d();l();function Rc({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` +`);o.push({_tag:"error",value:M})},f=!!e?.startsWith("prisma://"),w=cn(e),A=!!t,R=f||w;!A&&r&&R&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let S=R||!r;A&&(S||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):R?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let C={accelerate:S,ppg:w,driverAdapters:A};function L(k){return k.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:C}:{ok:!0,diagnostics:{warnings:i},isUsing:C}}function Cc({copyEngine:e=!0},t){let r;try{r=qt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Rc({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let R of o.warnings)rr(...R.value);if(!n){let R=o.errors[0];throw new ie(R.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",w=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;return w?new Dr(t,A):i.accelerate?new Gr(t):(i.driverAdapters,new _o({clientVersion:t.clientVersion}))}var _o=class{constructor(t){return new Proxy(this,{get(r,n){let i=`In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters`;throw new ie(i,t)}})}};c();u();p();m();d();l();function Sc({generator:e}){return e?.previewFeatures??[]}c();u();p();m();d();l();var Ic=e=>({command:e});c();u();p();m();d();l();c();u();p();m();d();l();var kc=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();u();p();m();d();l();l();function Jt(e){try{return Oc(e,"fast")}catch{return Oc(e,"slow")}}function Oc(e,t){return JSON.stringify(e.map(r=>_c(r,t)))}function _c(e,t){if(Array.isArray(e))return e.map(r=>_c(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(wt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(se.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Ef(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Mc(e):e}function Ef(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Mc(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Dc);let t={};for(let r of Object.keys(e))t[r]=Dc(e[r]);return t}function Dc(e){return typeof e=="bigint"?e.toString():Mc(e)}var xf=/^(\s*alter\s)/i,Nc=K("prisma:client");function Mo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&xf.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var No=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(In(r))n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Jt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Jt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=kc(r),i={values:Jt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Nc(`prisma.${e}(${n}, ${i.values})`):Nc(`prisma.${e}(${n})`),{query:n,parameters:i}},Lc={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new fe(t,r)}},Uc={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();u();p();m();d();l();function Lo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Fc(r(s)):Fc(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Fc(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();u();p();m();d();l();var Pf=Ei.split(".")[0],Tf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Uo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Pf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Tf}};function $c(){return new Uo}c();u();p();m();d();l();function Vc(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();u();p();m();d();l();function qc(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();u();p();m();d();l();c();u();p();m();d();l();function oi(e){return typeof e.batchRequestIdx=="number"}c();u();p();m();d();l();function Bc(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Fo(e.query.arguments)),t.push(Fo(e.query.selection)),t.join("")}function Fo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Fo(n)})`:r}).join(" ")})`}c();u();p();m();d();l();var vf={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function $o(e){return vf[e]}c();u();p();m();d();l();var si=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iut("bigint",r));case"bytes-array":return t.map(r=>ut("bytes",r));case"decimal-array":return t.map(r=>ut("decimal",r));case"datetime-array":return t.map(r=>ut("datetime",r));case"date-array":return t.map(r=>ut("date",r));case"time-array":return t.map(r=>ut("time",r));default:return t}}function ai(e){let t=[],r=Af(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),w=n.some(R=>$o(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Cf(o),containsWrite:w,customDataProxyFetch:i})).map((R,S)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[S],R)}catch(C){return C}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?jc(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:$o(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Bc(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Rf(t),Sf(t,i))throw t;if(t instanceof X&&If(t)){let w=Qc(t.meta);Tn({args:o,errors:[w],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=dn({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let w=s?{modelName:s,...t.meta}:t.meta;throw new X(f,{code:t.code,clientVersion:this.client._clientVersion,meta:w,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ae(f,this.client._clientVersion);if(t instanceof ne)throw new ne(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof ae)throw new ae(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?ht(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(w=>w!=="select"&&w!=="include"),a=qi(o,s),f=i==="queryRaw"?ai(a):Qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Cf(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:jc(e)};Me(e,"Unknown transaction kind")}}function jc(e){return{id:e.id,payload:e.payload}}function Sf(e,t){return oi(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function If(e){return e.code==="P2009"||e.code==="P2012"}function Qc(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qc)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();u();p();m();d();l();var Hc=Zn;c();u();p();m();d();l();var zc=$e(Ii());c();u();p();m();d();l();var V=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};D(V,"PrismaClientConstructorValidationError");var Gc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Jc=["pretty","colorless","minimal"],Wc=["info","query","warn","error"],kf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Wt(r,t)||` Available datasources: ${t.join(", ")}`;throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new V(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e!==null){if(e===void 0)throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(gt(t.generator)==="binary")throw new V('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Jc.includes(e)){let t=Wt(e,Jc);throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Wc.includes(r)){let n=Wt(r,Wc);throw new V(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Wt(i,o);throw new V(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new V(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new V(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new V(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new V('"omit" option is expected to be an object.');if(e===null)throw new V('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Df(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(w=>w.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new V(_f(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Wt(r,t);throw new V(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Yc(e,t){for(let[r,n]of Object.entries(e)){if(!Gc.includes(r)){let i=Wt(r,Gc);throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}kf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Wt(e,t){if(t.length===0||typeof e!="string")return"";let r=Of(e,t);return r?` Did you mean "${r}"?`:""}function Of(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,zc.default)(e,i)}));r.sort((i,o)=>i.distanceqe(n)===t);if(r)return e[r]}function _f(e,t){let r=Rt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Pn(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}c();u();p();m();d();l();function Zc(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=w=>{o||(o=!0,r(w))};for(let w=0;w{n[w]=A,a()},A=>{if(!oi(A)){f(A);return}A.batchRequestIdx===w?f(A):(i||(i=A),a())})})}var We=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Mf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Nf=Symbol.for("prisma.client.transaction.id"),Lf={id:0,nextId(){return++this.id}};function tu(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Lo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,$a(e),n&&Yc(n,e);let i=new kn().on("error",()=>{});this._extensions=Ct.empty(),this._previewFeatures=Sc(e),this._clientVersion=e.clientVersion??Hc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$c();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&rn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},w=f.__internal??{},A=w.debug===!0;A&&K.enable("prisma:client");let R=rn.resolve(e.dirname,e.relativePath);fs.existsSync(R)||(R=e.dirname),We("dirname",e.dirname),We("relativePath",e.relativePath),We("cwd",R);let S=w.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:R,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:S.allowTriggerPanic,prismaPath:S.binaryPath??void 0,engineEndpoint:S.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&qc(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Va(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:qt,getBatchRequestPayload:kt,prismaGraphQLToJSError:_n,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:F,PrismaClientKnownRequestError:X,debug:K("prisma:client:accelerateEngine"),engineVersion:eu.version,clientVersion:e.clientVersion}},We("clientVersion",e.clientVersion),this._engine=Cc(e,this._engineConfig),this._requestHandler=new li(this,i),f.log)for(let C of f.log){let L=typeof C=="string"?C:C.emit==="stdout"?C.level:null;L&&this.$on(L,k=>{tr.log(`${tr.tags[L]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=hr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ds()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:No({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Xc(n,i);return Mo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Mo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ic,callsite:je(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:No({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Xc(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Lf.nextId(),s=Vc(n.length),a=n.map((f,w)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:w,isolationLevel:A,lock:s};return f.requestTransaction?.(R)??f});return Zc(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let w={kind:"itx",...a};f=await n(this._createItxClient(w)),await this._engine.transaction("commit",o,a)}catch(w){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),w}return f}_createItxClient(n){return Pe(hr(Pe(va(this),[le("_appliedParent",()=>this._appliedParent._createItxClient(n)),le("_createPrismaPromise",()=>Lo(n)),le(Nf,()=>n.id)])),[It(Ia)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Mf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:w,args:A,...R}=f,S={...n,...R};A&&(S.args=i.middlewareArgsToRequestArgs(A)),n.transaction!==void 0&&w===!1&&delete S.transaction;let C=await _a(this,S);return S.model?Sa({result:C,modelName:S.model,args:S.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):C};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:w,transaction:A,unpacker:R,otelParentCtx:S,customDataProxyFetch:C}){try{n=w?w(n):n;let L={name:"serialize"},k=this._tracingHelper.runInChildSpan(L,()=>Cn({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return K.enabled("prisma:client")&&(We("Prisma Client call:"),We(`prisma.${i}(${fa(n)})`),We("Generated request:"),We(JSON.stringify(k,null,2)+` +`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:R,otelParentCtx:S,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:C})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new St(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Aa}return t}function Xc(e,t){return Uf(e)?[new fe(e,t),Lc]:[e,Uc]}function Uf(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();u();p();m();d();l();var Ff=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ru(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Ff.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();u();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/lib/generated/prisma/runtime/wasm-engine-edge.js b/lib/generated/prisma/runtime/wasm-engine-edge.js new file mode 100644 index 0000000..c68f35f --- /dev/null +++ b/lib/generated/prisma/runtime/wasm-engine-edge.js @@ -0,0 +1,38 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +"use strict";var Vs=Object.create;var nr=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var js=Object.getPrototypeOf,Qs=Object.prototype.hasOwnProperty;var ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ht=(t,e)=>{for(var r in e)nr(t,r,{get:e[r],enumerable:!0})},Hn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $s(e))!Qs.call(t,i)&&i!==r&&nr(t,i,{get:()=>e[i],enumerable:!(n=Bs(e,i))||n.enumerable});return t};var bt=(t,e,r)=>(r=t!=null?Vs(js(t)):{},Hn(e||!t||!t.__esModule?nr(r,"default",{value:t,enumerable:!0}):r,t)),Gs=t=>Hn(nr({},"__esModule",{value:!0}),t);function Kr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new y(Hs.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new y([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new y(t.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(v=0){return J(v,"offset"),re(v,"offset"),K(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,R=0){let A=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),I=Ks[A];return J(R,"offset"),re(R,"offset"),K(R,"offset",this.length-1),Ws(v,"value",I[0],I[1]),new DataView(this.buffer)[r[a]](R,v,f),R+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function Yn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function ir(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function K(t,e,r=Xs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function J(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function re(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Ws(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function zn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Zs(t,e="utf8"){return y.from(t,e)}var y,Ks,Hs,zs,Ys,Xs,h,Hr,u=ae(()=>{"use strict";y=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return zn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Kr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return Ys.includes(e)}static compare(e,r){ir(e,"buff1"),ir(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Kr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){J(e,"offset"),re(e,"offset"),K(e,"offset",this.length-1),J(r,"byteLength"),re(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){J(r,"offset"),re(r,"offset"),K(r,"offset",this.length-1),J(n,"byteLength"),re(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){K(r,"targetStart"),K(n,"sourceStart",this.length),K(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,v)=>(i?v<=a:v>=a)&&this[v]===s[0]&&s.every((A,I)=>this[v+I]===A))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return zs.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+Hr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+Hr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");Yn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Ks={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Hs=new TextEncoder,zs=new TextDecoder,Ys=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Xs=4294967295;Js(y.prototype);h=new Proxy(Zs,{construct(t,[e,r]){return y.from(e,r)},get(t,e){return y[e]}}),Hr=String.fromCodePoint});var g,w,c=ae(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:w}=g});var x,p=ae(()=>{"use strict";x=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,m=ae(()=>{"use strict";E=()=>{};E.prototype=E});var b,d=ae(()=>{"use strict";b=class{value;constructor(e){this.value=e}deref(){return this.value}}});function ti(t,e){var r,n,i,o,s,a,f,v,R=t.constructor,A=R.precision;if(!t.s||!e.s)return e.s||(e=new R(t)),$?N(e,A):e;if(f=t.d,v=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(A/B),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/H|0,f[o]%=H;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,$?N(e,A):e}function de(t,e,r){if(t!==~~t||tr)throw Error(_e+t)}function me(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Yr+W(t));if(!t.s)return new R(oe);for(e==null?($=!1,a=A):a=e,s=new R(.03125);t.abs().gte(.1);)t=t.times(s),v+=5;for(n=Math.log(ke(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new R(oe),R.precision=a;;){if(i=N(i.times(t),a),r=r.times(++f),s=o.plus(we(i,r,a)),me(s.d).slice(0,a)===me(o.d).slice(0,a)){for(;v--;)o=N(o.times(o),a);return R.precision=A,e==null?($=!0,N(o,A)):o}o=s}}function W(t){for(var e=t.e*B,r=t.d[0];r>=10;r/=10)e++;return e}function zr(t,e,r){if(e>t.LN10.sd())throw $=!0,r&&(t.precision=r),Error(le+"LN10 precision limit exceeded");return N(new t(t.LN10),e)}function Ae(t){for(var e="";t--;)e+="0";return e}function Et(t,e){var r,n,i,o,s,a,f,v,R,A=1,I=10,C=t,L=C.d,D=C.constructor,k=D.precision;if(C.s<1)throw Error(le+(C.s?"NaN":"-Infinity"));if(C.eq(oe))return new D(0);if(e==null?($=!1,v=k):v=e,C.eq(10))return e==null&&($=!0),zr(D,v);if(v+=I,D.precision=v,r=me(L),n=r.charAt(0),o=W(C),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)C=C.times(t),r=me(C.d),n=r.charAt(0),A++;o=W(C),n>1?(C=new D("0."+r),o++):C=new D(n+"."+r.slice(1))}else return f=zr(D,v+2,k).times(o+""),C=Et(new D(n+"."+r.slice(1)),v-I).plus(f),D.precision=k,e==null?($=!0,N(C,k)):C;for(a=s=C=we(C.minus(oe),C.plus(oe),v),R=N(C.times(C),v),i=3;;){if(s=N(s.times(R),v),f=a.plus(we(s,new D(i),v)),me(f.d).slice(0,v)===me(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(zr(D,v+2,k).times(o+""))),a=we(a,new D(A),v),D.precision=k,e==null?($=!0,N(a,k)):a;a=f,i+=2}}function Xn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Qe(r/B),t.d=[],n=(r+1)%B,r<0&&(n+=B),nor||t.e<-or))throw Error(Yr+r)}else t.s=0,t.e=0,t.d=[0];return t}function N(t,e,r){var n,i,o,s,a,f,v,R,A=t.d;for(s=1,o=A[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=B,i=e,v=A[R=0];else{if(R=Math.ceil((n+1)/B),o=A.length,R>=o)return t;for(v=o=A[R],s=1;o>=10;o/=10)s++;n%=B,i=n-B+s}if(r!==void 0&&(o=ke(10,s-i-1),a=v/o%10|0,f=e<0||A[R+1]!==void 0||v%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?v/ke(10,s-i):0:A[R-1])%10&1||r==(t.s<0?8:7))),e<1||!A[0])return f?(o=W(t),A.length=1,e=e-o-1,A[0]=ke(10,(B-e%B)%B),t.e=Qe(-e/B)||0):(A.length=1,A[0]=t.e=t.s=0),t;if(n==0?(A.length=R,o=1,R--):(A.length=R+1,o=ke(10,B-n),A[R]=i>0?(v/ke(10,s-i)%ke(10,i)|0)*o:0),f)for(;;)if(R==0){(A[0]+=o)==H&&(A[0]=1,++t.e);break}else{if(A[R]+=o,A[R]!=H)break;A[R--]=0,o=1}for(n=A.length;A[--n]===0;)A.pop();if($&&(t.e>or||t.e<-or))throw Error(Yr+W(t));return t}function ni(t,e){var r,n,i,o,s,a,f,v,R,A,I=t.constructor,C=I.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new I(t),$?N(e,C):e;if(f=t.d,A=e.d,n=e.e,v=t.e,f=f.slice(),s=v-n,s){for(R=s<0,R?(r=f,s=-s,a=A.length):(r=A,n=v,a=f.length),i=Math.max(Math.ceil(C/B),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=A.length,R=i0;--i)f[a++]=0;for(i=A.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ae(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ae(-i-1)+o,r&&(n=r-s)>0&&(o+=Ae(n))):i>=s?(o+=Ae(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ae(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ae(n))),t.s<0?"-"+o:o}function Zn(t,e){if(t.length>e)return t.length=e,!0}function ii(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(_e+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Xn(s,o.toString())}else if(typeof o!="string")throw Error(_e+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ta.test(o))Xn(s,o);else throw Error(_e+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=ii,i.config=i.set=ra,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(_e+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(_e+r+": "+n);return this}var je,ea,Xr,$,le,_e,Yr,Qe,ke,ta,oe,H,B,ei,or,S,we,Xr,sr,oi=ae(()=>{"use strict";u();c();p();m();d();l();je=1e9,ea={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},$=!0,le="[DecimalError] ",_e=le+"Invalid argument: ",Yr=le+"Exponent out of range: ",Qe=Math.floor,ke=Math.pow,ta=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,H=1e7,B=7,ei=9007199254740991,or=Qe(ei/B),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*B;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return we(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return N(we(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return W(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(oe))throw Error(le+"NaN");if(r.s<1)throw Error(le+(r.s?"NaN":"-Infinity"));return r.eq(oe)?new n(0):($=!1,e=we(Et(r,o),Et(t,o),o),$=!0,N(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?ni(e,t):ti(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(le+"NaN");return r.s?($=!1,e=we(r,t,0,1).times(t),$=!0,r.minus(e)):N(new n(r),i)};S.naturalExponential=S.exp=function(){return ri(this)};S.naturalLogarithm=S.ln=function(){return Et(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?ti(e,t):ni(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(_e+t);if(e=W(i)+1,n=i.d.length-1,r=n*B+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(le+"NaN")}for(t=W(a),$=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=me(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Qe((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(we(a,o,s+2)).times(.5),me(o.d).slice(0,s)===(e=me(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(N(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return $=!0,N(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,v,R=this,A=R.constructor,I=R.d,C=(t=new A(t)).d;if(!R.s||!t.s)return new A(0);for(t.s*=R.s,r=R.e+t.e,f=I.length,v=C.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+C[n]*I[i-n-1]+e,o[i--]=a%H|0,e=a/H|0;o[i]=(o[i]+e)%H|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,$?N(t,A.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(de(t,0,je),e===void 0?e=n.rounding:de(e,0,8),N(r,t+W(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Me(n,!0):(de(t,0,je),e===void 0?e=i.rounding:de(e,0,8),n=N(new i(n),t+1,e),r=Me(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Me(i):(de(t,0,je),e===void 0?e=o.rounding:de(e,0,8),n=N(new o(i),t+W(i)+1,e),r=Me(n.abs(),!1,t+W(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return N(new e(t),W(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,v=12,R=+(t=new f(t));if(!t.s)return new f(oe);if(a=new f(a),!a.s){if(t.s<1)throw Error(le+"Infinity");return a}if(a.eq(oe))return a;if(n=f.precision,t.eq(oe))return N(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=R<0?-R:R)<=ei){for(i=new f(oe),e=Math.ceil(n/B+4),$=!1;r%2&&(i=i.times(a),Zn(i.d,e)),r=Qe(r/2),r!==0;)a=a.times(a),Zn(a.d,e);return $=!0,t.s<0?new f(oe).div(i):N(i,n)}}else if(o<0)throw Error(le+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,$=!1,i=t.times(Et(a,n+v)),$=!0,i=ri(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=W(i),n=Me(i,r<=o.toExpNeg||r>=o.toExpPos)):(de(t,1,je),e===void 0?e=o.rounding:de(e,0,8),i=N(new o(i),t,e),r=W(i),n=Me(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(de(t,1,je),e===void 0?e=n.rounding:de(e,0,8)),N(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=W(t),r=t.constructor;return Me(t,e<=r.toExpNeg||e>=r.toExpPos)};we=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%H|0,s=o/H|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,v,R,A,I,C,L,D,k,Ee,ee,U,te,Oe,Wr,ue,tr,rr=n.constructor,qs=n.s==i.s?1:-1,pe=n.d,G=i.d;if(!n.s)return new rr(n);if(!i.s)throw Error(le+"Division by zero");for(f=n.e-i.e,ue=G.length,Oe=pe.length,C=new rr(qs),L=C.d=[],v=0;G[v]==(pe[v]||0);)++v;if(G[v]>(pe[v]||0)&&--f,o==null?ee=o=rr.precision:s?ee=o+(W(n)-W(i))+1:ee=o,ee<0)return new rr(0);if(ee=ee/B+2|0,v=0,ue==1)for(R=0,G=G[0],ee++;(v1&&(G=t(G,R),pe=t(pe,R),ue=G.length,Oe=pe.length),te=ue,D=pe.slice(0,ue),k=D.length;k=H/2&&++Wr;do R=0,a=e(G,D,ue,k),a<0?(Ee=D[0],ue!=k&&(Ee=Ee*H+(D[1]||0)),R=Ee/Wr|0,R>1?(R>=H&&(R=H-1),A=t(G,R),I=A.length,k=D.length,a=e(A,D,I,k),a==1&&(R--,r(A,ue{"use strict";oi();P=class extends sr{static isDecimal(e){return e instanceof sr}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new sr(`0.${n.slice(0,e)}`)}}},xe=P});function la(){return!1}function nn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ua(){return nn()}function ca(){return[]}function pa(t){t(null,[])}function ma(){return""}function da(){return""}function fa(){}function ga(){}function ya(){}function ha(){}function ba(){}function Ea(){}function wa(){}function xa(){}function Pa(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ta(t,e){e(null,nn())}var va,Ra,Pi,Ti=ae(()=>{"use strict";u();c();p();m();d();l();va={},Ra={existsSync:la,lstatSync:nn,stat:Ta,statSync:ua,readdirSync:ca,readdir:pa,readlinkSync:ma,realpathSync:da,chmodSync:fa,renameSync:ga,mkdirSync:ya,rmdirSync:ha,rmSync:ba,unlinkSync:Ea,watchFile:wa,unwatchFile:xa,watch:Pa,promises:va},Pi=Ra});var vi=yt((Yp,Aa)=>{Aa.exports={name:"@prisma/internals",version:"6.19.3",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",empathic:"2.0.0","escape-string-regexp":"5.0.0",execa:"8.0.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","global-directory":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-engine-wasm":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});function Sa(...t){return t.join("/")}function Ia(...t){return t.join("/")}function Da(t){let e=Ri(t),r=Ai(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function Ri(t){let e=t.split("/");return e[e.length-1]}function Ai(t){return t.split("/").slice(0,-1).join("/")}function ka(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var Ci,Oa,_a,Ma,cr,Si=ae(()=>{"use strict";u();c();p();m();d();l();Ci="/",Oa=":";_a={sep:Ci},Ma={basename:Ri,delimiter:Oa,dirname:Ai,join:Ia,normalize:ka,parse:Da,posix:_a,resolve:Sa,sep:Ci},cr=Ma});var un=yt((ud,qa)=>{qa.exports={name:"@prisma/engines-version",version:"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"c2990dca591cba766e3b7ef5d9e8a84796e47ab7"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Di=yt(dr=>{"use strict";u();c();p();m();d();l();Object.defineProperty(dr,"__esModule",{value:!0});dr.enginesVersion=void 0;dr.enginesVersion=un().prisma.enginesVersion});var _i=yt((vd,ki)=>{"use strict";u();c();p();m();d();l();ki.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var hn=yt((eb,qi)=>{"use strict";u();c();p();m();d();l();qi.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();p();m();d();l()});var Gi=ae(()=>{"use strict";u();c();p();m();d();l()});var Fr,yo=ae(()=>{"use strict";u();c();p();m();d();l();Fr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var zu={};ht(zu,{DMMF:()=>At,Debug:()=>j,Decimal:()=>xe,Extensions:()=>Zr,MetricsClient:()=>nt,PrismaClientInitializationError:()=>M,PrismaClientKnownRequestError:()=>X,PrismaClientRustPanicError:()=>Te,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>Y,Public:()=>en,Sql:()=>ne,createParam:()=>ao,defineDmmfProperty:()=>fo,deserializeJsonResponse:()=>lt,deserializeRawResult:()=>Gr,dmmfToRuntimeDataModel:()=>Ui,empty:()=>bo,getPrismaClient:()=>Fs,getRuntime:()=>ut,join:()=>ho,makeStrictEnum:()=>Ns,makeTypedQueryFactory:()=>go,objectEnumValues:()=>Ar,raw:()=>An,serializeJsonQuery:()=>_r,skip:()=>kr,sqltag:()=>Cn,warnEnvConflicts:()=>void 0,warnOnce:()=>Tt});module.exports=Gs(zu);u();c();p();m();d();l();var Zr={};ht(Zr,{defineExtension:()=>si,getExtensionContext:()=>ai});u();c();p();m();d();l();u();c();p();m();d();l();function si(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();p();m();d();l();function ai(t){return t}var en={};ht(en,{validator:()=>li});u();c();p();m();d();l();u();c();p();m();d();l();function li(...t){return e=>e}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var tn,ui,ci,pi,mi=!0;typeof g<"u"&&({FORCE_COLOR:tn,NODE_DISABLE_COLORS:ui,NO_COLOR:ci,TERM:pi}=g.env||{},mi=g.stdout&&g.stdout.isTTY);var na={enabled:!ui&&ci==null&&pi!=="dumb"&&(tn!=null&&tn!=="0"||mi)};function q(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!na.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Kc=q(0,0),ar=q(1,22),lr=q(2,22),Hc=q(3,23),di=q(4,24),zc=q(7,27),Yc=q(8,28),Xc=q(9,29),Zc=q(30,39),Ge=q(31,39),fi=q(32,39),gi=q(33,39),yi=q(34,39),ep=q(35,39),hi=q(36,39),tp=q(37,39),bi=q(90,39),rp=q(90,39),np=q(40,49),ip=q(41,49),op=q(42,49),sp=q(43,49),ap=q(44,49),lp=q(45,49),up=q(46,49),cp=q(47,49);u();c();p();m();d();l();var ia=100,Ei=["green","yellow","blue","magenta","cyan","red"],ur=[],wi=Date.now(),oa=0,rn=typeof g<"u"?g.env:{};globalThis.DEBUG??=rn.DEBUG??"";globalThis.DEBUG_COLORS??=rn.DEBUG_COLORS?rn.DEBUG_COLORS==="true":!0;var wt={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function sa(t){let e={color:Ei[oa++%Ei.length],enabled:wt.enabled(t),namespace:t,log:wt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&ur.push([o,...n]),ur.length>ia&&ur.shift(),wt.enabled(o)||i){let f=n.map(R=>typeof R=="string"?R:aa(R)),v=`+${Date.now()-wi}ms`;wi=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var j=new Proxy(sa,{get:(t,e)=>wt[e],set:(t,e,r)=>wt[e]=r});function aa(t,e=2){let r=new Set;return JSON.stringify(t,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},e)}function xi(){ur.length=0}u();c();p();m();d();l();u();c();p();m();d();l();var on=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();p();m();d();l();var Ca=vi(),sn=Ca.version;u();c();p();m();d();l();function Je(t){let e=La();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Fa())}function La(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Fa(){return"library"}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();function an(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();p();m();d();l();function pr(t){return{ok:!0,value:t,map(e){return pr(e(t))},flatMap(e){return e(t)}}}function Le(t){return{ok:!1,error:t,map(){return Le(t)},flatMap(){return Le(t)}}}var Ii=j("driver-adapter-utils"),ln=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var mr=(t,e=new ln)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:Pe(e,t.queryRaw.bind(t)),executeRaw:Pe(e,t.executeRaw.bind(t)),executeScript:Pe(e,t.executeScript.bind(t)),dispose:Pe(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await Pe(e,t.startTransaction.bind(t))(...n)).map(o=>Na(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=Ua(e,t.getConnectionInfo.bind(t))),r},Na=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:Pe(t,e.queryRaw.bind(e)),executeRaw:Pe(t,e.executeRaw.bind(e)),commit:Pe(t,e.commit.bind(e)),rollback:Pe(t,e.rollback.bind(e))});function Pe(t,e){return async(...r)=>{try{return pr(await e(...r))}catch(n){if(Ii("[error@wrapAsync]",n),an(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}function Ua(t,e){return(...r)=>{try{return pr(e(...r))}catch(n){if(Ii("[error@wrapSync]",n),an(n))return Le(n.cause);let i=t.registerNewError(n);return Le({kind:"GenericJs",id:i})}}}u();c();p();m();d();l();var Oi="prisma+postgres",fr=`${Oi}:`;function gr(t){return t?.toString().startsWith(`${fr}//`)??!1}function cn(t){if(!gr(t))return!1;let{host:e}=new URL(t);return e.includes("localhost")||e.includes("127.0.0.1")||e.includes("[::1]")}var Pt={};ht(Pt,{error:()=>$a,info:()=>Ba,log:()=>Va,query:()=>ja,should:()=>Mi,tags:()=>xt,warn:()=>pn});u();c();p();m();d();l();var xt={error:Ge("prisma:error"),warn:gi("prisma:warn"),info:hi("prisma:info"),query:yi("prisma:query")},Mi={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Va(...t){console.log(...t)}function pn(t,...e){Mi.warn()&&console.warn(`${xt.warn} ${t}`,...e)}function Ba(t,...e){console.info(`${xt.info} ${t}`,...e)}function $a(t,...e){console.error(`${xt.error} ${t}`,...e)}function ja(t,...e){console.log(`${xt.query} ${t}`,...e)}u();c();p();m();d();l();function yr(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();p();m();d();l();function Fe(t,e){throw new Error(e)}u();c();p();m();d();l();u();c();p();m();d();l();function mn({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var Qa=mn();function dn(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Qa,"")}u();c();p();m();d();l();function fn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();p();m();d();l();function hr(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();p();m();d();l();function gn(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{Li.has(t)||(Li.add(t),pn(e,...r))};var M=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};O(M,"PrismaClientInitializationError");u();c();p();m();d();l();var X=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};O(X,"PrismaClientKnownRequestError");u();c();p();m();d();l();var Te=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};O(Te,"PrismaClientRustPanicError");u();c();p();m();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};O(Q,"PrismaClientUnknownRequestError");u();c();p();m();d();l();var Y=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};O(Y,"PrismaClientValidationError");u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var fe=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();p();m();d();l();function Ce(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();p();m();d();l();function Ni(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();p();m();d();l();function vt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();p();m();d();l();function Ui(t){return{models:yn(t.models),enums:yn(t.enums),types:yn(t.types)}}function yn(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();p();m();d();l();function We(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function br(t){return t.toString()!=="Invalid Date"}u();c();p();m();d();l();l();function Ke(t){return P.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();p();m();d();l();u();c();p();m();d();l();var At={};ht(At,{ModelAction:()=>Rt,datamodelEnumToSchemaEnum:()=>Ga});u();c();p();m();d();l();u();c();p();m();d();l();function Ga(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();p();m();d();l();var Rt=(U=>(U.findUnique="findUnique",U.findUniqueOrThrow="findUniqueOrThrow",U.findFirst="findFirst",U.findFirstOrThrow="findFirstOrThrow",U.findMany="findMany",U.create="create",U.createMany="createMany",U.createManyAndReturn="createManyAndReturn",U.update="update",U.updateMany="updateMany",U.updateManyAndReturn="updateManyAndReturn",U.upsert="upsert",U.delete="delete",U.deleteMany="deleteMany",U.groupBy="groupBy",U.count="count",U.aggregate="aggregate",U.findRaw="findRaw",U.aggregateRaw="aggregateRaw",U))(Rt||{});var Ja=bt(_i());var Wa={red:Ge,gray:bi,dim:lr,bold:ar,underline:di,highlightSource:t=>t.highlight()},Ka={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function Ha({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function za({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(Ya(e))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Ya(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function Er(t){let e=t.showColors?Wa:Ka,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=Ha(t),za(r,e)}u();c();p();m();d();l();var Wi=bt(hn());u();c();p();m();d();l();function $i(t,e,r){let n=ji(t),i=Xa(n),o=el(i);o?wr(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ji(t){return t.errors.flatMap(e=>e.kind==="Union"?ji(e):[e])}function Xa(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:Za(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function Za(t,e){return[...new Set(t.concat(e))]}function el(t){return gn(t,(e,r)=>{let n=Vi(e),i=Vi(r);return n!==i?n-i:Bi(e)-Bi(r)})}function Vi(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function Bi(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();p();m();d();l();var se=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();p();m();d();l();u();c();p();m();d();l();Gi();u();c();p();m();d();l();var He=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};Qi();u();c();p();m();d();l();u();c();p();m();d();l();var xr=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();p();m();d();l();var Pr=t=>t,Tr={bold:Pr,red:Pr,green:Pr,dim:Pr,enabled:!1},Ji={bold:ar,red:Ge,green:fi,dim:lr,enabled:!0},ze={write(t){t.writeLine(",")}};u();c();p();m();d();l();var ge=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();p();m();d();l();var Se=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Ye=class extends Se{items=[];addItem(e){return this.items.push(new xr(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new ge("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(ze,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Xe=class t extends Se{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof Ye&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new ge("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(ze,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();p();m();d();l();var z=class extends Se{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();p();m();d();l();var Ct=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(ze,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function wr(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":tl(t,e);break;case"IncludeOnScalar":rl(t,e);break;case"EmptySelection":nl(t,e,r);break;case"UnknownSelectionField":al(t,e);break;case"InvalidSelectionValue":ll(t,e);break;case"UnknownArgument":ul(t,e);break;case"UnknownInputField":cl(t,e);break;case"RequiredArgumentMissing":pl(t,e);break;case"InvalidArgumentType":ml(t,e);break;case"InvalidArgumentValue":dl(t,e);break;case"ValueTooLarge":fl(t,e);break;case"SomeFieldsMissing":gl(t,e);break;case"TooManyFieldsGiven":yl(t,e);break;case"Union":$i(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function tl(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function rl(t,e){let[r,n]=Ze(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new se(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${St(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function nl(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){il(t,e,i);return}if(n.hasField("select")){ol(t,e);return}}if(r?.[Ce(t.outputType.name)]){sl(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function il(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new se(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ol(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),zi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${St(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function sl(t,e){let r=new Ct;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new se("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=Ze(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Xe;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function al(t,e){let r=Yi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":zi(n,t.outputType);break;case"include":hl(n,t.outputType);break;case"omit":bl(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(St(n)),i.join(" ")})}function ll(t,e){let r=Yi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function ul(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),El(n,t.arguments)),e.addErrorMessage(i=>Ki(i,r,t.arguments.map(o=>o.name)))}function cl(t,e){let[r,n]=Ze(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Xi(o,t.inputType)}e.addErrorMessage(o=>Ki(o,n,t.inputType.fields.map(s=>s.name)))}function Ki(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=xl(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(St(t)),n.join(" ")}function pl(t,e){let r;e.addErrorMessage(f=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=Ze(t.argumentPath),s=new Ct,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new se(o,s).makeRequired())}else{let f=t.inputTypes.map(Hi).join(" | ");a.addSuggestion(new se(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=Ze(t.dependentArgumentPath);e.addErrorMessage(v=>`Argument \`${v.green(o)}\` is required because argument \`${v.green(f)}\` was provided.`)}}}function Hi(t){return t.kind==="list"?`${Hi(t.elementType)}[]`:t.name}function ml(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=vr("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function dl(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=vr("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function fl(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}e.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function gl(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&Xi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${vr("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(St(i)),o.join(" ")})}function yl(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${vr("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function zi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new se(r.name,"true"))}function hl(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new se(r.name,"true"))}function bl(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new se(r.name,"true"))}function El(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new se(r.name,r.typeNames.join(" | ")))}function Yi(t,e){let[r,n]=Ze(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Xi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new se(r.name,r.typeNames.join(" | ")))}function Ze(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function St({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function vr(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var wl=3;function xl(t,e){let r=1/0,n;for(let i of e){let o=(0,Wi.default)(t,i);o>wl||o`}};function et(t){return t instanceof It}u();c();p();m();d();l();var Rr=Symbol(),En=new WeakMap,ve=class{constructor(e){e===Rr?En.set(this,`Prisma.${this._getName()}`):En.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return En.get(this)}},Dt=class extends ve{_getNamespace(){return"NullTypes"}},Ot=class extends Dt{#e};wn(Ot,"DbNull");var kt=class extends Dt{#e};wn(kt,"JsonNull");var _t=class extends Dt{#e};wn(_t,"AnyNull");var Ar={classes:{DbNull:Ot,JsonNull:kt,AnyNull:_t},instances:{DbNull:new Ot(Rr),JsonNull:new kt(Rr),AnyNull:new _t(Rr)}};function wn(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();p();m();d();l();var Zi=": ",Cr=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Zi.length}write(e){let r=new ge(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(Zi).write(this.value)}};var xn=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` +`)}};function tt(t){return new xn(eo(t))}function eo(t){let e=new Xe;for(let[r,n]of Object.entries(t)){let i=new Cr(r,to(n));e.addField(i)}return e}function to(t){if(typeof t=="string")return new z(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new z(String(t));if(typeof t=="bigint")return new z(`${t}n`);if(t===null)return new z("null");if(t===void 0)return new z("undefined");if(Ke(t))return new z(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return h.isBuffer(t)?new z(`Buffer.alloc(${t.byteLength})`):new z(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=br(t)?t.toISOString():"Invalid Date";return new z(`new Date("${e}")`)}return t instanceof ve?new z(`Prisma.${t._getName()}`):et(t)?new z(`prisma.${Ce(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?Pl(t):typeof t=="object"?eo(t):new z(Object.prototype.toString.call(t))}function Pl(t){let e=new Ye;for(let r of t)e.addItem(to(r));return e}function Sr(t,e){let r=e==="pretty"?Ji:Tr,n=t.renderAllMessages(r),i=new He(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Ir({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=tt(t);for(let A of e)wr(A,a,s);let{message:f,args:v}=Sr(a,r),R=Er({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:v});throw new Y(R,{clientVersion:o})}u();c();p();m();d();l();u();c();p();m();d();l();function ye(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();p();m();d();l();function no(t,e,r){let n=ye(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Tl({...t,...ro(e.name,t,e.result.$allModels),...ro(e.name,t,e.result[n])})}function Tl(t){let e=new fe,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return hr(t,n=>({...n,needs:r(n.name,new Set)}))}function ro(t,e,r){return r?hr(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:vl(e,o,i)})):{}}function vl(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function io(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function oo(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var Dr=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new fe;modelExtensionsCache=new fe;queryCallbacksCache=new fe;clientExtensions=vt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=vt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>no(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ye(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},rt=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new Dr(e))}isEmpty(){return this.head===void 0}append(e){return new t(new Dr(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();p();m();d();l();var Or=class{constructor(e){this.name=e}};function so(t){return t instanceof Or}function ao(t){return new Or(t)}u();c();p();m();d();l();u();c();p();m();d();l();var lo=Symbol(),Mt=class{constructor(e){if(e!==lo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?kr:e}},kr=new Mt(lo);function he(t){return t instanceof Mt}var Rl={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},uo="explicitly `undefined` values are not allowed";function _r({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=rt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:v,globalOmit:R}){let A=new Pn({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:v,globalOmit:R});return{modelName:t,action:Rl[e],query:Lt(r,A)}}function Lt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:po(r,n),selection:Al(t,e,i,n)}}function Al(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Dl(t,n)):Cl(n,e,r)}function Cl(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&Sl(n,e,t),Il(n,r,t),n}function Sl(t,e,r){for(let[n,i]of Object.entries(e)){if(he(i))continue;let o=r.nestSelection(n);if(Tn(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=Lt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=Lt(i,o)}}function Il(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=oo(i,n);for(let[s,a]of Object.entries(o)){if(he(a))continue;Tn(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function Dl(t,e){let r={},n=e.getComputedFields(),i=io(t,n);for(let[o,s]of Object.entries(i)){if(he(s))continue;let a=e.nestSelection(o);Tn(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||he(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=Lt({},a):r[o]=!0;continue}r[o]=Lt(s,a)}}return r}function co(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(We(t)){if(br(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(so(t))return{$type:"Param",value:t.name};if(et(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return Ol(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:h.from(r,n,i).toString("base64")}}if(kl(t))return t.values;if(Ke(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof ve){if(t!==Ar.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(_l(t))return t.toJSON();if(typeof t=="object")return po(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function po(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);he(i)||(i!==void 0?r[n]=co(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:uo}))}return r}function Ol(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ce(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();p();m();d();l();function mo(t){if(!t._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var nt=class{_client;constructor(e){this._client=e}prometheus(e){return mo(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return mo(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();p();m();d();l();function fo(t,e){let r=vt(()=>Ml(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Ml(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function vn(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();p();m();d();l();var Rn=new WeakMap,Mr="$$PrismaTypedSql",Ft=class{constructor(e,r){Rn.set(this,{sql:e,values:r}),Object.defineProperty(this,Mr,{value:Mr})}get sql(){return Rn.get(this).sql}get values(){return Rn.get(this).values}};function go(t){return(...e)=>new Ft(t,e)}function Lr(t){return t!=null&&t[Mr]===Mr}u();c();p();m();d();l();var Ls=bt(un());u();c();p();m();d();l();yo();Ti();Si();u();c();p();m();d();l();var ne=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();p();m();d();l();u();c();p();m();d();l();var Nr={enumerable:!0,configurable:!0,writable:!0};function Ur(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Nr,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Eo=Symbol.for("nodejs.util.inspect.custom");function ce(t,e){let r=Ll(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=wo(Reflect.ownKeys(o),r),a=wo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Nr,...f?.getPropertyDescriptor(s)}:Nr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Eo]=function(){let o={...this};return delete o[Eo],o},i}function Ll(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function wo(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();p();m();d();l();function it(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();p();m();d();l();function ot(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();p();m();d();l();function xo(t){if(t===void 0)return"";let e=tt(t);return new He(0,{colors:Tr}).write(e).toString()}u();c();p();m();d();l();var Fl="P2037";function st({error:t,user_facing_error:e},r,n){return e.error_code?new X(Nl(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Nl(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===Fl&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Sn=class{getLocation(){return null}};function Ie(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Sn}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Po={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function at(t={}){let e=ql(t);return Object.entries(e).reduce((n,[i,o])=>(Po[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ql(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function qr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function To(t,e){let r=qr(t);return e({action:"aggregate",unpacker:r,argsMapper:at})(t)}u();c();p();m();d();l();function Vl(t={}){let{select:e,...r}=t;return typeof e=="object"?at({...r,_count:e}):at({...r,_count:{_all:!0}})}function Bl(t={}){return typeof t.select=="object"?e=>qr(t)(e)._count:e=>qr(t)(e)._count._all}function vo(t,e){return e({action:"count",unpacker:Bl(t),argsMapper:Vl})(t)}u();c();p();m();d();l();function $l(t={}){let e=at(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function jl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Ro(t,e){return e({action:"groupBy",unpacker:jl(t),argsMapper:$l})(t)}function Ao(t,e,r){if(e==="aggregate")return n=>To(n,r);if(e==="count")return n=>vo(n,r);if(e==="groupBy")return n=>Ro(n,r)}u();c();p();m();d();l();function Co(t,e){let r=e.fields.filter(i=>!i.relationName),n=Ni(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new It(t,o,s.type,s.isList,s.kind==="enum")},...Ur(Object.keys(n))})}u();c();p();m();d();l();u();c();p();m();d();l();var So=t=>Array.isArray(t)?t:t.split("."),In=(t,e)=>So(e).reduce((r,n)=>r&&r[n],t),Io=(t,e,r)=>So(e).reduceRight((n,i,o,s)=>Object.assign({},In(t,s.slice(0,o)),{[i]:n}),r);function Ql(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function Gl(t,e,r){return e===void 0?t??{}:Io(e,r,t||!0)}function Dn(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,v)=>({...f,[v.name]:v}),{});return f=>{let v=Ie(t._errorFormat),R=Ql(n,i),A=Gl(f,o,R),I=r({dataPath:R,callsite:v})(A),C=Jl(t,e);return new Proxy(I,{get(L,D){if(!C.includes(D))return L[D];let Ee=[a[D].type,r,D],ee=[R,A];return Dn(t,...Ee,...ee)},...Ur([...C,...Object.getOwnPropertyNames(I)])})}}function Jl(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Wl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Kl=["aggregate","count","groupBy"];function On(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[Hl(t,e),Yl(t,e),Nt(r),Z("name",()=>e),Z("$name",()=>e),Z("$parent",()=>t._appliedParent)];return ce({},n)}function Hl(t,e){let r=ye(e),n=Object.keys(Rt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let v=Ie(t._errorFormat);return t._createPrismaPromise(R=>{let A={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:R,callsite:v};return t._request({...A,...a})},{action:o,args:f,model:e})};return Wl.includes(o)?Dn(t,e,s):zl(i)?Ao(t,i,s):s({})}}}function zl(t){return Kl.includes(t)}function Yl(t,e){return Ne(Z("fields",()=>{let r=t._runtimeDataModel.models[e];return Co(e,r)}))}u();c();p();m();d();l();function Do(t){return t.replace(/^./,e=>e.toUpperCase())}var kn=Symbol();function Ut(t){let e=[Xl(t),Zl(t),Z(kn,()=>t),Z("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Nt(r)),ce(t,e)}function Xl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function Zl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ye),n=[...new Set(e.concat(r))];return Ne({getKeys(){return n},getPropertyValue(i){let o=Do(i);if(t._runtimeDataModel.models[o]!==void 0)return On(t,o);if(t._runtimeDataModel.models[i]!==void 0)return On(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Oo(t){return t[kn]?t[kn]:t}function ko(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$on:{value:void 0}});return Ut(e)}u();c();p();m();d();l();u();c();p();m();d();l();function _o({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let v=f.needs.filter(R=>n[R]);v.length>0&&a.push(it(v))}else if(r){if(!r[f.name])continue;let v=f.needs.filter(R=>!r[R]);v.length>0&&a.push(it(v))}eu(t,f.needs)&&s.push(tu(f,ce(t,s)))}return s.length>0||a.length>0?ce(t,[...s,...a]):t}function eu(t,e){return e.every(r=>fn(t,r))}function tu(t,e){return Ne(Z(t.name,()=>t.compute(e)))}u();c();p();m();d();l();function Vr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sR.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let v=typeof s=="object"?s:{};e[o]=Vr({visitor:i,result:e[o],args:v,modelName:f.type,runtimeDataModel:n})}}function Lo({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:Vr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,v)=>{let R=ye(f);return _o({result:a,modelName:R,select:v.select,omit:v.select?void 0:{...o?.[R],...v.omit},extensions:n})}})}u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();var ru=["$connect","$disconnect","$on","$transaction","$extends"],Fo=ru;function No(t){if(t instanceof ne)return nu(t);if(Lr(t))return iu(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:No(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=jo(o,f),a.args=s,qo(t,a,r,n+1)}})})}function Vo(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return qo(t,e,s)}function Bo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?$o(r,n,0,t):t(r)}}function $o(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=jo(i,f),$o(a,e,r+1,n)}})}var Uo=t=>t;function jo(t=Uo,e=Uo){return r=>t(e(r))}u();c();p();m();d();l();var Qo=j("prisma:client"),Go={Vercel:"vercel","Netlify CI":"netlify"};function Jo({postinstall:t,ciName:e,clientVersion:r,generator:n}){if(Qo("checkPlatformCaching:postinstall",t),Qo("checkPlatformCaching:ciName",e),t===!0&&!(n?.output&&typeof(n.output.fromEnvVar??n.output.value)=="string")&&e&&e in Go){let i=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Go[e]}-build`;throw console.error(i),new M(i,r)}}u();c();p();m();d();l();function Wo(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();l();u();c();p();m();d();l();l();function Ko(t,e){throw new Error(e)}function ou(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function su(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}function lt(t){return t===null?t:Array.isArray(t)?t.map(lt):typeof t=="object"?ou(t)?au(t):t.constructor!==null&&t.constructor.name!=="Object"?t:su(t,lt):t}function au({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=h.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new P(e);case"Json":return JSON.parse(e);default:Ko(e,"Unknown tagged value")}}var Ho="6.19.3";u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var uu=()=>globalThis.process?.release?.name==="node",cu=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,pu=()=>!!globalThis.Deno,mu=()=>typeof globalThis.Netlify=="object",du=()=>typeof globalThis.EdgeRuntime=="object",fu=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function gu(){return[[mu,"netlify"],[du,"edge-light"],[fu,"workerd"],[pu,"deno"],[cu,"bun"],[uu,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var yu={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ut(){let t=gu();return{id:t,prettyName:yu[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}function ct({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw ut().id==="workerd"?new M(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new M(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new M("error: Missing URL environment variable, value, or override.",n);return i}u();c();p();m();d();l();u();c();p();m();d();l();u();c();p();m();d();l();var Br=class extends Error{clientVersion;cause;constructor(e,r){super(e),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Br{isRetryable;constructor(e,r){super(e,r),this.isRetryable=r.isRetryable??!0}};u();c();p();m();d();l();function _(t,e){return{...t,isRetryable:e}}var Ue=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(e,r){super(e,_(r,!1))}};O(Ue,"InvalidDatasourceError");function zo(t){let e={clientVersion:t.clientVersion},r=Object.keys(t.inlineDatasources)[0],n=ct({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,clientVersion:t.clientVersion,env:{...t.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new Ue(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,e)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new Ue(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,e);let a=s.get("api_key");if(a===null||a.length<1)throw new Ue(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,e);let f=cn(i)?"http:":"https:";g.env.TEST_CLIENT_ENGINE_REMOTE_EXECUTOR&&i.searchParams.has("use_http")&&(f="http:");let v=new URL(i.href.replace(o,f));return{apiKey:a,url:v}}u();c();p();m();d();l();var Yo=bt(Di()),$r=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:e,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=e,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:e,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Yo.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=e??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let e=[];return this.tracingHelper.isEnabled()&&e.push("tracing"),this.logLevel&&e.push(this.logLevel),this.logQueries&&e.push("query"),e}};u();c();p();m();d();l();function hu(t){return t[0]*1e3+t[1]/1e6}function _n(t){return new Date(hu(t))}u();c();p();m();d();l();u();c();p();m();d();l();var pt=class extends ie{name="ForcedRetryError";code="P5001";constructor(e){super("This request must be retried",_(e,!0))}};O(pt,"ForcedRetryError");u();c();p();m();d();l();var qe=class extends ie{name="NotImplementedYetError";code="P5004";constructor(e,r){super(e,_(r,!1))}};O(qe,"NotImplementedYetError");u();c();p();m();d();l();u();c();p();m();d();l();var V=class extends ie{response;constructor(e,r){super(e,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ve=class extends V{name="SchemaMissingError";code="P5005";constructor(e){super("Schema needs to be uploaded",_(e,!0))}};O(Ve,"SchemaMissingError");u();c();p();m();d();l();u();c();p();m();d();l();var Mn="This request could not be understood by the server",Vt=class extends V{name="BadRequestError";code="P5000";constructor(e,r,n){super(r||Mn,_(e,!1)),n&&(this.code=n)}};O(Vt,"BadRequestError");u();c();p();m();d();l();var Bt=class extends V{name="HealthcheckTimeoutError";code="P5013";logs;constructor(e,r){super("Engine not started: healthcheck timeout",_(e,!0)),this.logs=r}};O(Bt,"HealthcheckTimeoutError");u();c();p();m();d();l();var $t=class extends V{name="EngineStartupError";code="P5014";logs;constructor(e,r,n){super(r,_(e,!0)),this.logs=n}};O($t,"EngineStartupError");u();c();p();m();d();l();var jt=class extends V{name="EngineVersionNotSupportedError";code="P5012";constructor(e){super("Engine version is not supported",_(e,!1))}};O(jt,"EngineVersionNotSupportedError");u();c();p();m();d();l();var Ln="Request timed out",Qt=class extends V{name="GatewayTimeoutError";code="P5009";constructor(e,r=Ln){super(r,_(e,!1))}};O(Qt,"GatewayTimeoutError");u();c();p();m();d();l();var bu="Interactive transaction error",Gt=class extends V{name="InteractiveTransactionError";code="P5015";constructor(e,r=bu){super(r,_(e,!1))}};O(Gt,"InteractiveTransactionError");u();c();p();m();d();l();var Eu="Request parameters are invalid",Jt=class extends V{name="InvalidRequestError";code="P5011";constructor(e,r=Eu){super(r,_(e,!1))}};O(Jt,"InvalidRequestError");u();c();p();m();d();l();var Fn="Requested resource does not exist",Wt=class extends V{name="NotFoundError";code="P5003";constructor(e,r=Fn){super(r,_(e,!1))}};O(Wt,"NotFoundError");u();c();p();m();d();l();var Nn="Unknown server error",mt=class extends V{name="ServerError";code="P5006";logs;constructor(e,r,n){super(r||Nn,_(e,!0)),this.logs=n}};O(mt,"ServerError");u();c();p();m();d();l();var Un="Unauthorized, check your connection string",Kt=class extends V{name="UnauthorizedError";code="P5007";constructor(e,r=Un){super(r,_(e,!1))}};O(Kt,"UnauthorizedError");u();c();p();m();d();l();var qn="Usage exceeded, retry again later",Ht=class extends V{name="UsageExceededError";code="P5008";constructor(e,r=qn){super(r,_(e,!0))}};O(Ht,"UsageExceededError");async function wu(t){let e;try{e=await t.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(e);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return e===""?{type:"EmptyError"}:{type:"UnknownTextError",body:e}}}async function zt(t,e){if(t.ok)return;let r={clientVersion:e,response:t},n=await wu(t);if(n.type==="QueryEngineError")throw new X(n.body.message,{code:n.body.error_code,clientVersion:e});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new mt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ve(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new jt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new $t(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new M(i,e,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Bt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Gt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Jt(r,n.body.InvalidRequestError.reason)}if(t.status===401||t.status===403)throw new Kt(r,dt(Un,n));if(t.status===404)return new Wt(r,dt(Fn,n));if(t.status===429)throw new Ht(r,dt(qn,n));if(t.status===504)throw new Qt(r,dt(Ln,n));if(t.status>=500)throw new mt(r,dt(Nn,n));if(t.status>=400)throw new Vt(r,dt(Mn,n))}function dt(t,e){return e.type==="EmptyError"?t:`${t}: ${JSON.stringify(e)}`}u();c();p();m();d();l();function Xo(t){let e=Math.pow(2,t)*50,r=Math.ceil(Math.random()*e)-Math.ceil(e/2),n=e+r;return new Promise(i=>setTimeout(()=>i(n),n))}u();c();p();m();d();l();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Zo(t){let e=new TextEncoder().encode(t),r="",n=e.byteLength,i=n%3,o=n-i,s,a,f,v,R;for(let A=0;A>18,a=(R&258048)>>12,f=(R&4032)>>6,v=R&63,r+=Re[s]+Re[a]+Re[f]+Re[v];return i==1?(R=e[o],s=(R&252)>>2,a=(R&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(R=e[o]<<8|e[o+1],s=(R&64512)>>10,a=(R&1008)>>4,f=(R&15)<<2,r+=Re[s]+Re[a]+Re[f]+"="),r}u();c();p();m();d();l();function es(t){if(!!t.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new M("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",t.clientVersion)}u();c();p();m();d();l();var ts={"@prisma/debug":"workspace:*","@prisma/engines-version":"7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};u();c();p();m();d();l();u();c();p();m();d();l();var Yt=class extends ie{name="RequestError";code="P5010";constructor(e,r){super(`Cannot fetch data from service: +${e}`,_(r,!0))}};O(Yt,"RequestError");async function Be(t,e,r=n=>n){let{clientVersion:n,...i}=e,o=r(fetch);try{return await o(t,i)}catch(s){let a=s.message??"Unknown error";throw new Yt(a,{clientVersion:n,cause:s})}}var Pu=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,rs=j("prisma:client:dataproxyEngine");async function Tu(t,e){let r=ts["@prisma/engines-version"],n=e.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(t.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&Pu.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,v]=s.split("."),R=vu(`<=${a}.${f}.${v}`),A=await Be(R,{clientVersion:n});if(!A.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${A.status} ${A.statusText}, response body: ${await A.text()||""}`);let I=await A.text();rs("length of body fetched from unpkg.com",I.length);let C;try{C=JSON.parse(I)}catch(L){throw console.error("JSON.parse error: body fetched from unpkg.com: ",I),L}return C.version}throw new qe("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ns(t,e){let r=await Tu(t,e);return rs("version",r),r}function vu(t){return encodeURI(`https://unpkg.com/prisma@${t}/package.json`)}var is=3,Xt=j("prisma:client:dataproxyEngine"),Zt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(e){es(e),this.config=e,this.env=e.env,this.inlineSchema=Zo(e.inlineSchema),this.inlineDatasources=e.inlineDatasources,this.inlineSchemaHash=e.inlineSchemaHash,this.clientVersion=e.clientVersion,this.engineHash=e.engineVersion,this.logEmitter=e.logEmitter,this.tracingHelper=e.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:e,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new $r({apiKey:e,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ns(this.host,this.config),Xt("host",this.host),Xt("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(e){e?.logs?.length&&e.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Xt(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:_n(r.timestamp),message:r.attributes.message??"",target:r.target??"BinaryEngine"});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:_n(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target??"BinaryEngine"});break}default:r.level}}),e?.traces?.length&&this.tracingHelper.dispatchEngineSpans(e.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(e){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${e}`}async uploadSchema(){let e={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(e,async()=>{let r=await Be(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Xt("schema response status",r.status);let n=await zt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(e,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:e,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(e,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=ot(e,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:e,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Be(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(e),clientVersion:this.clientVersion},n);a.ok||Xt("graphql response status",a.status),await this.handleError(await zt(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(e,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[e]} transaction`,callback:async({logHttpCall:o})=>{if(e==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await Be(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await zt(f,this.clientVersion));let v=await f.json(),{extensions:R}=v;R&&this.propagateResponseExtensions(R);let A=v.id,I=v["data-proxy"].endpoint;return{id:A,payload:{endpoint:I}}}else{let s=`${n.payload.endpoint}/${e}`;o(s);let a=await Be(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await zt(a,this.clientVersion));let f=await a.json(),{extensions:v}=f;v&&this.propagateResponseExtensions(v);return}}})}getURLAndAPIKey(){return zo({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new qe("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(e){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await e.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=is)throw i instanceof pt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${is} failed for ${e.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Xo(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(e){if(e instanceof Ve)throw await this.uploadSchema(),new pt({clientVersion:this.clientVersion,cause:e});if(e)throw e}convertProtocolErrorsToClientError(e){return e.length===1?st(e[0],this.config.clientVersion,this.config.activeProvider):new Q(JSON.stringify(e),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};u();c();p();m();d();l();u();c();p();m();d();l();function os(t){if(t?.kind==="itx")return t.options.id}u();c();p();m();d();l();var Vn,ss={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new M(`The \`adapter\` option for \`PrismaClient\` is required in this context (${ut().prettyName})`,e);if(n===void 0)throw new M("WASM engine was unexpectedly `undefined`",e);Vn===void 0&&(Vn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new M("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),v=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),v(),o.QueryEngine})());let i=await Vn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ru="P2036",be=j("prisma:client:libraryEngine");function Au(t){return t.item_type==="query"&&"query"in t}function Cu(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var VL=[...on,"native"],Su=0xffffffffffffffffn,Bn=1n;function Iu(){let t=Bn++;return Bn>Su&&(Bn=1n),t}var er=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??ss,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Iu().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Du(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new X(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(be("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let e=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(mr));let r=await this.adapterPromise;r&&be("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new M(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",Au(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Cu(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return be(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{be("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(mr)),await this.adapterPromise,be("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new M(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return be("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),be("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,be("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){be(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof M)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){be("requestBatch");let i=ot(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),os(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:v}=a;if(Array.isArray(f))return f.map(R=>R.errors&&R.errors.length>0?this.loggerRustPanic??this.buildQueryError(R.errors[0],o?.errorRegistry):{data:R});throw v&&v.length===1?new Error(v[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:st(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Ru&&r){let n=e.meta?.id;yr(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return yr(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function Du(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();p();m();d();l();function as({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=D=>{i.push({_tag:"warning",value:D})},a=D=>{let k=D.join(` +`);o.push({_tag:"error",value:k})},f=!!t?.startsWith("prisma://"),v=gr(t),R=!!e,A=f||v;!R&&r&&A&&n!=="client"&&n!=="wasm-compiler-edge"&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let I=A||!r;R&&(I||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):A?a(["You've provided both a driver adapter and an Accelerate database URL. Driver adapters currently cannot connect to Accelerate.","Please provide either a driver adapter with a direct database URL or an Accelerate URL and no driver adapter."]):r||a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let C={accelerate:I,ppg:v,driverAdapters:R};function L(D){return D.length>0}return L(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:C}:{ok:!0,diagnostics:{warnings:i},isUsing:C}}function ls({copyEngine:t=!0},e){let r;try{r=ct({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=as({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let A of o.warnings)Tt(...A.value);if(!n){let A=o.errors[0];throw new Y(A.value,{clientVersion:e.clientVersion})}let s=Je(e.generator),a=s==="library",f=s==="binary",v=s==="client",R=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new Zt(e):i.driverAdapters?new er(e):new $n({clientVersion:e.clientVersion})}var $n=class{constructor(e){return new Proxy(this,{get(r,n){let i=`In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters`;throw new Y(i,e)}})}};u();c();p();m();d();l();function us({generator:t}){return t?.previewFeatures??[]}u();c();p();m();d();l();var cs=t=>({command:t});u();c();p();m();d();l();u();c();p();m();d();l();var ps=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();p();m();d();l();l();function ft(t){try{return ms(t,"fast")}catch{return ms(t,"slow")}}function ms(t,e){return JSON.stringify(t.map(r=>fs(r,e)))}function fs(t,e){if(Array.isArray(t))return t.map(r=>fs(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(We(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(xe.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(h.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(Ou(t))return{prisma__type:"bytes",prisma__value:h.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:h.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?gs(t):t}function Ou(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function gs(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(ds);let e={};for(let r of Object.keys(t))e[r]=ds(t[r]);return e}function ds(t){return typeof t=="bigint"?t.toString():gs(t)}var ku=/^(\s*alter\s)/i,ys=j("prisma:client");function jn(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&ku.exec(e))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Qn=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(Lr(r))n=r.sql,i={values:ft(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:ft(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:ft(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:ft(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ps(r),i={values:ft(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?ys(`prisma.${t}(${n}, ${i.values})`):ys(`prisma.${t}(${n})`),{query:n,parameters:i}},hs={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ne(e,r)}},bs={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();p();m();d();l();function Gn(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=Es(r(s)):Es(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Es(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();p();m();d();l();var _u=sn.split(".")[0],Mu={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},Jn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${_u}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Mu}};function ws(){return new Jn}u();c();p();m();d();l();function xs(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();p();m();d();l();function Ps(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();p();m();d();l();u();c();p();m();d();l();function jr(t){return typeof t.batchRequestIdx=="number"}u();c();p();m();d();l();function Ts(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(Wn(t.query.arguments)),e.push(Wn(t.query.selection)),e.join("")}function Wn(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}u();c();p();m();d();l();var Lu={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Kn(t){return Lu[t]}u();c();p();m();d();l();var Qr=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i$e("bigint",r));case"bytes-array":return e.map(r=>$e("bytes",r));case"decimal-array":return e.map(r=>$e("decimal",r));case"datetime-array":return e.map(r=>$e("datetime",r));case"date-array":return e.map(r=>$e("date",r));case"time-array":return e.map(r=>$e("time",r));default:return e}}function Gr(t){let e=[],r=Fu(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(A=>A.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),v=n.some(A=>Kn(A.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Uu(o),containsWrite:v,customDataProxyFetch:i})).map((A,I)=>{if(A instanceof Error)return A;try{return this.mapQueryEngineResult(n[I],A)}catch(C){return C}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?vs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ts(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Nu(e),qu(e,i))throw e;if(e instanceof X&&Vu(e)){let v=Rs(e.meta);Ir({args:o,errors:[v],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=Er({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let v=s?{modelName:s,...e.meta}:e.meta;throw new X(f,{code:e.code,clientVersion:this.client._clientVersion,meta:v,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new Te(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof M)throw new M(f,this.client._clientVersion);if(e instanceof Te)throw new Te(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?dn(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(v=>v!=="select"&&v!=="include"),a=In(o,s),f=i==="queryRaw"?Gr(a):lt(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Uu(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:vs(t)};Fe(t,"Unknown transaction kind")}}function vs(t){return{id:t.id,payload:t.payload}}function qu(t,e){return jr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function Vu(t){return t.code==="P2009"||t.code==="P2012"}function Rs(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Rs)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();p();m();d();l();var As=Ho;u();c();p();m();d();l();var Os=bt(hn());u();c();p();m();d();l();var F=class extends Error{constructor(e){super(e+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};O(F,"PrismaClientConstructorValidationError");var Cs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Ss=["pretty","colorless","minimal"],Is=["info","query","warn","error"],Bu={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new F(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=gt(r,e)||` Available datasources: ${e.join(", ")}`;throw new F(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new F(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new F(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new F(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(t,e)=>{if(!t&&Je(e.generator)==="client")throw new F('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(t!==null){if(t===void 0)throw new F('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(Je(e.generator)==="binary")throw new F('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')}},datasourceUrl:t=>{if(typeof t<"u"&&typeof t!="string")throw new F(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")throw new F(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ss.includes(t)){let e=gt(t,Ss);throw new F(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`)}}},log:t=>{if(!t)return;if(!Array.isArray(t))throw new F(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`);function e(r){if(typeof r=="string"&&!Is.includes(r)){let n=gt(r,Is);throw new F(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of t){e(r);let n={level:e,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=gt(i,o);throw new F(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new F(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:t=>{if(!t)return;let e=t.maxWait;if(e!=null&&e<=0)throw new F(`Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=t.timeout;if(r!=null&&r<=0)throw new F(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(t,e)=>{if(typeof t!="object")throw new F('"omit" option is expected to be an object.');if(t===null)throw new F('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(t)){let o=ju(n,e.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(v=>v.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new F(Qu(t,r))},__internal:t=>{if(!t)return;let e=["debug","engine","configOverride"];if(typeof t!="object")throw new F(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(t))if(!e.includes(r)){let n=gt(r,e);throw new F(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ks(t,e){for(let[r,n]of Object.entries(t)){if(!Cs.includes(r)){let i=gt(r,Cs);throw new F(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Bu[r](n,e)}if(t.datasourceUrl&&t.datasources)throw new F('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function gt(t,e){if(e.length===0||typeof t!="string")return"";let r=$u(t,e);return r?` Did you mean "${r}"?`:""}function $u(t,e){if(e.length===0)return null;let r=e.map(i=>({value:i,distance:(0,Os.default)(t,i)}));r.sort((i,o)=>i.distanceCe(n)===e);if(r)return t[r]}function Qu(t,e){let r=tt(t);for(let o of e)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Sr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}u();c();p();m();d();l();function _s(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=v=>{o||(o=!0,r(v))};for(let v=0;v{n[v]=R,a()},R=>{if(!jr(R)){f(R);return}R.batchRequestIdx===v?f(R):(i||(i=R),a())})})}var De=j("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Gu={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},Ju=Symbol.for("prisma.client.transaction.id"),Wu={id:0,nextId(){return++this.id}};function Fs(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Gn();constructor(n){t=n?.__internal?.configOverride?.(t)??t,Jo(t),n&&ks(n,t);let i=new Fr().on("error",()=>{});this._extensions=rt.empty(),this._previewFeatures=us(t),this._clientVersion=t.clientVersion??As,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ws();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&cr.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&cr.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new M(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new M("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=t.injectableEdgeEnv?.();try{let f=n??{},v=f.__internal??{},R=v.debug===!0;R&&j.enable("prisma:client");let A=cr.resolve(t.dirname,t.relativePath);Pi.existsSync(A)||(A=t.dirname),De("dirname",t.dirname),De("relativePath",t.relativePath),De("cwd",A);let I=v.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:A,dirname:t.dirname,enableDebugLogs:R,allowTriggerPanic:I.allowTriggerPanic,prismaPath:I.binaryPath??void 0,engineEndpoint:I.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Ps(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(C=>typeof C=="string"?C==="query":C.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:Wo(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ct,getBatchRequestPayload:ot,prismaGraphQLToJSError:st,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:M,PrismaClientKnownRequestError:X,debug:j("prisma:client:accelerateEngine"),engineVersion:Ls.version,clientVersion:t.clientVersion}},De("clientVersion",t.clientVersion),this._engine=ls(t,this._engineConfig),this._requestHandler=new Jr(this,i),f.log)for(let C of f.log){let L=typeof C=="string"?C:C.emit==="stdout"?C.level:null;L&&this.$on(L,D=>{Pt.log(`${Pt.tags[L]??""}`,D.message||D.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Ut(this)}get[Symbol.toStringTag](){return"PrismaClient"}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{xi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ie(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ms(n,i);return jn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(jn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new Y(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:cs,callsite:Ie(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ie(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Ms(n,i));throw new Y("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Y("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Wu.nextId(),s=xs(n.length),a=n.map((f,v)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let R=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,A={kind:"batch",id:o,index:v,isolationLevel:R,lock:s};return f.requestTransaction?.(A)??f});return _s(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let v={kind:"itx",...a};f=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return f}_createItxClient(n){return ce(Ut(ce(Oo(this),[Z("_appliedParent",()=>this._appliedParent._createItxClient(n)),Z("_createPrismaPromise",()=>Gn(n)),Z(Ju,()=>n.id)])),[it(Fo)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Gu,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=async f=>{let{runInTransaction:v,args:R,...A}=f,I={...n,...A};R&&(I.args=i.middlewareArgsToRequestArgs(R)),n.transaction!==void 0&&v===!1&&delete I.transaction;let C=await Vo(this,I);return I.model?Lo({result:C,modelName:I.model,args:I.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):C};return this._tracingHelper.runInChildSpan(s.operation,()=>a(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:v,transaction:R,unpacker:A,otelParentCtx:I,customDataProxyFetch:C}){try{n=v?v(n):n;let L={name:"serialize"},D=this._tracingHelper.runInChildSpan(L,()=>_r({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return j.enabled("prisma:client")&&(De("Prisma Client call:"),De(`prisma.${i}(${xo(n)})`),De("Generated request:"),De(JSON.stringify(D,null,2)+` +`)),R?.kind==="batch"&&await R.lock,this._requestHandler.request({protocolQuery:D,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:R,unpacker:A,otelParentCtx:I,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:C})}catch(L){throw L.clientVersion=this._clientVersion,L}}$metrics=new nt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ko}return e}function Ms(t,e){return Ku(t)?[new ne(t,e),hs]:[t,bs]}function Ku(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();p();m();d();l();var Hu=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ns(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Hu.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm-engine-edge.js.map diff --git a/lib/generated/prisma/schema.prisma b/lib/generated/prisma/schema.prisma new file mode 100644 index 0000000..e90dc32 --- /dev/null +++ b/lib/generated/prisma/schema.prisma @@ -0,0 +1,395 @@ +generator client { + provider = "prisma-client-js" + engineType = "client" + output = "../lib/generated/prisma" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +enum Role { + USER + ADMIN +} + +enum Position { + GK + DEF + MID + FWD +} + +enum MatchStage { + GROUP + ROUND_OF_16 + QUARTER_FINAL + SEMI_FINAL + THIRD_PLACE + FINAL +} + +enum MatchStatus { + SCHEDULED + LIVE + FINISHED +} + +enum TeamStatus { + PENDING + APPROVED + REJECTED + ACTIVE + INACTIVE +} + +enum PaymentStatus { + PENDING + SUCCESS + FAILED +} + +enum CardTier { + BRONZE + SILVER + GOLD +} + +enum EventType { + GOAL + ASSIST + YELLOW_CARD + RED_CARD + SECOND_YELLOW + SUBSTITUTION_IN + SUBSTITUTION_OUT + INJURY_NO_SUB + CLEAN_SHEET + PENALTY_SAVED + PENALTY_MISSED + OWN_GOAL + EXTRA_TIME_BONUS + MOTM +} + +model Country { + id String @id @default(cuid()) + name String @unique + code String @unique + flagUrl String? + flagImage String? // نام فایل پرچم مثل Flag_of_Australia.webp + confederation String? // کنفدراسیون (UEFA, AFC, CAF, ...) + qualificationMethod String? // شیوه راه‌یابی + qualificationDate String? // تاریخ راه‌یابی + participationHistory String? // سابقه شرکت + bestResult String? // بهترین نتیجه + description String? @db.Text // توضیحات کامل + defaultFormation String @default("4-3-3") + defaultLineupPlayerIds String[] @default([]) + defaultCaptainId String? // شناسه کاپیتان پیش‌فرض + group Group? @relation(fields: [groupId], references: [id]) + groupId String? + isEliminated Boolean @default(false) + players Player[] + homeMatches Match[] @relation("HomeTeam") + awayMatches Match[] @relation("AwayTeam") +} + +model Group { + id String @id @default(cuid()) + name String @unique + countries Country[] +} + +model Player { + id String @id @default(cuid()) + name String + image String? // نام فایل تصویر در public/uploads/players/ + position Position + countryId String + country Country @relation(fields: [countryId], references: [id]) + price Float @default(5.0) + totalPoints Int @default(0) + isActive Boolean @default(true) + isGoldenCardEligible Boolean @default(false) + cardTier CardTier @default(BRONZE) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + matchStats PlayerMatchStat[] + teamPlayers TeamPlayer[] + events MatchEvent[] + goldenCards GoldenCard[] +} + +model Match { + id String @id @default(cuid()) + homeTeamId String + awayTeamId String + homeTeam Country @relation("HomeTeam", fields: [homeTeamId], references: [id]) + awayTeam Country @relation("AwayTeam", fields: [awayTeamId], references: [id]) + homeScore Int? + awayScore Int? + stage MatchStage @default(GROUP) + status MatchStatus @default(SCHEDULED) + matchDate DateTime + matchDatePersian String? // تاریخ شمسی + stadium String? // نام ورزشگاه + city String? // شهر + referee String? // داور اصلی + assistant1 String? // کمک داور 1 + assistant2 String? // کمک داور 2 + fourthOfficial String? // داور چهارم + attendance Int? // تعداد تماشاگر + weather String? // وضعیت آب و هوا + description String? @db.Text // توضیحات بازی + roundId String? + round Round? @relation(fields: [roundId], references: [id]) + playerStats PlayerMatchStat[] + events MatchEvent[] + lineups MatchLineup[] + createdAt DateTime @default(now()) +} + +model Round { + id String @id @default(cuid()) + number Int @unique + name String + isActive Boolean @default(false) + deadline DateTime + matches Match[] + createdAt DateTime @default(now()) +} + +model Gameweek { + id String @id @default(cuid()) + number Int @unique + name String + isActive Boolean @default(false) + deadline DateTime + createdAt DateTime @default(now()) +} + +model MatchEvent { + id String @id @default(cuid()) + matchId String + playerId String + match Match @relation(fields: [matchId], references: [id], onDelete: Cascade) + player Player @relation(fields: [playerId], references: [id], onDelete: Cascade) + type EventType + minute Int? + extraInfo String? + createdAt DateTime @default(now()) +} + +model MatchLineup { + id String @id @default(cuid()) + matchId String + countryId String + match Match @relation(fields: [matchId], references: [id], onDelete: Cascade) + formation String + playerIds String[] +} + +model PlayerMatchStat { + id String @id @default(cuid()) + playerId String + matchId String + player Player @relation(fields: [playerId], references: [id], onDelete: Cascade) + match Match @relation(fields: [matchId], references: [id], onDelete: Cascade) + goals Int @default(0) + assists Int @default(0) + yellowCards Int @default(0) + redCards Int @default(0) + minutesPlayed Int @default(0) + cleanSheet Boolean @default(false) + penaltySaved Int @default(0) + penaltyMissed Int @default(0) + ownGoals Int @default(0) + isMotm Boolean @default(false) + extraTimeBonus Int @default(0) + points Int @default(0) + + @@unique([playerId, matchId]) +} + +model ScoringRule { + id String @id @default(cuid()) + position Position + eventType EventType + points Int + updatedAt DateTime @updatedAt + updatedBy String? + + @@unique([position, eventType]) +} + +model User { + id String @id @default(cuid()) + name String? + email String @unique + phone String? @unique + password String + role Role @default(USER) + createdAt DateTime @default(now()) + team Team? + sessions Session[] + payments Payment[] + quizSubmissions QuizSubmission[] + goldenCards GoldenCard[] +} + +model LoginOtp { + id String @id @default(cuid()) + phone String + codeHash String + attempts Int @default(0) + expiresAt DateTime + consumedAt DateTime? + createdAt DateTime @default(now()) + + @@index([phone, createdAt]) +} + +model FantasyNews { + id String @id @default(cuid()) + icon String + title String + description String @db.Text + newsTime DateTime + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([newsTime]) +} + +enum GoldenCardStatus { + SEALED + OPENED +} + +enum SpecialCardState { + IN_INVENTORY + IN_TEAM + SOLD +} + +model DailyQuiz { + id String @id @default(cuid()) + date DateTime @db.Date + windowStart DateTime + windowEnd DateTime + goldWinnersCount Int @default(1) + silverWinnersCount Int @default(0) + bronzeWinnersCount Int @default(0) + goldMinCorrect Int? + silverMinCorrect Int? + bronzeMinCorrect Int? + isProcessed Boolean @default(false) + createdAt DateTime @default(now()) + questions QuizQuestion[] + submissions QuizSubmission[] + awardedCards GoldenCard[] + + @@unique([date]) +} + +model QuizQuestion { + id String @id @default(cuid()) + quizId String + quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade) + questionText String + options String[] + correctAnswer Int // index of correct option (0-based) + order Int @default(0) +} + +model QuizSubmission { + id String @id @default(cuid()) + userId String + quizId String + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade) + answers Int[] // user's selected option indexes + correctAnswers Int @default(0) + score Int @default(0) // percentage 0-100 + submittedAt DateTime @default(now()) + + @@unique([userId, quizId]) +} + +model GoldenCard { + id String @id @default(cuid()) + userId String + quizId String? + playerId String + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + quiz DailyQuiz? @relation(fields: [quizId], references: [id], onDelete: SetNull) + player Player @relation(fields: [playerId], references: [id], onDelete: Cascade) + cardTier CardTier @default(GOLD) + status GoldenCardStatus @default(SEALED) + state SpecialCardState @default(IN_INVENTORY) + acquiredDate DateTime @default(now()) + openedAt DateTime? + teamPlayer TeamPlayer? +} + +model Session { + id String @id @default(cuid()) + sessionToken String @unique + userId String + expires DateTime + user User @relation(fields: [userId], references: [id], onDelete: Cascade) +} + +model Team { + id String @id @default(cuid()) + name String + userId String @unique + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + budget Float @default(100.0) + totalPoints Int @default(0) + formation String @default("4-3-3") + status TeamStatus @default(INACTIVE) + createdAt DateTime @default(now()) + players TeamPlayer[] +} + +model TeamPlayer { + teamId String + playerId String + goldenCardId String? @unique + isCaptain Boolean @default(false) + isViceCaptain Boolean @default(false) + isBench Boolean @default(false) + positionIndex Int @default(0) + team Team @relation(fields: [teamId], references: [id], onDelete: Cascade) + player Player @relation(fields: [playerId], references: [id], onDelete: Cascade) + goldenCard GoldenCard? @relation(fields: [goldenCardId], references: [id], onDelete: SetNull) + + @@id([teamId, playerId]) +} + +model Package { + id String @id @default(cuid()) + name String + budgetBonus Float + price Int + description String? + isActive Boolean @default(true) + payments Payment[] +} + +model Payment { + id String @id @default(cuid()) + userId String + packageId String + user User @relation(fields: [userId], references: [id]) + package Package @relation(fields: [packageId], references: [id]) + amount Int + authority String? @unique + refId String? + status PaymentStatus @default(PENDING) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} diff --git a/lib/generated/prisma/wasm-edge-light-loader.mjs b/lib/generated/prisma/wasm-edge-light-loader.mjs new file mode 100644 index 0000000..0a9d732 --- /dev/null +++ b/lib/generated/prisma/wasm-edge-light-loader.mjs @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +export default import('./query_compiler_bg.wasm?module') \ No newline at end of file diff --git a/lib/generated/prisma/wasm-worker-loader.mjs b/lib/generated/prisma/wasm-worker-loader.mjs new file mode 100644 index 0000000..15f856c --- /dev/null +++ b/lib/generated/prisma/wasm-worker-loader.mjs @@ -0,0 +1,5 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file +export default import('./query_compiler_bg.wasm') \ No newline at end of file diff --git a/lib/generated/prisma/wasm.d.ts b/lib/generated/prisma/wasm.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/lib/generated/prisma/wasm.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/lib/generated/prisma/wasm.js b/lib/generated/prisma/wasm.js new file mode 100644 index 0000000..65b12d9 --- /dev/null +++ b/lib/generated/prisma/wasm.js @@ -0,0 +1,538 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! +/* eslint-disable */ +// biome-ignore-all lint: generated file + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime, + createParam, +} = require('./runtime/wasm-compiler-edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ +Prisma.prismaVersion = { + client: "6.19.3", + engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CountryScalarFieldEnum = { + id: 'id', + name: 'name', + code: 'code', + flagUrl: 'flagUrl', + flagImage: 'flagImage', + confederation: 'confederation', + qualificationMethod: 'qualificationMethod', + qualificationDate: 'qualificationDate', + participationHistory: 'participationHistory', + bestResult: 'bestResult', + description: 'description', + defaultFormation: 'defaultFormation', + defaultLineupPlayerIds: 'defaultLineupPlayerIds', + defaultCaptainId: 'defaultCaptainId', + groupId: 'groupId', + isEliminated: 'isEliminated' +}; + +exports.Prisma.GroupScalarFieldEnum = { + id: 'id', + name: 'name' +}; + +exports.Prisma.PlayerScalarFieldEnum = { + id: 'id', + name: 'name', + image: 'image', + position: 'position', + countryId: 'countryId', + price: 'price', + totalPoints: 'totalPoints', + isActive: 'isActive', + isGoldenCardEligible: 'isGoldenCardEligible', + cardTier: 'cardTier', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.MatchScalarFieldEnum = { + id: 'id', + homeTeamId: 'homeTeamId', + awayTeamId: 'awayTeamId', + homeScore: 'homeScore', + awayScore: 'awayScore', + stage: 'stage', + status: 'status', + matchDate: 'matchDate', + matchDatePersian: 'matchDatePersian', + stadium: 'stadium', + city: 'city', + referee: 'referee', + assistant1: 'assistant1', + assistant2: 'assistant2', + fourthOfficial: 'fourthOfficial', + attendance: 'attendance', + weather: 'weather', + description: 'description', + roundId: 'roundId', + createdAt: 'createdAt' +}; + +exports.Prisma.RoundScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.GameweekScalarFieldEnum = { + id: 'id', + number: 'number', + name: 'name', + isActive: 'isActive', + deadline: 'deadline', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchEventScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + playerId: 'playerId', + type: 'type', + minute: 'minute', + extraInfo: 'extraInfo', + createdAt: 'createdAt' +}; + +exports.Prisma.MatchLineupScalarFieldEnum = { + id: 'id', + matchId: 'matchId', + countryId: 'countryId', + formation: 'formation', + playerIds: 'playerIds' +}; + +exports.Prisma.PlayerMatchStatScalarFieldEnum = { + id: 'id', + playerId: 'playerId', + matchId: 'matchId', + goals: 'goals', + assists: 'assists', + yellowCards: 'yellowCards', + redCards: 'redCards', + minutesPlayed: 'minutesPlayed', + cleanSheet: 'cleanSheet', + penaltySaved: 'penaltySaved', + penaltyMissed: 'penaltyMissed', + ownGoals: 'ownGoals', + isMotm: 'isMotm', + extraTimeBonus: 'extraTimeBonus', + points: 'points' +}; + +exports.Prisma.ScoringRuleScalarFieldEnum = { + id: 'id', + position: 'position', + eventType: 'eventType', + points: 'points', + updatedAt: 'updatedAt', + updatedBy: 'updatedBy' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + password: 'password', + role: 'role', + createdAt: 'createdAt' +}; + +exports.Prisma.LoginOtpScalarFieldEnum = { + id: 'id', + phone: 'phone', + codeHash: 'codeHash', + attempts: 'attempts', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.FantasyNewsScalarFieldEnum = { + id: 'id', + icon: 'icon', + title: 'title', + description: 'description', + newsTime: 'newsTime', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.DailyQuizScalarFieldEnum = { + id: 'id', + date: 'date', + windowStart: 'windowStart', + windowEnd: 'windowEnd', + goldWinnersCount: 'goldWinnersCount', + silverWinnersCount: 'silverWinnersCount', + bronzeWinnersCount: 'bronzeWinnersCount', + goldMinCorrect: 'goldMinCorrect', + silverMinCorrect: 'silverMinCorrect', + bronzeMinCorrect: 'bronzeMinCorrect', + isProcessed: 'isProcessed', + createdAt: 'createdAt' +}; + +exports.Prisma.QuizQuestionScalarFieldEnum = { + id: 'id', + quizId: 'quizId', + questionText: 'questionText', + options: 'options', + correctAnswer: 'correctAnswer', + order: 'order' +}; + +exports.Prisma.QuizSubmissionScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + answers: 'answers', + correctAnswers: 'correctAnswers', + score: 'score', + submittedAt: 'submittedAt' +}; + +exports.Prisma.GoldenCardScalarFieldEnum = { + id: 'id', + userId: 'userId', + quizId: 'quizId', + playerId: 'playerId', + cardTier: 'cardTier', + status: 'status', + state: 'state', + acquiredDate: 'acquiredDate', + openedAt: 'openedAt' +}; + +exports.Prisma.SessionScalarFieldEnum = { + id: 'id', + sessionToken: 'sessionToken', + userId: 'userId', + expires: 'expires' +}; + +exports.Prisma.TeamScalarFieldEnum = { + id: 'id', + name: 'name', + userId: 'userId', + budget: 'budget', + totalPoints: 'totalPoints', + formation: 'formation', + status: 'status', + createdAt: 'createdAt' +}; + +exports.Prisma.TeamPlayerScalarFieldEnum = { + teamId: 'teamId', + playerId: 'playerId', + goldenCardId: 'goldenCardId', + isCaptain: 'isCaptain', + isViceCaptain: 'isViceCaptain', + isBench: 'isBench', + positionIndex: 'positionIndex' +}; + +exports.Prisma.PackageScalarFieldEnum = { + id: 'id', + name: 'name', + budgetBonus: 'budgetBonus', + price: 'price', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.PaymentScalarFieldEnum = { + id: 'id', + userId: 'userId', + packageId: 'packageId', + amount: 'amount', + authority: 'authority', + refId: 'refId', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; +exports.Role = exports.$Enums.Role = { + USER: 'USER', + ADMIN: 'ADMIN' +}; + +exports.Position = exports.$Enums.Position = { + GK: 'GK', + DEF: 'DEF', + MID: 'MID', + FWD: 'FWD' +}; + +exports.MatchStage = exports.$Enums.MatchStage = { + GROUP: 'GROUP', + ROUND_OF_16: 'ROUND_OF_16', + QUARTER_FINAL: 'QUARTER_FINAL', + SEMI_FINAL: 'SEMI_FINAL', + THIRD_PLACE: 'THIRD_PLACE', + FINAL: 'FINAL' +}; + +exports.MatchStatus = exports.$Enums.MatchStatus = { + SCHEDULED: 'SCHEDULED', + LIVE: 'LIVE', + FINISHED: 'FINISHED' +}; + +exports.TeamStatus = exports.$Enums.TeamStatus = { + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.PaymentStatus = exports.$Enums.PaymentStatus = { + PENDING: 'PENDING', + SUCCESS: 'SUCCESS', + FAILED: 'FAILED' +}; + +exports.CardTier = exports.$Enums.CardTier = { + BRONZE: 'BRONZE', + SILVER: 'SILVER', + GOLD: 'GOLD' +}; + +exports.EventType = exports.$Enums.EventType = { + GOAL: 'GOAL', + ASSIST: 'ASSIST', + YELLOW_CARD: 'YELLOW_CARD', + RED_CARD: 'RED_CARD', + SECOND_YELLOW: 'SECOND_YELLOW', + SUBSTITUTION_IN: 'SUBSTITUTION_IN', + SUBSTITUTION_OUT: 'SUBSTITUTION_OUT', + INJURY_NO_SUB: 'INJURY_NO_SUB', + CLEAN_SHEET: 'CLEAN_SHEET', + PENALTY_SAVED: 'PENALTY_SAVED', + PENALTY_MISSED: 'PENALTY_MISSED', + OWN_GOAL: 'OWN_GOAL', + EXTRA_TIME_BONUS: 'EXTRA_TIME_BONUS', + MOTM: 'MOTM' +}; + +exports.GoldenCardStatus = exports.$Enums.GoldenCardStatus = { + SEALED: 'SEALED', + OPENED: 'OPENED' +}; + +exports.SpecialCardState = exports.$Enums.SpecialCardState = { + IN_INVENTORY: 'IN_INVENTORY', + IN_TEAM: 'IN_TEAM', + SOLD: 'SOLD' +}; + +exports.Prisma.ModelName = { + Country: 'Country', + Group: 'Group', + Player: 'Player', + Match: 'Match', + Round: 'Round', + Gameweek: 'Gameweek', + MatchEvent: 'MatchEvent', + MatchLineup: 'MatchLineup', + PlayerMatchStat: 'PlayerMatchStat', + ScoringRule: 'ScoringRule', + User: 'User', + LoginOtp: 'LoginOtp', + FantasyNews: 'FantasyNews', + DailyQuiz: 'DailyQuiz', + QuizQuestion: 'QuizQuestion', + QuizSubmission: 'QuizSubmission', + GoldenCard: 'GoldenCard', + Session: 'Session', + Team: 'Team', + TeamPlayer: 'TeamPlayer', + Package: 'Package', + Payment: 'Payment' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "C:\\Users\\s.roosta\\Desktop\\football-next\\lib\\generated\\prisma", + "fromEnvVar": null + }, + "config": { + "engineType": "client" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + } + ], + "previewFeatures": [], + "sourceFilePath": "C:\\Users\\s.roosta\\Desktop\\football-next\\prisma\\schema.prisma", + "isCustomOutput": true + }, + "relativeEnvPaths": { + "rootEnvPath": "../../../.env", + "schemaEnvPath": "../../../.env" + }, + "relativePath": "../../../prisma", + "clientVersion": "6.19.3", + "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n engineType = \"client\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum Role {\n USER\n ADMIN\n}\n\nenum Position {\n GK\n DEF\n MID\n FWD\n}\n\nenum MatchStage {\n GROUP\n ROUND_OF_16\n QUARTER_FINAL\n SEMI_FINAL\n THIRD_PLACE\n FINAL\n}\n\nenum MatchStatus {\n SCHEDULED\n LIVE\n FINISHED\n}\n\nenum TeamStatus {\n PENDING\n APPROVED\n REJECTED\n ACTIVE\n INACTIVE\n}\n\nenum PaymentStatus {\n PENDING\n SUCCESS\n FAILED\n}\n\nenum CardTier {\n BRONZE\n SILVER\n GOLD\n}\n\nenum EventType {\n GOAL\n ASSIST\n YELLOW_CARD\n RED_CARD\n SECOND_YELLOW\n SUBSTITUTION_IN\n SUBSTITUTION_OUT\n INJURY_NO_SUB\n CLEAN_SHEET\n PENALTY_SAVED\n PENALTY_MISSED\n OWN_GOAL\n EXTRA_TIME_BONUS\n MOTM\n}\n\nmodel Country {\n id String @id @default(cuid())\n name String @unique\n code String @unique\n flagUrl String?\n flagImage String? // نام فایل پرچم مثل Flag_of_Australia.webp\n confederation String? // کنفدراسیون (UEFA, AFC, CAF, ...)\n qualificationMethod String? // شیوه راه‌یابی\n qualificationDate String? // تاریخ راه‌یابی\n participationHistory String? // سابقه شرکت\n bestResult String? // بهترین نتیجه\n description String? @db.Text // توضیحات کامل\n defaultFormation String @default(\"4-3-3\")\n defaultLineupPlayerIds String[] @default([])\n defaultCaptainId String? // شناسه کاپیتان پیش‌فرض\n group Group? @relation(fields: [groupId], references: [id])\n groupId String?\n isEliminated Boolean @default(false)\n players Player[]\n homeMatches Match[] @relation(\"HomeTeam\")\n awayMatches Match[] @relation(\"AwayTeam\")\n}\n\nmodel Group {\n id String @id @default(cuid())\n name String @unique\n countries Country[]\n}\n\nmodel Player {\n id String @id @default(cuid())\n name String\n image String? // نام فایل تصویر در public/uploads/players/\n position Position\n countryId String\n country Country @relation(fields: [countryId], references: [id])\n price Float @default(5.0)\n totalPoints Int @default(0)\n isActive Boolean @default(true)\n isGoldenCardEligible Boolean @default(false)\n cardTier CardTier @default(BRONZE)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n matchStats PlayerMatchStat[]\n teamPlayers TeamPlayer[]\n events MatchEvent[]\n goldenCards GoldenCard[]\n}\n\nmodel Match {\n id String @id @default(cuid())\n homeTeamId String\n awayTeamId String\n homeTeam Country @relation(\"HomeTeam\", fields: [homeTeamId], references: [id])\n awayTeam Country @relation(\"AwayTeam\", fields: [awayTeamId], references: [id])\n homeScore Int?\n awayScore Int?\n stage MatchStage @default(GROUP)\n status MatchStatus @default(SCHEDULED)\n matchDate DateTime\n matchDatePersian String? // تاریخ شمسی\n stadium String? // نام ورزشگاه\n city String? // شهر\n referee String? // داور اصلی\n assistant1 String? // کمک داور 1\n assistant2 String? // کمک داور 2\n fourthOfficial String? // داور چهارم\n attendance Int? // تعداد تماشاگر\n weather String? // وضعیت آب و هوا\n description String? @db.Text // توضیحات بازی\n roundId String?\n round Round? @relation(fields: [roundId], references: [id])\n playerStats PlayerMatchStat[]\n events MatchEvent[]\n lineups MatchLineup[]\n createdAt DateTime @default(now())\n}\n\nmodel Round {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n matches Match[]\n createdAt DateTime @default(now())\n}\n\nmodel Gameweek {\n id String @id @default(cuid())\n number Int @unique\n name String\n isActive Boolean @default(false)\n deadline DateTime\n createdAt DateTime @default(now())\n}\n\nmodel MatchEvent {\n id String @id @default(cuid())\n matchId String\n playerId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n type EventType\n minute Int?\n extraInfo String?\n createdAt DateTime @default(now())\n}\n\nmodel MatchLineup {\n id String @id @default(cuid())\n matchId String\n countryId String\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n formation String\n playerIds String[]\n}\n\nmodel PlayerMatchStat {\n id String @id @default(cuid())\n playerId String\n matchId String\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n match Match @relation(fields: [matchId], references: [id], onDelete: Cascade)\n goals Int @default(0)\n assists Int @default(0)\n yellowCards Int @default(0)\n redCards Int @default(0)\n minutesPlayed Int @default(0)\n cleanSheet Boolean @default(false)\n penaltySaved Int @default(0)\n penaltyMissed Int @default(0)\n ownGoals Int @default(0)\n isMotm Boolean @default(false)\n extraTimeBonus Int @default(0)\n points Int @default(0)\n\n @@unique([playerId, matchId])\n}\n\nmodel ScoringRule {\n id String @id @default(cuid())\n position Position\n eventType EventType\n points Int\n updatedAt DateTime @updatedAt\n updatedBy String?\n\n @@unique([position, eventType])\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n phone String? @unique\n password String\n role Role @default(USER)\n createdAt DateTime @default(now())\n team Team?\n sessions Session[]\n payments Payment[]\n quizSubmissions QuizSubmission[]\n goldenCards GoldenCard[]\n}\n\nmodel LoginOtp {\n id String @id @default(cuid())\n phone String\n codeHash String\n attempts Int @default(0)\n expiresAt DateTime\n consumedAt DateTime?\n createdAt DateTime @default(now())\n\n @@index([phone, createdAt])\n}\n\nmodel FantasyNews {\n id String @id @default(cuid())\n icon String\n title String\n description String @db.Text\n newsTime DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([newsTime])\n}\n\nenum GoldenCardStatus {\n SEALED\n OPENED\n}\n\nenum SpecialCardState {\n IN_INVENTORY\n IN_TEAM\n SOLD\n}\n\nmodel DailyQuiz {\n id String @id @default(cuid())\n date DateTime @db.Date\n windowStart DateTime\n windowEnd DateTime\n goldWinnersCount Int @default(1)\n silverWinnersCount Int @default(0)\n bronzeWinnersCount Int @default(0)\n goldMinCorrect Int?\n silverMinCorrect Int?\n bronzeMinCorrect Int?\n isProcessed Boolean @default(false)\n createdAt DateTime @default(now())\n questions QuizQuestion[]\n submissions QuizSubmission[]\n awardedCards GoldenCard[]\n\n @@unique([date])\n}\n\nmodel QuizQuestion {\n id String @id @default(cuid())\n quizId String\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n questionText String\n options String[]\n correctAnswer Int // index of correct option (0-based)\n order Int @default(0)\n}\n\nmodel QuizSubmission {\n id String @id @default(cuid())\n userId String\n quizId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz @relation(fields: [quizId], references: [id], onDelete: Cascade)\n answers Int[] // user's selected option indexes\n correctAnswers Int @default(0)\n score Int @default(0) // percentage 0-100\n submittedAt DateTime @default(now())\n\n @@unique([userId, quizId])\n}\n\nmodel GoldenCard {\n id String @id @default(cuid())\n userId String\n quizId String?\n playerId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n quiz DailyQuiz? @relation(fields: [quizId], references: [id], onDelete: SetNull)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n cardTier CardTier @default(GOLD)\n status GoldenCardStatus @default(SEALED)\n state SpecialCardState @default(IN_INVENTORY)\n acquiredDate DateTime @default(now())\n openedAt DateTime?\n teamPlayer TeamPlayer?\n}\n\nmodel Session {\n id String @id @default(cuid())\n sessionToken String @unique\n userId String\n expires DateTime\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel Team {\n id String @id @default(cuid())\n name String\n userId String @unique\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n budget Float @default(100.0)\n totalPoints Int @default(0)\n formation String @default(\"4-3-3\")\n status TeamStatus @default(INACTIVE)\n createdAt DateTime @default(now())\n players TeamPlayer[]\n}\n\nmodel TeamPlayer {\n teamId String\n playerId String\n goldenCardId String? @unique\n isCaptain Boolean @default(false)\n isViceCaptain Boolean @default(false)\n isBench Boolean @default(false)\n positionIndex Int @default(0)\n team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)\n player Player @relation(fields: [playerId], references: [id], onDelete: Cascade)\n goldenCard GoldenCard? @relation(fields: [goldenCardId], references: [id], onDelete: SetNull)\n\n @@id([teamId, playerId])\n}\n\nmodel Package {\n id String @id @default(cuid())\n name String\n budgetBonus Float\n price Int\n description String?\n isActive Boolean @default(true)\n payments Payment[]\n}\n\nmodel Payment {\n id String @id @default(cuid())\n userId String\n packageId String\n user User @relation(fields: [userId], references: [id])\n package Package @relation(fields: [packageId], references: [id])\n amount Int\n authority String? @unique\n refId String?\n status PaymentStatus @default(PENDING)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", + "inlineSchemaHash": "97ad530f39fbd0a5b25054636137b2d4c6123d03a537c2ff3b9a51a4155369d0", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Country\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"flagUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"flagImage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"confederation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qualificationMethod\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"qualificationDate\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"participationHistory\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bestResult\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultFormation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultLineupPlayerIds\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"defaultCaptainId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"group\",\"kind\":\"object\",\"type\":\"Group\",\"relationName\":\"CountryToGroup\"},{\"name\":\"groupId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isEliminated\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"players\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"CountryToPlayer\"},{\"name\":\"homeMatches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"HomeTeam\"},{\"name\":\"awayMatches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"AwayTeam\"}],\"dbName\":null},\"Group\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"countries\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"CountryToGroup\"}],\"dbName\":null},\"Player\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"image\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"position\",\"kind\":\"enum\",\"type\":\"Position\"},{\"name\":\"countryId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"CountryToPlayer\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isGoldenCardEligible\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"cardTier\",\"kind\":\"enum\",\"type\":\"CardTier\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matchStats\",\"kind\":\"object\",\"type\":\"PlayerMatchStat\",\"relationName\":\"PlayerToPlayerMatchStat\"},{\"name\":\"teamPlayers\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"PlayerToTeamPlayer\"},{\"name\":\"events\",\"kind\":\"object\",\"type\":\"MatchEvent\",\"relationName\":\"MatchEventToPlayer\"},{\"name\":\"goldenCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToPlayer\"}],\"dbName\":null},\"Match\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"homeTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"awayTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"homeTeam\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"HomeTeam\"},{\"name\":\"awayTeam\",\"kind\":\"object\",\"type\":\"Country\",\"relationName\":\"AwayTeam\"},{\"name\":\"homeScore\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"awayScore\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stage\",\"kind\":\"enum\",\"type\":\"MatchStage\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"MatchStatus\"},{\"name\":\"matchDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matchDatePersian\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stadium\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referee\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assistant1\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"assistant2\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fourthOfficial\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attendance\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"weather\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roundId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"round\",\"kind\":\"object\",\"type\":\"Round\",\"relationName\":\"MatchToRound\"},{\"name\":\"playerStats\",\"kind\":\"object\",\"type\":\"PlayerMatchStat\",\"relationName\":\"MatchToPlayerMatchStat\"},{\"name\":\"events\",\"kind\":\"object\",\"type\":\"MatchEvent\",\"relationName\":\"MatchToMatchEvent\"},{\"name\":\"lineups\",\"kind\":\"object\",\"type\":\"MatchLineup\",\"relationName\":\"MatchToMatchLineup\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Round\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"deadline\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"matches\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToRound\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Gameweek\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"number\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"deadline\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"MatchEvent\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToMatchEvent\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"MatchEventToPlayer\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"EventType\"},{\"name\":\"minute\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"extraInfo\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"MatchLineup\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"countryId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToMatchLineup\"},{\"name\":\"formation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerIds\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"PlayerMatchStat\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"matchId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"PlayerToPlayerMatchStat\"},{\"name\":\"match\",\"kind\":\"object\",\"type\":\"Match\",\"relationName\":\"MatchToPlayerMatchStat\"},{\"name\":\"goals\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"assists\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"yellowCards\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"redCards\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"minutesPlayed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"cleanSheet\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"penaltySaved\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"penaltyMissed\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ownGoals\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isMotm\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"extraTimeBonus\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"points\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"ScoringRule\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"position\",\"kind\":\"enum\",\"type\":\"Position\"},{\"name\":\"eventType\",\"kind\":\"enum\",\"type\":\"EventType\"},{\"name\":\"points\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedBy\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Role\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"team\",\"kind\":\"object\",\"type\":\"Team\",\"relationName\":\"TeamToUser\"},{\"name\":\"sessions\",\"kind\":\"object\",\"type\":\"Session\",\"relationName\":\"SessionToUser\"},{\"name\":\"payments\",\"kind\":\"object\",\"type\":\"Payment\",\"relationName\":\"PaymentToUser\"},{\"name\":\"quizSubmissions\",\"kind\":\"object\",\"type\":\"QuizSubmission\",\"relationName\":\"QuizSubmissionToUser\"},{\"name\":\"goldenCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToUser\"}],\"dbName\":null},\"LoginOtp\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"codeHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attempts\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"FantasyNews\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"icon\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"newsTime\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"DailyQuiz\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"windowStart\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"windowEnd\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"goldWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"silverWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bronzeWinnersCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"goldMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"silverMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bronzeMinCorrect\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isProcessed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"questions\",\"kind\":\"object\",\"type\":\"QuizQuestion\",\"relationName\":\"DailyQuizToQuizQuestion\"},{\"name\":\"submissions\",\"kind\":\"object\",\"type\":\"QuizSubmission\",\"relationName\":\"DailyQuizToQuizSubmission\"},{\"name\":\"awardedCards\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"DailyQuizToGoldenCard\"}],\"dbName\":null},\"QuizQuestion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToQuizQuestion\"},{\"name\":\"questionText\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"options\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"correctAnswer\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"order\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":null},\"QuizSubmission\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"QuizSubmissionToUser\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToQuizSubmission\"},{\"name\":\"answers\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"correctAnswers\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"score\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"submittedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"GoldenCard\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quizId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"GoldenCardToUser\"},{\"name\":\"quiz\",\"kind\":\"object\",\"type\":\"DailyQuiz\",\"relationName\":\"DailyQuizToGoldenCard\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"GoldenCardToPlayer\"},{\"name\":\"cardTier\",\"kind\":\"enum\",\"type\":\"CardTier\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"GoldenCardStatus\"},{\"name\":\"state\",\"kind\":\"enum\",\"type\":\"SpecialCardState\"},{\"name\":\"acquiredDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"openedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"teamPlayer\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"GoldenCardToTeamPlayer\"}],\"dbName\":null},\"Session\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"SessionToUser\"}],\"dbName\":null},\"Team\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"TeamToUser\"},{\"name\":\"budget\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalPoints\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"formation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"TeamStatus\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"players\",\"kind\":\"object\",\"type\":\"TeamPlayer\",\"relationName\":\"TeamToTeamPlayer\"}],\"dbName\":null},\"TeamPlayer\":{\"fields\":[{\"name\":\"teamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"goldenCardId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isCaptain\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isViceCaptain\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isBench\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"positionIndex\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"team\",\"kind\":\"object\",\"type\":\"Team\",\"relationName\":\"TeamToTeamPlayer\"},{\"name\":\"player\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"PlayerToTeamPlayer\"},{\"name\":\"goldenCard\",\"kind\":\"object\",\"type\":\"GoldenCard\",\"relationName\":\"GoldenCardToTeamPlayer\"}],\"dbName\":null},\"Package\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"budgetBonus\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"payments\",\"kind\":\"object\",\"type\":\"Payment\",\"relationName\":\"PackageToPayment\"}],\"dbName\":null},\"Payment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"packageId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"PaymentToUser\"},{\"name\":\"package\",\"kind\":\"object\",\"type\":\"Package\",\"relationName\":\"PackageToPayment\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"authority\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"PaymentStatus\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined +config.compilerWasm = { + getRuntime: async () => require('./query_compiler_bg.js'), + getQueryCompilerWasmModule: async () => { + const loader = (await import('#wasm-compiler-loader')).default + const compiler = (await loader).default + return compiler + } +} + +config.injectableEdgeEnv = () => ({ + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/package.json b/package.json index 0f5cd82..086a52b 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "scripts": { "dev": "next dev", "build": "prisma generate && next build", + "build:docker": "next build", "start": "next start", "db:push": "prisma db push", "db:generate": "prisma generate", diff --git a/scripts/copy-prisma-generated.ps1 b/scripts/copy-prisma-generated.ps1 index bf9cbd0..0484dca 100644 --- a/scripts/copy-prisma-generated.ps1 +++ b/scripts/copy-prisma-generated.ps1 @@ -1,28 +1,19 @@ -# اسکریپت کپی کردن Prisma generated files برای deployment +Write-Host "Generating Prisma client for deployment..." -ForegroundColor Cyan -Write-Host "Copying Prisma generated files..." -ForegroundColor Cyan +npx prisma generate +if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE +} -# ساخت پوشه -New-Item -ItemType Directory -Force -Path "prisma/generated" | Out-Null - -# بررسی وجود فایل‌ها -if (-not (Test-Path "node_modules/.prisma/client")) { - Write-Host "Error: Prisma client not found!" -ForegroundColor Red - Write-Host "Please run: npm install && npx prisma generate" -ForegroundColor Yellow +if (-not (Test-Path "lib/generated/prisma/index.js")) { + Write-Host "Error: lib/generated/prisma/index.js was not created." -ForegroundColor Red exit 1 } -# کپی کردن -Write-Host "Copying .prisma/client..." -ForegroundColor Green -Copy-Item -Recurse -Force "node_modules/.prisma/client" "prisma/generated/.prisma-client" - -Write-Host "Copying @prisma/client..." -ForegroundColor Green -Copy-Item -Recurse -Force "node_modules/@prisma/client" "prisma/generated/@prisma-client" - Write-Host "" -Write-Host "✓ Files copied successfully!" -ForegroundColor Green +Write-Host "Prisma client generated successfully." -ForegroundColor Green Write-Host "" -Write-Host "Now commit and push:" -ForegroundColor Cyan -Write-Host "git add prisma/generated" -Write-Host "git commit -m 'Add pre-generated Prisma client'" +Write-Host "Commit these files before deploying:" -ForegroundColor Cyan +Write-Host "git add lib/generated/prisma" +Write-Host "git commit -m 'Add generated Prisma client'" Write-Host "git push" diff --git a/scripts/copy-prisma-generated.sh b/scripts/copy-prisma-generated.sh index 818dbad..96e2b1e 100644 --- a/scripts/copy-prisma-generated.sh +++ b/scripts/copy-prisma-generated.sh @@ -1,28 +1,19 @@ #!/bin/bash +set -e -echo "Copying Prisma generated files..." +echo "Generating Prisma client for deployment..." -# ساخت پوشه -mkdir -p prisma/generated +npx prisma generate -# بررسی وجود فایل‌ها -if [ ! -d "node_modules/.prisma/client" ]; then - echo "Error: Prisma client not found!" - echo "Please run: npm install && npx prisma generate" +if [ ! -f "lib/generated/prisma/index.js" ]; then + echo "Error: lib/generated/prisma/index.js was not created." exit 1 fi -# کپی کردن -echo "Copying .prisma/client..." -cp -r node_modules/.prisma/client prisma/generated/.prisma-client - -echo "Copying @prisma/client..." -cp -r node_modules/@prisma/client prisma/generated/@prisma-client - echo "" -echo "✓ Files copied successfully!" +echo "Prisma client generated successfully." echo "" -echo "Now commit and push:" -echo "git add prisma/generated" -echo "git commit -m 'Add pre-generated Prisma client'" +echo "Commit these files before deploying:" +echo "git add lib/generated/prisma" +echo "git commit -m 'Add generated Prisma client'" echo "git push"