diff --git a/.env b/.env new file mode 100644 index 0000000..67e296f --- /dev/null +++ b/.env @@ -0,0 +1,10 @@ +# Environment variables declared in this file are NOT automatically loaded by Prisma. +# Please add `import "dotenv/config";` to your `prisma.config.ts` file, or use the Prisma CLI with Bun +# to load environment variables from .env files: https://pris.ly/prisma-config-env-vars. + +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings + +DATABASE_URL="file:./dev.db" +AUTH_SECRET="your-secret-key-change-this-in-production" +AUTH_URL="http://localhost:3000" diff --git a/.gitignore b/.gitignore index 1403e90..cc21f11 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,10 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts +# database +*.db +*.db-journal +dev.db* + +# prisma +/app/generated/prisma diff --git a/app/admin/page.tsx b/app/admin/page.tsx new file mode 100644 index 0000000..0d36b11 --- /dev/null +++ b/app/admin/page.tsx @@ -0,0 +1,253 @@ +"use client"; + +import { useEffect, useState } from "react"; +import { useSession } from "next-auth/react"; +import { useRouter } from "next/navigation"; +import Navigation from "@/components/Navigation"; + +interface UserPreferences { + id: string; + userId: string; + homeBackground: string | null; + eventsBackground: string | null; + leaderboardBackground: string | null; + user: { + id: string; + username: string; + email: string; + }; +} + +export default function AdminPage() { + const { data: session, status } = useSession(); + const router = useRouter(); + const [preferences, setPreferences] = useState([]); + const [loading, setLoading] = useState(true); + const [editingUserId, setEditingUserId] = useState(null); + const [formData, setFormData] = useState({ + homeBackground: "", + eventsBackground: "", + leaderboardBackground: "", + }); + + useEffect(() => { + if (status === "unauthenticated") { + router.push("/login"); + return; + } + + if (status === "authenticated" && session?.user?.role !== "ADMIN") { + router.push("/"); + return; + } + + if (status === "authenticated" && session?.user?.role === "ADMIN") { + fetchPreferences(); + } + }, [status, session, router]); + + const fetchPreferences = async () => { + try { + const response = await fetch("/api/admin/preferences"); + if (response.ok) { + const data = await response.json(); + setPreferences(data); + } + } catch (error) { + console.error("Error fetching preferences:", error); + } finally { + setLoading(false); + } + }; + + const handleEdit = (pref: UserPreferences) => { + setEditingUserId(pref.userId); + setFormData({ + homeBackground: pref.homeBackground || "", + eventsBackground: pref.eventsBackground || "", + leaderboardBackground: pref.leaderboardBackground || "", + }); + }; + + const handleSave = async () => { + if (!editingUserId) return; + + try { + const response = await fetch("/api/admin/preferences", { + method: "PUT", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + userId: editingUserId, + ...formData, + }), + }); + + if (response.ok) { + await fetchPreferences(); + setEditingUserId(null); + setFormData({ + homeBackground: "", + eventsBackground: "", + leaderboardBackground: "", + }); + } + } catch (error) { + console.error("Error updating preferences:", error); + } + }; + + const handleCancel = () => { + setEditingUserId(null); + setFormData({ + homeBackground: "", + eventsBackground: "", + leaderboardBackground: "", + }); + }; + + if (status === "loading" || loading) { + return ( +
+ +
+ Chargement... +
+
+ ); + } + + return ( +
+ +
+
+

+ + ADMIN - GESTION DES PRÉFÉRENCES UI + +

+ +
+
+ {preferences.map((pref) => ( +
+
+
+

+ {pref.user.username} +

+

{pref.user.email}

+
+ {editingUserId !== pref.userId && ( + + )} +
+ + {editingUserId === pref.userId ? ( +
+
+ + + setFormData({ + ...formData, + homeBackground: e.target.value, + }) + } + placeholder="/got-2.jpg" + className="w-full px-3 py-2 bg-black/60 border border-pixel-gold/30 rounded text-white text-sm" + /> +
+
+ + + setFormData({ + ...formData, + eventsBackground: e.target.value, + }) + } + placeholder="/got-2.jpg" + className="w-full px-3 py-2 bg-black/60 border border-pixel-gold/30 rounded text-white text-sm" + /> +
+
+ + + setFormData({ + ...formData, + leaderboardBackground: e.target.value, + }) + } + placeholder="/leaderboard-bg.jpg" + className="w-full px-3 py-2 bg-black/60 border border-pixel-gold/30 rounded text-white text-sm" + /> +
+
+ + +
+
+ ) : ( +
+
+ Home: {pref.homeBackground || "Par défaut"} +
+
+ Events: {pref.eventsBackground || "Par défaut"} +
+
+ Leaderboard:{" "} + {pref.leaderboardBackground || "Par défaut"} +
+
+ )} +
+ ))} + + {preferences.length === 0 && ( +
+ Aucune préférence trouvée +
+ )} +
+
+
+
+
+ ); +} + diff --git a/app/api/admin/preferences/route.ts b/app/api/admin/preferences/route.ts new file mode 100644 index 0000000..be663f4 --- /dev/null +++ b/app/api/admin/preferences/route.ts @@ -0,0 +1,76 @@ +import { NextResponse } from "next/server"; +import { auth } from "@/lib/auth"; +import { prisma } from "@/lib/prisma"; +import { Role } from "@/prisma/generated/prisma/client"; + +export async function GET() { + try { + const session = await auth(); + + if (!session?.user || session.user.role !== Role.ADMIN) { + return NextResponse.json({ error: "Accès refusé" }, { status: 403 }); + } + + // Récupérer toutes les préférences utilisateur + const preferences = await prisma.userPreferences.findMany({ + include: { + user: { + select: { + id: true, + username: true, + email: true, + }, + }, + }, + }); + + return NextResponse.json(preferences); + } catch (error) { + console.error("Error fetching admin preferences:", error); + return NextResponse.json( + { error: "Erreur lors de la récupération des préférences" }, + { status: 500 } + ); + } +} + +export async function PUT(request: Request) { + try { + const session = await auth(); + + if (!session?.user || session.user.role !== Role.ADMIN) { + return NextResponse.json({ error: "Accès refusé" }, { status: 403 }); + } + + const body = await request.json(); + const { userId, homeBackground, eventsBackground, leaderboardBackground } = + body; + + if (!userId) { + return NextResponse.json({ error: "userId requis" }, { status: 400 }); + } + + const preferences = await prisma.userPreferences.upsert({ + where: { userId }, + update: { + homeBackground: homeBackground ?? undefined, + eventsBackground: eventsBackground ?? undefined, + leaderboardBackground: leaderboardBackground ?? undefined, + }, + create: { + userId, + homeBackground: homeBackground ?? null, + eventsBackground: eventsBackground ?? null, + leaderboardBackground: leaderboardBackground ?? null, + }, + }); + + return NextResponse.json(preferences); + } catch (error) { + console.error("Error updating admin preferences:", error); + return NextResponse.json( + { error: "Erreur lors de la mise à jour des préférences" }, + { status: 500 } + ); + } +} diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000..1ce4350 --- /dev/null +++ b/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1,4 @@ +import { handlers } from "@/lib/auth"; + +export const { GET, POST } = handlers; + diff --git a/app/api/events/route.ts b/app/api/events/route.ts new file mode 100644 index 0000000..1f76b8f --- /dev/null +++ b/app/api/events/route.ts @@ -0,0 +1,21 @@ +import { NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +export async function GET() { + try { + const events = await prisma.event.findMany({ + orderBy: { + date: "asc", + }, + }); + + return NextResponse.json(events); + } catch (error) { + console.error("Error fetching events:", error); + return NextResponse.json( + { error: "Erreur lors de la récupération des événements" }, + { status: 500 } + ); + } +} + diff --git a/app/api/leaderboard/route.ts b/app/api/leaderboard/route.ts new file mode 100644 index 0000000..a0dca1f --- /dev/null +++ b/app/api/leaderboard/route.ts @@ -0,0 +1,37 @@ +import { NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +export async function GET() { + try { + const users = await prisma.user.findMany({ + orderBy: { + score: "desc", + }, + take: 10, + select: { + id: true, + username: true, + score: true, + level: true, + avatar: true, + }, + }); + + const leaderboard = users.map((user: { id: string; username: string; score: number; level: number; avatar: string | null }, index: number) => ({ + rank: index + 1, + username: user.username, + score: user.score, + level: user.level, + avatar: user.avatar, + })); + + return NextResponse.json(leaderboard); + } catch (error) { + console.error("Error fetching leaderboard:", error); + return NextResponse.json( + { error: "Erreur lors de la récupération du leaderboard" }, + { status: 500 } + ); + } +} + diff --git a/app/api/preferences/route.ts b/app/api/preferences/route.ts new file mode 100644 index 0000000..bdb074d --- /dev/null +++ b/app/api/preferences/route.ts @@ -0,0 +1,65 @@ +import { NextResponse } from "next/server"; +import { auth } from "@/lib/auth"; +import { prisma } from "@/lib/prisma"; +import { Role } from "@/prisma/generated/prisma/client"; + +export async function GET() { + try { + const session = await auth(); + + if (!session?.user) { + return NextResponse.json({ error: "Non authentifié" }, { status: 401 }); + } + + const preferences = await prisma.userPreferences.findUnique({ + where: { userId: session.user.id }, + }); + + return NextResponse.json(preferences || {}); + } catch (error) { + console.error("Error fetching preferences:", error); + return NextResponse.json( + { error: "Erreur lors de la récupération des préférences" }, + { status: 500 } + ); + } +} + +export async function PUT(request: Request) { + try { + const session = await auth(); + + if (!session?.user) { + return NextResponse.json({ error: "Non authentifié" }, { status: 401 }); + } + + const body = await request.json(); + const { homeBackground, eventsBackground, leaderboardBackground, theme } = + body; + + const preferences = await prisma.userPreferences.upsert({ + where: { userId: session.user.id }, + update: { + homeBackground: homeBackground ?? undefined, + eventsBackground: eventsBackground ?? undefined, + leaderboardBackground: leaderboardBackground ?? undefined, + theme: theme ?? undefined, + }, + create: { + userId: session.user.id, + homeBackground: homeBackground ?? null, + eventsBackground: eventsBackground ?? null, + leaderboardBackground: leaderboardBackground ?? null, + theme: theme ?? "default", + }, + }); + + return NextResponse.json(preferences); + } catch (error) { + console.error("Error updating preferences:", error); + return NextResponse.json( + { error: "Erreur lors de la mise à jour des préférences" }, + { status: 500 } + ); + } +} diff --git a/app/api/register/route.ts b/app/api/register/route.ts new file mode 100644 index 0000000..1048b77 --- /dev/null +++ b/app/api/register/route.ts @@ -0,0 +1,62 @@ +import { NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; +import bcrypt from "bcryptjs"; + +export async function POST(request: Request) { + try { + const body = await request.json(); + const { email, username, password } = body; + + if (!email || !username || !password) { + return NextResponse.json( + { error: "Tous les champs sont requis" }, + { status: 400 } + ); + } + + if (password.length < 6) { + return NextResponse.json( + { error: "Le mot de passe doit contenir au moins 6 caractères" }, + { status: 400 } + ); + } + + // Vérifier si l'email existe déjà + const existingUser = await prisma.user.findFirst({ + where: { + OR: [{ email }, { username }], + }, + }); + + if (existingUser) { + return NextResponse.json( + { error: "Cet email ou nom d'utilisateur est déjà utilisé" }, + { status: 400 } + ); + } + + // Hasher le mot de passe + const hashedPassword = await bcrypt.hash(password, 10); + + // Créer l'utilisateur + const user = await prisma.user.create({ + data: { + email, + username, + password: hashedPassword, + }, + }); + + return NextResponse.json( + { message: "Compte créé avec succès", userId: user.id }, + { status: 201 } + ); + } catch (error) { + console.error("Registration error:", error); + return NextResponse.json( + { error: "Une erreur est survenue lors de l'inscription" }, + { status: 500 } + ); + } +} + diff --git a/app/api/users/[id]/route.ts b/app/api/users/[id]/route.ts new file mode 100644 index 0000000..6aadf77 --- /dev/null +++ b/app/api/users/[id]/route.ts @@ -0,0 +1,50 @@ +import { NextResponse } from "next/server"; +import { auth } from "@/lib/auth"; +import { prisma } from "@/lib/prisma"; + +export async function GET( + request: Request, + { params }: { params: Promise<{ id: string }> } +) { + try { + const session = await auth(); + const { id } = await params; + + if (!session?.user) { + return NextResponse.json({ error: "Non authentifié" }, { status: 401 }); + } + + // Vérifier que l'utilisateur demande ses propres données ou est admin + if (session.user.id !== id && session.user.role !== "ADMIN") { + return NextResponse.json({ error: "Accès refusé" }, { status: 403 }); + } + + const user = await prisma.user.findUnique({ + where: { id }, + select: { + id: true, + username: true, + avatar: true, + hp: true, + maxHp: true, + xp: true, + maxXp: true, + level: true, + score: true, + }, + }); + + if (!user) { + return NextResponse.json({ error: "Utilisateur non trouvé" }, { status: 404 }); + } + + return NextResponse.json(user); + } catch (error) { + console.error("Error fetching user:", error); + return NextResponse.json( + { error: "Erreur lors de la récupération de l'utilisateur" }, + { status: 500 } + ); + } +} + diff --git a/app/layout.tsx b/app/layout.tsx index 2091a46..45ec66e 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import { Orbitron, Rajdhani } from "next/font/google"; import "./globals.css"; +import SessionProvider from "@/components/SessionProvider"; const orbitron = Orbitron({ subsets: ["latin"], @@ -26,8 +27,9 @@ export default function RootLayout({ }>) { return ( - {children} + + {children} + ); } - diff --git a/app/login/page.tsx b/app/login/page.tsx new file mode 100644 index 0000000..a749255 --- /dev/null +++ b/app/login/page.tsx @@ -0,0 +1,141 @@ +"use client"; + +import { useState } from "react"; +import { signIn } from "next-auth/react"; +import { useRouter } from "next/navigation"; +import Link from "next/link"; +import Navigation from "@/components/Navigation"; + +export default function LoginPage() { + const router = useRouter(); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [error, setError] = useState(""); + const [loading, setLoading] = useState(false); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(""); + setLoading(true); + + try { + const result = await signIn("credentials", { + email, + password, + redirect: false, + callbackUrl: "/", + }); + + if (result?.error) { + setError("Email ou mot de passe incorrect"); + setLoading(false); + } else if (result?.ok) { + router.push("/"); + router.refresh(); + } else { + setError("Une erreur est survenue lors de la connexion"); + setLoading(false); + } + } catch (err) { + console.error("Login error:", err); + setError("Une erreur est survenue"); + setLoading(false); + } + }; + + return ( +
+ +
+ {/* Background Image */} +
+
+
+ + {/* Login Form */} +
+
+

+ + CONNEXION + +

+

+ Connectez-vous à votre compte +

+ +
+ {error && ( +
+ {error} +
+ )} + +
+ + setEmail(e.target.value)} + required + className="w-full px-4 py-3 bg-black/60 border border-pixel-gold/30 rounded text-white placeholder-gray-500 focus:outline-none focus:border-pixel-gold transition" + placeholder="votre@email.com" + /> +
+ +
+ + setPassword(e.target.value)} + required + className="w-full px-4 py-3 bg-black/60 border border-pixel-gold/30 rounded text-white placeholder-gray-500 focus:outline-none focus:border-pixel-gold transition" + placeholder="••••••••" + /> +
+ + +
+ +
+

+ Pas encore de compte ?{" "} + + S'inscrire + +

+
+
+
+
+
+ ); +} + diff --git a/app/register/page.tsx b/app/register/page.tsx new file mode 100644 index 0000000..8b80b61 --- /dev/null +++ b/app/register/page.tsx @@ -0,0 +1,204 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import Link from "next/link"; +import Navigation from "@/components/Navigation"; + +export default function RegisterPage() { + const router = useRouter(); + const [formData, setFormData] = useState({ + email: "", + username: "", + password: "", + confirmPassword: "", + }); + const [error, setError] = useState(""); + const [loading, setLoading] = useState(false); + + const handleChange = (e: React.ChangeEvent) => { + setFormData({ + ...formData, + [e.target.name]: e.target.value, + }); + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(""); + + if (formData.password !== formData.confirmPassword) { + setError("Les mots de passe ne correspondent pas"); + return; + } + + if (formData.password.length < 6) { + setError("Le mot de passe doit contenir au moins 6 caractères"); + return; + } + + setLoading(true); + + try { + const response = await fetch("/api/register", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + email: formData.email, + username: formData.username, + password: formData.password, + }), + }); + + const data = await response.json(); + + if (!response.ok) { + setError(data.error || "Une erreur est survenue"); + return; + } + + router.push("/login?registered=true"); + } catch (err) { + setError("Une erreur est survenue"); + } finally { + setLoading(false); + } + }; + + return ( +
+ +
+ {/* Background Image */} +
+
+
+ + {/* Register Form */} +
+
+

+ + INSCRIPTION + +

+

+ Créez votre compte pour commencer +

+ +
+ {error && ( +
+ {error} +
+ )} + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+

+ Déjà un compte ?{" "} + + Se connecter + +

+
+
+
+
+
+ ); +} diff --git a/components/EventsPageSection.tsx b/components/EventsPageSection.tsx index 0eb4183..205594b 100644 --- a/components/EventsPageSection.tsx +++ b/components/EventsPageSection.tsx @@ -1,80 +1,25 @@ "use client"; +import { useEffect, useState } from "react"; + interface Event { - id: number; + id: string; date: string; name: string; description: string; - type: "summit" | "launch" | "festival" | "competition"; - status: "upcoming" | "live" | "past"; + type: "SUMMIT" | "LAUNCH" | "FESTIVAL" | "COMPETITION"; + status: "UPCOMING" | "LIVE" | "PAST"; } -const events: Event[] = [ - { - id: 1, - date: "18 NOVEMBRE 2023", - name: "Sommet de l'Innovation Tech", - description: - "Rejoignez les leaders de l'industrie et les innovateurs pour une journée de discussions sur les technologies de pointe, les percées de l'IA et des opportunités de networking.", - type: "summit", - status: "past", - }, - { - id: 2, - date: "3 DÉCEMBRE 2023", - name: "Lancement de la Révolution IA", - description: - "Assistez au lancement de systèmes d'IA révolutionnaires qui vont remodeler le paysage du gaming. Aperçus exclusifs et opportunités d'accès anticipé.", - type: "launch", - status: "past", - }, - { - id: 3, - date: "22 DÉCEMBRE 2023", - name: "Festival du Code d'Hiver", - description: - "Une célébration de l'excellence en programmation avec des hackathons, des défis de codage et des prix. Montrez vos compétences et rivalisez avec les meilleurs développeurs.", - type: "festival", - status: "past", - }, - { - id: 4, - date: "15 JANVIER 2024", - name: "Expo Informatique Quantique", - description: - "Explorez l'avenir de l'informatique quantique dans le gaming. Démonstrations interactives, conférences d'experts et ateliers pratiques pour tous les niveaux.", - type: "summit", - status: "upcoming", - }, - { - id: 5, - date: "8 FÉVRIER 2024", - name: "Championnat Cyber Arena", - description: - "L'événement de gaming compétitif ultime. Compétissez pour la gloire, des récompenses exclusives et le titre de Champion Cyber Arena. Inscriptions ouvertes.", - type: "competition", - status: "upcoming", - }, - { - id: 6, - date: "12 MARS 2024", - name: "Gala Tech du Printemps", - description: - "Une soirée élégante célébrant les réalisations technologiques. Cérémonie de remise de prix, networking et annonces exclusives des plus grandes entreprises tech.", - type: "festival", - status: "upcoming", - }, -]; - const getEventTypeColor = (type: Event["type"]) => { switch (type) { - case "summit": + case "SUMMIT": return "from-blue-600 to-cyan-500"; - case "launch": + case "LAUNCH": return "from-purple-600 to-pink-500"; - case "festival": + case "FESTIVAL": return "from-pixel-gold to-orange-500"; - case "competition": + case "COMPETITION": return "from-red-600 to-orange-500"; default: return "from-gray-600 to-gray-500"; @@ -83,13 +28,13 @@ const getEventTypeColor = (type: Event["type"]) => { const getEventTypeLabel = (type: Event["type"]) => { switch (type) { - case "summit": + case "SUMMIT": return "Sommet"; - case "launch": + case "LAUNCH": return "Lancement"; - case "festival": + case "FESTIVAL": return "Festival"; - case "competition": + case "COMPETITION": return "Compétition"; default: return type; @@ -98,19 +43,19 @@ const getEventTypeLabel = (type: Event["type"]) => { const getStatusBadge = (status: Event["status"]) => { switch (status) { - case "upcoming": + case "UPCOMING": return ( À venir ); - case "live": + case "LIVE": return ( En direct ); - case "past": + case "PAST": return ( Passé @@ -120,6 +65,29 @@ const getStatusBadge = (status: Event["status"]) => { }; export default function EventsPageSection() { + const [events, setEvents] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + fetch("/api/events") + .then((res) => res.json()) + .then((data) => { + setEvents(data); + setLoading(false); + }) + .catch((err) => { + console.error("Error fetching events:", err); + setLoading(false); + }); + }, []); + + if (loading) { + return ( +
+
Chargement...
+
+ ); + } return (
{/* Background Image */} @@ -198,17 +166,17 @@ export default function EventsPageSection() {

{/* Action Button */} - {event.status === "upcoming" && ( + {event.status === "UPCOMING" && ( )} - {event.status === "live" && ( + {event.status === "LIVE" && ( )} - {event.status === "past" && ( + {event.status === "PAST" && ( diff --git a/components/EventsSection.tsx b/components/EventsSection.tsx index 6e84e8b..bb680c1 100644 --- a/components/EventsSection.tsx +++ b/components/EventsSection.tsx @@ -1,26 +1,44 @@ "use client"; +import { useEffect, useState } from "react"; + interface Event { + id: string; date: string; name: string; } -const events: Event[] = [ - { - date: "18 NOVEMBRE 2023", - name: "Sommet de l'Innovation Tech", - }, - { - date: "3 DÉCEMBRE 2023", - name: "Lancement de la Révolution IA", - }, - { - date: "22 DÉCEMBRE 2023", - name: "Festival du Code d'Hiver", - }, -]; - export default function EventsSection() { + const [events, setEvents] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + fetch("/api/events") + .then((res) => res.json()) + .then((data) => { + // Prendre seulement les 3 premiers événements pour la section d'accueil + setEvents(data.slice(0, 3)); + setLoading(false); + }) + .catch((err) => { + console.error("Error fetching events:", err); + setLoading(false); + }); + }, []); + + if (loading) { + return ( +
+
+ Chargement... +
+
+ ); + } + + if (events.length === 0) { + return null; + } return (
diff --git a/components/Leaderboard.tsx b/components/Leaderboard.tsx index dd4dc19..2c42007 100644 --- a/components/Leaderboard.tsx +++ b/components/Leaderboard.tsx @@ -1,10 +1,13 @@ "use client"; +import { useEffect, useState } from "react"; + interface LeaderboardEntry { rank: number; username: string; score: number; level: number; + avatar?: string | null; } // Format number with consistent locale to avoid hydration mismatch @@ -12,20 +15,32 @@ const formatScore = (score: number): string => { return score.toLocaleString("en-US"); }; -const mockLeaderboard: LeaderboardEntry[] = [ - { rank: 1, username: "DragonSlayer99", score: 125000, level: 85 }, - { rank: 2, username: "MineMaster", score: 118500, level: 82 }, - { rank: 3, username: "CraftKing", score: 112000, level: 80 }, - { rank: 4, username: "PixelWarrior", score: 105500, level: 78 }, - { rank: 5, username: "FarminePro", score: 99000, level: 75 }, - { rank: 6, username: "GoldDigger", score: 92500, level: 73 }, - { rank: 7, username: "EpicGamer", score: 87000, level: 71 }, - { rank: 8, username: "Legendary", score: 81500, level: 69 }, - { rank: 9, username: "MysticMiner", score: 76000, level: 67 }, - { rank: 10, username: "TopPlayer", score: 70500, level: 65 }, -]; - export default function Leaderboard() { + const [leaderboard, setLeaderboard] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + fetch("/api/leaderboard") + .then((res) => res.json()) + .then((data) => { + setLeaderboard(data); + setLoading(false); + }) + .catch((err) => { + console.error("Error fetching leaderboard:", err); + setLoading(false); + }); + }, []); + + if (loading) { + return ( +
+
+ Chargement... +
+
+ ); + } return (
@@ -44,7 +59,7 @@ export default function Leaderboard() { {/* Entries */}
- {mockLeaderboard.map((entry) => ( + {leaderboard.map((entry) => (
{ return score.toLocaleString("en-US"); }; -const mockLeaderboard: LeaderboardEntry[] = [ - { rank: 1, username: "TechMaster2024", score: 125000, level: 85 }, - { rank: 2, username: "CodeWarrior", score: 118500, level: 82 }, - { rank: 3, username: "AIGenius", score: 112000, level: 80 }, - { rank: 4, username: "DevLegend", score: 105500, level: 78 }, - { rank: 5, username: "InnovationPro", score: 99000, level: 75 }, - { rank: 6, username: "TechNinja", score: 92500, level: 73 }, - { rank: 7, username: "DigitalHero", score: 87000, level: 71 }, - { rank: 8, username: "CodeCrusher", score: 81500, level: 69 }, - { rank: 9, username: "TechWizard", score: 76000, level: 67 }, - { rank: 10, username: "InnovationKing", score: 70500, level: 65 }, - { rank: 11, username: "DevMaster", score: 68000, level: 64 }, - { rank: 12, username: "TechElite", score: 65500, level: 63 }, - { rank: 13, username: "CodeChampion", score: 63000, level: 62 }, - { rank: 14, username: "AIVisionary", score: 60500, level: 61 }, - { rank: 15, username: "TechPioneer", score: 58000, level: 60 }, -]; - export default function LeaderboardSection() { + const [leaderboard, setLeaderboard] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + fetch("/api/leaderboard") + .then((res) => res.json()) + .then((data) => { + setLeaderboard(data); + setLoading(false); + }) + .catch((err) => { + console.error("Error fetching leaderboard:", err); + setLoading(false); + }); + }, []); + + if (loading) { + return ( +
+
Chargement...
+
+ ); + } return (
{/* Background Image */} @@ -78,7 +85,7 @@ export default function LeaderboardSection() { {/* Entries */}
- {mockLeaderboard.map((entry) => ( + {leaderboard.map((entry) => (
-
- - {entry.username.charAt(0).toUpperCase()} - -
+ {entry.avatar ? ( +
+ {entry.username} +
+ ) : ( +
+ + {entry.username.charAt(0).toUpperCase()} + +
+ )}
@@ -39,11 +42,44 @@ export default function Navigation() { > LEADERBOARD + {session?.user?.role === "ADMIN" && ( + + ADMIN + + )}
- {/* Player Stats - Right */} -
- + {/* Right Side */} +
+ {session ? ( + <> + + + + ) : ( + <> + + Connexion + + + Inscription + + + )}
diff --git a/components/PlayerStats.tsx b/components/PlayerStats.tsx index 203591a..d6528ec 100644 --- a/components/PlayerStats.tsx +++ b/components/PlayerStats.tsx @@ -1,31 +1,68 @@ "use client"; import { useEffect, useState } from "react"; - -interface PlayerStatsProps { - username?: string; - avatar?: string; - hp?: number; - maxHp?: number; - xp?: number; - maxXp?: number; - level?: number; -} +import { useSession } from "next-auth/react"; // Format number with consistent locale to avoid hydration mismatch const formatNumber = (num: number): string => { return num.toLocaleString("en-US"); }; -export default function PlayerStats({ - username = "DragonSlayer99", - avatar = "/got-2.jpg", - hp = 750, - maxHp = 1000, - xp = 3250, - maxXp = 5000, - level = 42, -}: PlayerStatsProps) { +export default function PlayerStats() { + const { data: session } = useSession(); + const [userData, setUserData] = useState({ + username: "Guest", + avatar: null as string | null, + hp: 1000, + maxHp: 1000, + xp: 0, + maxXp: 5000, + level: 1, + }); + + useEffect(() => { + if (session?.user?.id) { + fetch(`/api/users/${session.user.id}`) + .then((res) => res.json()) + .then((data) => { + if (data) { + setUserData({ + username: data.username || "Guest", + avatar: data.avatar, + hp: data.hp || 1000, + maxHp: data.maxHp || 1000, + xp: data.xp || 0, + maxXp: data.maxXp || 5000, + level: data.level || 1, + }); + } + }) + .catch(() => { + // Utiliser les données de session si l'API échoue + setUserData({ + username: session.user.username || "Guest", + avatar: null, + hp: 1000, + maxHp: 1000, + xp: 0, + maxXp: 5000, + level: 1, + }); + }); + } else { + setUserData({ + username: "Guest", + avatar: null, + hp: 1000, + maxHp: 1000, + xp: 0, + maxXp: 5000, + level: 1, + }); + } + }, [session]); + + const { username, avatar, hp, maxHp, xp, maxXp, level } = userData; const [hpPercentage, setHpPercentage] = useState(0); const [xpPercentage, setXpPercentage] = useState(0); @@ -56,12 +93,18 @@ export default function PlayerStats({ return (
{/* Avatar */} -
- {username} +
+ {avatar ? ( + {username} + ) : ( + + {username.charAt(0).toUpperCase()} + + )}
{/* Stats */} diff --git a/components/SessionProvider.tsx b/components/SessionProvider.tsx new file mode 100644 index 0000000..708e03f --- /dev/null +++ b/components/SessionProvider.tsx @@ -0,0 +1,16 @@ +"use client"; + +import { SessionProvider as NextAuthSessionProvider } from "next-auth/react"; + +export default function SessionProvider({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + {children} + + ); +} + diff --git a/lib/auth.ts b/lib/auth.ts new file mode 100644 index 0000000..b019fe6 --- /dev/null +++ b/lib/auth.ts @@ -0,0 +1,71 @@ +import NextAuth from "next-auth"; +import Credentials from "next-auth/providers/credentials"; +import { prisma } from "./prisma"; +import bcrypt from "bcryptjs"; +import type { Role } from "@/prisma/generated/prisma/client"; + +export const { handlers, signIn, signOut, auth } = NextAuth({ + trustHost: true, + providers: [ + Credentials({ + credentials: { + email: { label: "Email", type: "email" }, + password: { label: "Password", type: "password" }, + }, + authorize: async (credentials) => { + if (!credentials?.email || !credentials?.password) { + return null; + } + + const user = await prisma.user.findUnique({ + where: { email: credentials.email as string }, + }); + + if (!user) { + return null; + } + + const isPasswordValid = await bcrypt.compare( + credentials.password as string, + user.password + ); + + if (!isPasswordValid) { + return null; + } + + return { + id: user.id, + email: user.email, + username: user.username, + role: user.role, + }; + }, + }), + ], + callbacks: { + jwt: async ({ token, user }) => { + if (user) { + token.id = user.id; + token.username = user.username; + token.role = user.role; + } + return token; + }, + session: async ({ session, token }) => { + if (session.user && token) { + session.user.id = token.id as string; + session.user.username = token.username as string; + session.user.role = token.role as Role; + } + return session; + }, + }, + pages: { + signIn: "/login", + }, + session: { + strategy: "jwt", + }, +}); + diff --git a/lib/prisma.ts b/lib/prisma.ts new file mode 100644 index 0000000..449fb57 --- /dev/null +++ b/lib/prisma.ts @@ -0,0 +1,22 @@ +import { PrismaClient } from "@/prisma/generated/prisma/client"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; + +const adapter = new PrismaBetterSqlite3({ + url: process.env.DATABASE_URL || "file:./dev.db", +}); + +const globalForPrisma = globalThis as unknown as { + prisma: PrismaClient | undefined; +}; + +export const prisma = + globalForPrisma.prisma ?? + new PrismaClient({ + adapter, + log: + process.env.NODE_ENV === "development" + ? ["query", "error", "warn"] + : ["error"], + }); + +if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; diff --git a/package.json b/package.json index 95aac6d..1bdf69c 100644 --- a/package.json +++ b/package.json @@ -6,20 +6,33 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "db:seed": "tsx prisma/seed.ts" + }, + "prisma": { + "seed": "tsx prisma/seed.ts" }, "dependencies": { + "@prisma/adapter-better-sqlite3": "^7.1.0", + "@prisma/client": "^7.1.0", + "bcryptjs": "^3.0.3", + "better-sqlite3": "^12.5.0", "next": "15.5.7", + "next-auth": "5.0.0-beta.30", "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { + "@types/bcryptjs": "^3.0.0", + "@types/better-sqlite3": "^7.6.13", "@types/node": "^22.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "autoprefixer": "^10.4.19", "postcss": "^8.4.40", + "prisma": "^7.1.0", "tailwindcss": "^3.4.7", + "tsx": "^4.21.0", "typescript": "^5.6.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04c4189..0d2c173 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,24 @@ importers: .: dependencies: + '@prisma/adapter-better-sqlite3': + specifier: ^7.1.0 + version: 7.1.0 + '@prisma/client': + specifier: ^7.1.0 + version: 7.1.0(prisma@7.1.0(@types/react@19.2.7)(better-sqlite3@12.5.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3) + bcryptjs: + specifier: ^3.0.3 + version: 3.0.3 + better-sqlite3: + specifier: ^12.5.0 + version: 12.5.0 next: specifier: 15.5.7 version: 15.5.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + next-auth: + specifier: 5.0.0-beta.30 + version: 5.0.0-beta.30(next@15.5.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1) react: specifier: ^19.0.0 version: 19.2.1 @@ -18,6 +33,12 @@ importers: specifier: ^19.0.0 version: 19.2.1(react@19.2.1) devDependencies: + '@types/bcryptjs': + specifier: ^3.0.0 + version: 3.0.0 + '@types/better-sqlite3': + specifier: ^7.6.13 + version: 7.6.13 '@types/node': specifier: ^22.0.0 version: 22.19.1 @@ -33,9 +54,15 @@ importers: postcss: specifier: ^8.4.40 version: 8.5.6 + prisma: + specifier: ^7.1.0 + version: 7.1.0(@types/react@19.2.7)(better-sqlite3@12.5.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3) tailwindcss: specifier: ^3.4.7 - version: 3.4.18 + version: 3.4.18(tsx@4.21.0) + tsx: + specifier: ^4.21.0 + version: 4.21.0 typescript: specifier: ^5.6.0 version: 5.9.3 @@ -46,9 +73,211 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@auth/core@0.41.0': + resolution: {integrity: sha512-Wd7mHPQ/8zy6Qj7f4T46vg3aoor8fskJm6g2Zyj064oQ3+p0xNZXAV60ww0hY+MbTesfu29kK14Zk5d5JTazXQ==} + peerDependencies: + '@simplewebauthn/browser': ^9.0.1 + '@simplewebauthn/server': ^9.0.2 + nodemailer: ^6.8.0 + peerDependenciesMeta: + '@simplewebauthn/browser': + optional: true + '@simplewebauthn/server': + optional: true + nodemailer: + optional: true + + '@chevrotain/cst-dts-gen@10.5.0': + resolution: {integrity: sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==} + + '@chevrotain/gast@10.5.0': + resolution: {integrity: sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==} + + '@chevrotain/types@10.5.0': + resolution: {integrity: sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A==} + + '@chevrotain/utils@10.5.0': + resolution: {integrity: sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==} + + '@electric-sql/pglite-socket@0.0.6': + resolution: {integrity: sha512-6RjmgzphIHIBA4NrMGJsjNWK4pu+bCWJlEWlwcxFTVY3WT86dFpKwbZaGWZV6C5Rd7sCk1Z0CI76QEfukLAUXw==} + hasBin: true + peerDependencies: + '@electric-sql/pglite': 0.3.2 + + '@electric-sql/pglite-tools@0.2.7': + resolution: {integrity: sha512-9dAccClqxx4cZB+Ar9B+FZ5WgxDc/Xvl9DPrTWv+dYTf0YNubLzi4wHHRGRGhrJv15XwnyKcGOZAP1VXSneSUg==} + peerDependencies: + '@electric-sql/pglite': 0.3.2 + + '@electric-sql/pglite@0.3.2': + resolution: {integrity: sha512-zfWWa+V2ViDCY/cmUfRqeWY1yLto+EpxjXnZzenB1TyxsTiXaTWeZFIZw6mac52BsuQm0RjCnisjBtdBaXOI6w==} + '@emnapi/runtime@1.7.1': resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + '@esbuild/aix-ppc64@0.27.1': + resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.27.1': + resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.27.1': + resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.27.1': + resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.27.1': + resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.27.1': + resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.27.1': + resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.27.1': + resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.27.1': + resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.27.1': + resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.27.1': + resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.27.1': + resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.27.1': + resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.27.1': + resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.27.1': + resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.27.1': + resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.27.1': + resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.27.1': + resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.27.1': + resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.27.1': + resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.27.1': + resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.27.1': + resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.27.1': + resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.27.1': + resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.27.1': + resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.27.1': + resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@hono/node-server@1.19.6': + resolution: {integrity: sha512-Shz/KjlIeAhfiuE93NDKVdZ7HdBVLQAfdbaXEaoAVO3ic9ibRSLGIQGkcBbFyuLr+7/1D5ZCINM8B+6IvXeMtw==} + engines: {node: '>=18.14.1'} + peerDependencies: + hono: ^4 + '@img/colour@1.0.0': resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} engines: {node: '>=18'} @@ -199,6 +428,10 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@mrleebo/prisma-ast@0.12.1': + resolution: {integrity: sha512-JwqeCQ1U3fvccttHZq7Tk0m/TMC6WcFAQZdukypW3AzlJYKYTGNVd1ANU2GuhKnv4UQuOFj3oAl0LLG/gxFN1w==} + engines: {node: '>=16'} + '@next/env@15.5.7': resolution: {integrity: sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg==} @@ -262,9 +495,80 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@panva/hkdf@1.2.1': + resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==} + + '@prisma/adapter-better-sqlite3@7.1.0': + resolution: {integrity: sha512-Ex4CimAONWMoUrhU27lpGXb4MdX/59qj+4PBTIuPVJLXZfTxSWuU8KowlRtq1w5iE91WiwMgU1KgeBOKJ81nEA==} + + '@prisma/client-runtime-utils@7.1.0': + resolution: {integrity: sha512-39xmeBrNTN40FzF34aJMjfX1PowVCqoT3UKUWBBSP3aXV05NRqGBC3x2wCDs96ti6ZgdiVzqnRDHtbzU8X+lPQ==} + + '@prisma/client@7.1.0': + resolution: {integrity: sha512-qf7GPYHmS/xybNiSOpzv9wBo+UwqfL2PeyX+08v+KVHDI0AlSCQIh5bBySkH3alu06NX9wy98JEnckhMHoMFfA==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + peerDependencies: + prisma: '*' + typescript: '>=5.4.0' + peerDependenciesMeta: + prisma: + optional: true + typescript: + optional: true + + '@prisma/config@7.1.0': + resolution: {integrity: sha512-Uz+I43Wn1RYNHtuYtOhOnUcNMWp2Pd3GUDDKs37xlHptCGpzEG3MRR9L+8Y2ISMsMI24z/Ni+ww6OB/OO8M0sQ==} + + '@prisma/debug@6.8.2': + resolution: {integrity: sha512-4muBSSUwJJ9BYth5N8tqts8JtiLT8QI/RSAzEogwEfpbYGFo9mYsInsVo8dqXdPO2+Rm5OG5q0qWDDE3nyUbVg==} + + '@prisma/debug@7.1.0': + resolution: {integrity: sha512-pPAckG6etgAsEBusmZiFwM9bldLSNkn++YuC4jCTJACdK5hLOVnOzX7eSL2FgaU6Gomd6wIw21snUX2dYroMZQ==} + + '@prisma/dev@0.15.0': + resolution: {integrity: sha512-KhWaipnFlS/fWEs6I6Oqjcy2S08vKGmxJ5LexqUl/3Ve0EgLUsZwdKF0MvqPM5F5ttw8GtfZarjM5y7VLwv9Ow==} + + '@prisma/driver-adapter-utils@7.1.0': + resolution: {integrity: sha512-AlVLzeXkw81+47MvQ9M8DvTiHkRfJ8xzklTbYjpskb0cTTDVHboTI/OVwT6Wcep/bNvfLKJYO0nylBiM5rxgww==} + + '@prisma/engines-version@7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba': + resolution: {integrity: sha512-qZUevUh+yPhGT28rDQnV8V2kLnFjirzhVD67elRPIJHRsUV/mkII10HSrJrhK/U2GYgAxXR2VEREtq7AsfS8qw==} + + '@prisma/engines@7.1.0': + resolution: {integrity: sha512-KQlraOybdHAzVv45KWKJzpR9mJLkib7/TyApQpqrsL7FUHfgjIcy8jrVGt3iNfG6/GDDl+LNlJ84JSQwIfdzxA==} + + '@prisma/fetch-engine@7.1.0': + resolution: {integrity: sha512-GZYF5Q8kweXWGfn87hTu17kw7x1DgnehgKoE4Zg1BmHYF3y1Uu0QRY/qtSE4veH3g+LW8f9HKqA0tARG66bxxQ==} + + '@prisma/get-platform@6.8.2': + resolution: {integrity: sha512-vXSxyUgX3vm1Q70QwzwkjeYfRryIvKno1SXbIqwSptKwqKzskINnDUcx85oX+ys6ooN2ATGSD0xN2UTfg6Zcow==} + + '@prisma/get-platform@7.1.0': + resolution: {integrity: sha512-lq8hMdjKiZftuT5SssYB3EtQj8+YjL24/ZTLflQqzFquArKxBcyp6Xrblto+4lzIKJqnpOjfMiBjMvl7YuD7+Q==} + + '@prisma/query-plan-executor@6.18.0': + resolution: {integrity: sha512-jZ8cfzFgL0jReE1R10gT8JLHtQxjWYLiQ//wHmVYZ2rVkFHoh0DT8IXsxcKcFlfKN7ak7k6j0XMNn2xVNyr5cA==} + + '@prisma/studio-core@0.8.2': + resolution: {integrity: sha512-/iAEWEUpTja+7gVMu1LtR2pPlvDmveAwMHdTWbDeGlT7yiv0ZTCPpmeAGdq/Y9aJ9Zj1cEGBXGRbmmNPj022PQ==} + peerDependencies: + '@types/react': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + + '@standard-schema/spec@1.0.0': + resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@types/bcryptjs@3.0.0': + resolution: {integrity: sha512-WRZOuCuaz8UcZZE4R5HXTco2goQSI2XxjGY3hbM/xDvwmqFWd4ivooImsMx65OKM6CtNKbnZ5YL+YwAwK7c1dg==} + deprecated: This is a stub types definition. bcryptjs provides its own type definitions, so you do not need this installed. + + '@types/better-sqlite3@7.6.13': + resolution: {integrity: sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==} + '@types/node@22.19.1': resolution: {integrity: sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==} @@ -293,14 +597,35 @@ packages: peerDependencies: postcss: ^8.1.0 + aws-ssl-profiles@1.1.2: + resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} + engines: {node: '>= 6.0.0'} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + baseline-browser-mapping@2.9.5: resolution: {integrity: sha512-D5vIoztZOq1XM54LUdttJVc96ggEsIfju2JBvht06pSzpckp3C7HReun67Bghzrtdsq9XdMGbSSB3v3GhMNmAA==} hasBin: true + bcryptjs@3.0.3: + resolution: {integrity: sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==} + hasBin: true + + better-sqlite3@12.5.0: + resolution: {integrity: sha512-WwCZ/5Diz7rsF29o27o0Gcc1Du+l7Zsv7SYtVPG0X3G/uUI1LqdxrQI7c9Hs2FWpqXXERjW9hp6g3/tH7DlVKg==} + engines: {node: 20.x || 22.x || 23.x || 24.x || 25.x} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + bindings@1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -310,6 +635,17 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + c12@3.1.0: + resolution: {integrity: sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==} + peerDependencies: + magicast: ^0.3.5 + peerDependenciesMeta: + magicast: + optional: true + camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} @@ -317,10 +653,23 @@ packages: caniuse-lite@1.0.30001759: resolution: {integrity: sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==} + chevrotain@10.5.0: + resolution: {integrity: sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + + citty@0.1.6: + resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} @@ -328,6 +677,17 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} + confbox@0.2.2: + resolution: {integrity: sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==} + + consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} + engines: {node: ^14.18.0 || >=16.10.0} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -336,6 +696,28 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + + deepmerge-ts@7.1.5: + resolution: {integrity: sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==} + engines: {node: '>=16.0.0'} + + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + + denque@2.1.0: + resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} + engines: {node: '>=0.10'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} @@ -346,13 +728,43 @@ packages: dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dotenv@16.6.1: + resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} + engines: {node: '>=12'} + + effect@3.18.4: + resolution: {integrity: sha512-b1LXQJLe9D11wfnOKAk3PKxuqYshQ0Heez+y5pnkd3jLj1yx9QhM72zZ9uUrOQyNvrs2GZZd/3maL0ZV18YuDA==} + electron-to-chromium@1.5.266: resolution: {integrity: sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg==} + empathic@2.0.0: + resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} + engines: {node: '>=14'} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + esbuild@0.27.1: + resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + + exsolve@1.0.8: + resolution: {integrity: sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==} + + fast-check@3.23.2: + resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==} + engines: {node: '>=8.0.0'} + fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -369,13 +781,23 @@ packages: picomatch: optional: true + file-uri-to-path@1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + fraction.js@5.3.4: resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -384,6 +806,22 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + generate-function@2.3.1: + resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + + get-port-please@3.1.2: + resolution: {integrity: sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==} + + get-tsconfig@4.13.0: + resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} + + giget@2.0.0: + resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==} + hasBin: true + + github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -392,10 +830,36 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + grammex@3.1.12: + resolution: {integrity: sha512-6ufJOsSA7LcQehIJNCO7HIBykfM7DXQual0Ny780/DEcJIpBlHRvcqEBWGPYd7hrXL2GJ3oJI1MIhaXjWmLQOQ==} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + hono@4.10.6: + resolution: {integrity: sha512-BIdolzGpDO9MQ4nu3AUuDwHZZ+KViNm+EZ75Ae55eMXMqLVhDFqEMXxtUe9Qh8hjL+pIna/frs2j6Y2yD5Ua/g==} + engines: {node: '>=16.9.0'} + + http-status-codes@2.3.0: + resolution: {integrity: sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==} + + iconv-lite@0.7.0: + resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -416,10 +880,27 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + jiti@1.21.7: resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} hasBin: true + jiti@2.6.1: + resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} + hasBin: true + + jose@6.1.3: + resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==} + + lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -427,6 +908,16 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + + lru.min@1.1.3: + resolution: {integrity: sha512-Lkk/vx6ak3rYkRR0Nhu4lFUT2VDnQSxBe8Hbl7f36358p6ow8Bnvr8lrLt98H8J1aGxfhbX4Fs5tYg2+FTwr5Q==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -435,14 +926,51 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + + mysql2@3.15.3: + resolution: {integrity: sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==} + engines: {node: '>= 8.0'} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + named-placeholders@1.1.4: + resolution: {integrity: sha512-/qfG0Kk/bLJIvej4FcPQ2KYUJP8iQdU1CTxysNb/U2wUNb+/4K485yeio8iNoiwfqJnsTInXoRPTza0dZWHVJQ==} + engines: {node: '>=8.0.0'} + nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + napi-build-utils@2.0.0: + resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} + + next-auth@5.0.0-beta.30: + resolution: {integrity: sha512-+c51gquM3F6nMVmoAusRJ7RIoY0K4Ts9HCCwyy/BRoe4mp3msZpOzYMyb5LAYc1wSo74PMQkGDcaghIO7W6Xjg==} + peerDependencies: + '@simplewebauthn/browser': ^9.0.1 + '@simplewebauthn/server': ^9.0.2 + next: ^14.0.0-0 || ^15.0.0 || ^16.0.0 + nodemailer: ^7.0.7 + react: ^18.2.0 || ^19.0.0 + peerDependenciesMeta: + '@simplewebauthn/browser': + optional: true + '@simplewebauthn/server': + optional: true + nodemailer: + optional: true + next@15.5.7: resolution: {integrity: sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} @@ -464,6 +992,13 @@ packages: sass: optional: true + node-abi@3.85.0: + resolution: {integrity: sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==} + engines: {node: '>=10'} + + node-fetch-native@1.6.7: + resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} + node-releases@2.0.27: resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} @@ -475,6 +1010,14 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} + nypm@0.6.2: + resolution: {integrity: sha512-7eM+hpOtrKrBDCh7Ypu2lJ9Z7PNZBdi/8AT3AX8xoCj43BBVHD0hPSTEvMtkMpfs8FCqBGhxB+uToIQimA111g==} + engines: {node: ^14.16.0 || >=16.10.0} + hasBin: true + + oauth4webapi@3.8.3: + resolution: {integrity: sha512-pQ5BsX3QRTgnt5HxgHwgunIRaDXBdkT23tf8dfzmtTIL2LTpdmxgbpbBm0VgFWAIDlezQvQCTgnVIUmHupXHxw==} + object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -483,9 +1026,25 @@ packages: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} + ohash@2.0.11: + resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -505,6 +1064,9 @@ packages: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} + pkg-types@2.3.0: + resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==} + postcss-import@15.1.0: resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} @@ -556,9 +1118,55 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + postgres@3.4.7: + resolution: {integrity: sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==} + engines: {node: '>=12'} + + preact-render-to-string@6.5.11: + resolution: {integrity: sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==} + peerDependencies: + preact: '>=10' + + preact@10.24.3: + resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} + + prebuild-install@7.1.3: + resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} + engines: {node: '>=10'} + hasBin: true + + prisma@7.1.0: + resolution: {integrity: sha512-dy/3urE4JjhdiW5b09pGjVhGI7kPESK2VlCDrCqeYK5m5SslAtG5FCGnZWP7E8Sdg+Ow1wV2mhJH5RTFL5gEsw==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + hasBin: true + peerDependencies: + better-sqlite3: '>=9.0.0' + typescript: '>=5.4.0' + peerDependenciesMeta: + better-sqlite3: + optional: true + typescript: + optional: true + + proper-lockfile@4.1.2: + resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} + + pump@3.0.3: + resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + rc9@2.1.2: + resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} + + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + react-dom@19.2.1: resolution: {integrity: sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==} peerDependencies: @@ -571,15 +1179,36 @@ packages: read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + regexp-to-ast@0.5.0: + resolution: {integrity: sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==} + + remeda@2.21.3: + resolution: {integrity: sha512-XXrZdLA10oEOQhLLzEJEiFFSKi21REGAkHdImIb4rt/XXy8ORGXh5HCcpUOsElfPNDb+X6TA/+wkh+p2KffYmg==} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve@1.22.11: resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} engines: {node: '>= 0.4'} hasBin: true + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -587,6 +1216,12 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + scheduler@0.27.0: resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} @@ -595,14 +1230,52 @@ packages: engines: {node: '>=10'} hasBin: true + seq-queue@0.0.5: + resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} + sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + sqlstring@2.3.3: + resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} + engines: {node: '>= 0.6'} + + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + styled-jsx@5.1.6: resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} @@ -630,6 +1303,13 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + tar-fs@2.1.4: + resolution: {integrity: sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==} + + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -637,6 +1317,10 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinyexec@1.0.2: + resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} + engines: {node: '>=18'} + tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} @@ -651,6 +1335,18 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + engines: {node: '>=18.0.0'} + hasBin: true + + tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -668,15 +1364,149 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + valibot@1.2.0: + resolution: {integrity: sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + zeptomatch@2.0.2: + resolution: {integrity: sha512-H33jtSKf8Ijtb5BW6wua3G5DhnFjbFML36eFu+VdOoVY4HD9e7ggjqdM6639B+L87rjnR6Y+XeRzBXZdy52B/g==} + snapshots: '@alloc/quick-lru@5.2.0': {} + '@auth/core@0.41.0': + dependencies: + '@panva/hkdf': 1.2.1 + jose: 6.1.3 + oauth4webapi: 3.8.3 + preact: 10.24.3 + preact-render-to-string: 6.5.11(preact@10.24.3) + + '@chevrotain/cst-dts-gen@10.5.0': + dependencies: + '@chevrotain/gast': 10.5.0 + '@chevrotain/types': 10.5.0 + lodash: 4.17.21 + + '@chevrotain/gast@10.5.0': + dependencies: + '@chevrotain/types': 10.5.0 + lodash: 4.17.21 + + '@chevrotain/types@10.5.0': {} + + '@chevrotain/utils@10.5.0': {} + + '@electric-sql/pglite-socket@0.0.6(@electric-sql/pglite@0.3.2)': + dependencies: + '@electric-sql/pglite': 0.3.2 + + '@electric-sql/pglite-tools@0.2.7(@electric-sql/pglite@0.3.2)': + dependencies: + '@electric-sql/pglite': 0.3.2 + + '@electric-sql/pglite@0.3.2': {} + '@emnapi/runtime@1.7.1': dependencies: tslib: 2.8.1 optional: true + '@esbuild/aix-ppc64@0.27.1': + optional: true + + '@esbuild/android-arm64@0.27.1': + optional: true + + '@esbuild/android-arm@0.27.1': + optional: true + + '@esbuild/android-x64@0.27.1': + optional: true + + '@esbuild/darwin-arm64@0.27.1': + optional: true + + '@esbuild/darwin-x64@0.27.1': + optional: true + + '@esbuild/freebsd-arm64@0.27.1': + optional: true + + '@esbuild/freebsd-x64@0.27.1': + optional: true + + '@esbuild/linux-arm64@0.27.1': + optional: true + + '@esbuild/linux-arm@0.27.1': + optional: true + + '@esbuild/linux-ia32@0.27.1': + optional: true + + '@esbuild/linux-loong64@0.27.1': + optional: true + + '@esbuild/linux-mips64el@0.27.1': + optional: true + + '@esbuild/linux-ppc64@0.27.1': + optional: true + + '@esbuild/linux-riscv64@0.27.1': + optional: true + + '@esbuild/linux-s390x@0.27.1': + optional: true + + '@esbuild/linux-x64@0.27.1': + optional: true + + '@esbuild/netbsd-arm64@0.27.1': + optional: true + + '@esbuild/netbsd-x64@0.27.1': + optional: true + + '@esbuild/openbsd-arm64@0.27.1': + optional: true + + '@esbuild/openbsd-x64@0.27.1': + optional: true + + '@esbuild/openharmony-arm64@0.27.1': + optional: true + + '@esbuild/sunos-x64@0.27.1': + optional: true + + '@esbuild/win32-arm64@0.27.1': + optional: true + + '@esbuild/win32-ia32@0.27.1': + optional: true + + '@esbuild/win32-x64@0.27.1': + optional: true + + '@hono/node-server@1.19.6(hono@4.10.6)': + dependencies: + hono: 4.10.6 + '@img/colour@1.0.0': optional: true @@ -788,6 +1618,11 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@mrleebo/prisma-ast@0.12.1': + dependencies: + chevrotain: 10.5.0 + lilconfig: 2.1.0 + '@next/env@15.5.7': {} '@next/swc-darwin-arm64@15.5.7': @@ -826,10 +1661,106 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 + '@panva/hkdf@1.2.1': {} + + '@prisma/adapter-better-sqlite3@7.1.0': + dependencies: + '@prisma/driver-adapter-utils': 7.1.0 + better-sqlite3: 12.5.0 + + '@prisma/client-runtime-utils@7.1.0': {} + + '@prisma/client@7.1.0(prisma@7.1.0(@types/react@19.2.7)(better-sqlite3@12.5.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)': + dependencies: + '@prisma/client-runtime-utils': 7.1.0 + optionalDependencies: + prisma: 7.1.0(@types/react@19.2.7)(better-sqlite3@12.5.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3) + typescript: 5.9.3 + + '@prisma/config@7.1.0': + dependencies: + c12: 3.1.0 + deepmerge-ts: 7.1.5 + effect: 3.18.4 + empathic: 2.0.0 + transitivePeerDependencies: + - magicast + + '@prisma/debug@6.8.2': {} + + '@prisma/debug@7.1.0': {} + + '@prisma/dev@0.15.0(typescript@5.9.3)': + dependencies: + '@electric-sql/pglite': 0.3.2 + '@electric-sql/pglite-socket': 0.0.6(@electric-sql/pglite@0.3.2) + '@electric-sql/pglite-tools': 0.2.7(@electric-sql/pglite@0.3.2) + '@hono/node-server': 1.19.6(hono@4.10.6) + '@mrleebo/prisma-ast': 0.12.1 + '@prisma/get-platform': 6.8.2 + '@prisma/query-plan-executor': 6.18.0 + foreground-child: 3.3.1 + get-port-please: 3.1.2 + hono: 4.10.6 + http-status-codes: 2.3.0 + pathe: 2.0.3 + proper-lockfile: 4.1.2 + remeda: 2.21.3 + std-env: 3.9.0 + valibot: 1.2.0(typescript@5.9.3) + zeptomatch: 2.0.2 + transitivePeerDependencies: + - typescript + + '@prisma/driver-adapter-utils@7.1.0': + dependencies: + '@prisma/debug': 7.1.0 + + '@prisma/engines-version@7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba': {} + + '@prisma/engines@7.1.0': + dependencies: + '@prisma/debug': 7.1.0 + '@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba + '@prisma/fetch-engine': 7.1.0 + '@prisma/get-platform': 7.1.0 + + '@prisma/fetch-engine@7.1.0': + dependencies: + '@prisma/debug': 7.1.0 + '@prisma/engines-version': 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba + '@prisma/get-platform': 7.1.0 + + '@prisma/get-platform@6.8.2': + dependencies: + '@prisma/debug': 6.8.2 + + '@prisma/get-platform@7.1.0': + dependencies: + '@prisma/debug': 7.1.0 + + '@prisma/query-plan-executor@6.18.0': {} + + '@prisma/studio-core@0.8.2(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)': + dependencies: + '@types/react': 19.2.7 + react: 19.2.1 + react-dom: 19.2.1(react@19.2.1) + + '@standard-schema/spec@1.0.0': {} + '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 + '@types/bcryptjs@3.0.0': + dependencies: + bcryptjs: 3.0.3 + + '@types/better-sqlite3@7.6.13': + dependencies: + '@types/node': 22.19.1 + '@types/node@22.19.1': dependencies: undici-types: 6.21.0 @@ -861,10 +1792,31 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 + aws-ssl-profiles@1.1.2: {} + + base64-js@1.5.1: {} + baseline-browser-mapping@2.9.5: {} + bcryptjs@3.0.3: {} + + better-sqlite3@12.5.0: + dependencies: + bindings: 1.5.0 + prebuild-install: 7.1.3 + binary-extensions@2.3.0: {} + bindings@1.5.0: + dependencies: + file-uri-to-path: 1.0.0 + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -877,10 +1829,39 @@ snapshots: node-releases: 2.0.27 update-browserslist-db: 1.2.2(browserslist@4.28.1) + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + c12@3.1.0: + dependencies: + chokidar: 4.0.3 + confbox: 0.2.2 + defu: 6.1.4 + dotenv: 16.6.1 + exsolve: 1.0.8 + giget: 2.0.0 + jiti: 2.6.1 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 1.0.0 + pkg-types: 2.3.0 + rc9: 2.1.2 + camelcase-css@2.0.1: {} caniuse-lite@1.0.30001759: {} + chevrotain@10.5.0: + dependencies: + '@chevrotain/cst-dts-gen': 10.5.0 + '@chevrotain/gast': 10.5.0 + '@chevrotain/types': 10.5.0 + '@chevrotain/utils': 10.5.0 + lodash: 4.17.21 + regexp-to-ast: 0.5.0 + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -893,25 +1874,108 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + chownr@1.1.4: {} + + citty@0.1.6: + dependencies: + consola: 3.4.2 + client-only@0.0.1: {} commander@4.1.1: {} + confbox@0.2.2: {} + + consola@3.4.2: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + cssesc@3.0.0: {} csstype@3.2.3: {} - detect-libc@2.1.2: - optional: true + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + + deep-extend@0.6.0: {} + + deepmerge-ts@7.1.5: {} + + defu@6.1.4: {} + + denque@2.1.0: {} + + destr@2.0.5: {} + + detect-libc@2.1.2: {} didyoumean@1.2.2: {} dlv@1.1.3: {} + dotenv@16.6.1: {} + + effect@3.18.4: + dependencies: + '@standard-schema/spec': 1.0.0 + fast-check: 3.23.2 + electron-to-chromium@1.5.266: {} + empathic@2.0.0: {} + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + esbuild@0.27.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.1 + '@esbuild/android-arm': 0.27.1 + '@esbuild/android-arm64': 0.27.1 + '@esbuild/android-x64': 0.27.1 + '@esbuild/darwin-arm64': 0.27.1 + '@esbuild/darwin-x64': 0.27.1 + '@esbuild/freebsd-arm64': 0.27.1 + '@esbuild/freebsd-x64': 0.27.1 + '@esbuild/linux-arm': 0.27.1 + '@esbuild/linux-arm64': 0.27.1 + '@esbuild/linux-ia32': 0.27.1 + '@esbuild/linux-loong64': 0.27.1 + '@esbuild/linux-mips64el': 0.27.1 + '@esbuild/linux-ppc64': 0.27.1 + '@esbuild/linux-riscv64': 0.27.1 + '@esbuild/linux-s390x': 0.27.1 + '@esbuild/linux-x64': 0.27.1 + '@esbuild/netbsd-arm64': 0.27.1 + '@esbuild/netbsd-x64': 0.27.1 + '@esbuild/openbsd-arm64': 0.27.1 + '@esbuild/openbsd-x64': 0.27.1 + '@esbuild/openharmony-arm64': 0.27.1 + '@esbuild/sunos-x64': 0.27.1 + '@esbuild/win32-arm64': 0.27.1 + '@esbuild/win32-ia32': 0.27.1 + '@esbuild/win32-x64': 0.27.1 + escalade@3.2.0: {} + expand-template@2.0.3: {} + + exsolve@1.0.8: {} + + fast-check@3.23.2: + dependencies: + pure-rand: 6.1.0 + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -928,17 +1992,47 @@ snapshots: optionalDependencies: picomatch: 4.0.3 + file-uri-to-path@1.0.0: {} + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + fraction.js@5.3.4: {} + fs-constants@1.0.0: {} + fsevents@2.3.3: optional: true function-bind@1.1.2: {} + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + + get-port-please@3.1.2: {} + + get-tsconfig@4.13.0: + dependencies: + resolve-pkg-maps: 1.0.0 + + giget@2.0.0: + dependencies: + citty: 0.1.6 + consola: 3.4.2 + defu: 6.1.4 + node-fetch-native: 1.6.7 + nypm: 0.6.2 + pathe: 2.0.3 + + github-from-package@0.0.0: {} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -947,10 +2041,28 @@ snapshots: dependencies: is-glob: 4.0.3 + graceful-fs@4.2.11: {} + + grammex@3.1.12: {} + hasown@2.0.2: dependencies: function-bind: 1.1.2 + hono@4.10.6: {} + + http-status-codes@2.3.0: {} + + iconv-lite@0.7.0: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + inherits@2.0.4: {} + + ini@1.3.8: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -967,12 +2079,28 @@ snapshots: is-number@7.0.0: {} + is-property@1.0.2: {} + + isexe@2.0.0: {} + jiti@1.21.7: {} + jiti@2.6.1: {} + + jose@6.1.3: {} + + lilconfig@2.1.0: {} + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} + lodash@4.17.21: {} + + long@5.3.2: {} + + lru.min@1.1.3: {} + merge2@1.4.1: {} micromatch@4.0.8: @@ -980,14 +2108,44 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + mimic-response@3.1.0: {} + + minimist@1.2.8: {} + + mkdirp-classic@0.5.3: {} + + mysql2@3.15.3: + dependencies: + aws-ssl-profiles: 1.1.2 + denque: 2.1.0 + generate-function: 2.3.1 + iconv-lite: 0.7.0 + long: 5.3.2 + lru.min: 1.1.3 + named-placeholders: 1.1.4 + seq-queue: 0.0.5 + sqlstring: 2.3.3 + mz@2.7.0: dependencies: any-promise: 1.3.0 object-assign: 4.1.1 thenify-all: 1.6.0 + named-placeholders@1.1.4: + dependencies: + lru.min: 1.1.3 + nanoid@3.3.11: {} + napi-build-utils@2.0.0: {} + + next-auth@5.0.0-beta.30(next@15.5.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1): + dependencies: + '@auth/core': 0.41.0 + next: 15.5.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + react: 19.2.1 + next@15.5.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1): dependencies: '@next/env': 15.5.7 @@ -1011,18 +2169,46 @@ snapshots: - '@babel/core' - babel-plugin-macros + node-abi@3.85.0: + dependencies: + semver: 7.7.3 + + node-fetch-native@1.6.7: {} + node-releases@2.0.27: {} normalize-path@3.0.0: {} normalize-range@0.1.2: {} + nypm@0.6.2: + dependencies: + citty: 0.1.6 + consola: 3.4.2 + pathe: 2.0.3 + pkg-types: 2.3.0 + tinyexec: 1.0.2 + + oauth4webapi@3.8.3: {} + object-assign@4.1.1: {} object-hash@3.0.0: {} + ohash@2.0.11: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + path-key@3.1.1: {} + path-parse@1.0.7: {} + pathe@2.0.3: {} + + perfect-debounce@1.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -1033,6 +2219,12 @@ snapshots: pirates@4.0.7: {} + pkg-types@2.3.0: + dependencies: + confbox: 0.2.2 + exsolve: 1.0.8 + pathe: 2.0.3 + postcss-import@15.1.0(postcss@8.5.6): dependencies: postcss: 8.5.6 @@ -1045,12 +2237,13 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.5.6 - postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.6): + postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.6)(tsx@4.21.0): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 1.21.7 postcss: 8.5.6 + tsx: 4.21.0 postcss-nested@6.2.0(postcss@8.5.6): dependencies: @@ -1076,8 +2269,73 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postgres@3.4.7: {} + + preact-render-to-string@6.5.11(preact@10.24.3): + dependencies: + preact: 10.24.3 + + preact@10.24.3: {} + + prebuild-install@7.1.3: + dependencies: + detect-libc: 2.1.2 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 2.0.0 + node-abi: 3.85.0 + pump: 3.0.3 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.4 + tunnel-agent: 0.6.0 + + prisma@7.1.0(@types/react@19.2.7)(better-sqlite3@12.5.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3): + dependencies: + '@prisma/config': 7.1.0 + '@prisma/dev': 0.15.0(typescript@5.9.3) + '@prisma/engines': 7.1.0 + '@prisma/studio-core': 0.8.2(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + mysql2: 3.15.3 + postgres: 3.4.7 + optionalDependencies: + better-sqlite3: 12.5.0 + typescript: 5.9.3 + transitivePeerDependencies: + - '@types/react' + - magicast + - react + - react-dom + + proper-lockfile@4.1.2: + dependencies: + graceful-fs: 4.2.11 + retry: 0.12.0 + signal-exit: 3.0.7 + + pump@3.0.3: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + pure-rand@6.1.0: {} + queue-microtask@1.2.3: {} + rc9@2.1.2: + dependencies: + defu: 6.1.4 + destr: 2.0.5 + + rc@1.2.8: + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + react-dom@19.2.1(react@19.2.1): dependencies: react: 19.2.1 @@ -1089,26 +2347,49 @@ snapshots: dependencies: pify: 2.3.0 + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + readdirp@3.6.0: dependencies: picomatch: 2.3.1 + readdirp@4.1.2: {} + + regexp-to-ast@0.5.0: {} + + remeda@2.21.3: + dependencies: + type-fest: 4.41.0 + + resolve-pkg-maps@1.0.0: {} + resolve@1.22.11: dependencies: is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + retry@0.12.0: {} + reusify@1.1.0: {} run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + scheduler@0.27.0: {} - semver@7.7.3: - optional: true + semver@7.7.3: {} + + seq-queue@0.0.5: {} sharp@0.34.5: dependencies: @@ -1142,8 +2423,36 @@ snapshots: '@img/sharp-win32-x64': 0.34.5 optional: true + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + simple-concat@1.0.1: {} + + simple-get@4.0.1: + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + source-map-js@1.2.1: {} + sqlstring@2.3.3: {} + + std-env@3.9.0: {} + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-json-comments@2.0.1: {} + styled-jsx@5.1.6(react@19.2.1): dependencies: client-only: 0.0.1 @@ -1161,7 +2470,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - tailwindcss@3.4.18: + tailwindcss@3.4.18(tsx@4.21.0): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -1180,7 +2489,7 @@ snapshots: postcss: 8.5.6 postcss-import: 15.1.0(postcss@8.5.6) postcss-js: 4.1.0(postcss@8.5.6) - postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.6) + postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.6)(tsx@4.21.0) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 resolve: 1.22.11 @@ -1189,6 +2498,21 @@ snapshots: - tsx - yaml + tar-fs@2.1.4: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.3 + tar-stream: 2.2.0 + + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.5 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -1197,6 +2521,8 @@ snapshots: dependencies: any-promise: 1.3.0 + tinyexec@1.0.2: {} + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) @@ -1210,6 +2536,19 @@ snapshots: tslib@2.8.1: {} + tsx@4.21.0: + dependencies: + esbuild: 0.27.1 + get-tsconfig: 4.13.0 + optionalDependencies: + fsevents: 2.3.3 + + tunnel-agent@0.6.0: + dependencies: + safe-buffer: 5.2.1 + + type-fest@4.41.0: {} + typescript@5.9.3: {} undici-types@6.21.0: {} @@ -1221,3 +2560,17 @@ snapshots: picocolors: 1.1.1 util-deprecate@1.0.2: {} + + valibot@1.2.0(typescript@5.9.3): + optionalDependencies: + typescript: 5.9.3 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrappy@1.0.2: {} + + zeptomatch@2.0.2: + dependencies: + grammex: 3.1.12 diff --git a/prisma.config.ts b/prisma.config.ts new file mode 100644 index 0000000..9c5e959 --- /dev/null +++ b/prisma.config.ts @@ -0,0 +1,14 @@ +// This file was generated by Prisma and assumes you have installed the following: +// npm install --save-dev prisma dotenv +import "dotenv/config"; +import { defineConfig, env } from "prisma/config"; + +export default defineConfig({ + schema: "prisma/schema.prisma", + migrations: { + path: "prisma/migrations", + }, + datasource: { + url: env("DATABASE_URL"), + }, +}); diff --git a/prisma/generated/prisma/browser.ts b/prisma/generated/prisma/browser.ts new file mode 100644 index 0000000..70179ef --- /dev/null +++ b/prisma/generated/prisma/browser.ts @@ -0,0 +1,34 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟢 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser' +export { Prisma } +export * as $Enums from './enums' +export * from './enums'; +/** + * Model User + * + */ +export type User = Prisma.UserModel +/** + * Model UserPreferences + * + */ +export type UserPreferences = Prisma.UserPreferencesModel +/** + * Model Event + * + */ +export type Event = Prisma.EventModel diff --git a/prisma/generated/prisma/client.ts b/prisma/generated/prisma/client.ts new file mode 100644 index 0000000..55c3d49 --- /dev/null +++ b/prisma/generated/prisma/client.ts @@ -0,0 +1,56 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟢 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' +globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url)) + +import * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import * as $Class from "./internal/class" +import * as Prisma from "./internal/prismaNamespace" + +export * as $Enums from './enums' +export * from "./enums" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient = $Class.PrismaClient +export { Prisma } + +/** + * Model User + * + */ +export type User = Prisma.UserModel +/** + * Model UserPreferences + * + */ +export type UserPreferences = Prisma.UserPreferencesModel +/** + * Model Event + * + */ +export type Event = Prisma.EventModel diff --git a/prisma/generated/prisma/commonInputTypes.ts b/prisma/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..c654f3c --- /dev/null +++ b/prisma/generated/prisma/commonInputTypes.ts @@ -0,0 +1,374 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟢 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import type * as Prisma from "./internal/prismaNamespace" + + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type EnumRoleFilter<$PrismaModel = never> = { + equals?: $Enums.Role | Prisma.EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] + notIn?: $Enums.Role[] + not?: Prisma.NestedEnumRoleFilter<$PrismaModel> | $Enums.Role +} + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type EnumRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Role | Prisma.EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] + notIn?: $Enums.Role[] + not?: Prisma.NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumRoleFilter<$PrismaModel> + _max?: Prisma.NestedEnumRoleFilter<$PrismaModel> +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type EnumEventTypeFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | Prisma.EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] + notIn?: $Enums.EventType[] + not?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> | $Enums.EventType +} + +export type EnumEventStatusFilter<$PrismaModel = never> = { + equals?: $Enums.EventStatus | Prisma.EnumEventStatusFieldRefInput<$PrismaModel> + in?: $Enums.EventStatus[] + notIn?: $Enums.EventStatus[] + not?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> | $Enums.EventStatus +} + +export type EnumEventTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | Prisma.EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] + notIn?: $Enums.EventType[] + not?: Prisma.NestedEnumEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventType + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> + _max?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> +} + +export type EnumEventStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventStatus | Prisma.EnumEventStatusFieldRefInput<$PrismaModel> + in?: $Enums.EventStatus[] + notIn?: $Enums.EventStatus[] + not?: Prisma.NestedEnumEventStatusWithAggregatesFilter<$PrismaModel> | $Enums.EventStatus + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> + _max?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedEnumRoleFilter<$PrismaModel = never> = { + equals?: $Enums.Role | Prisma.EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] + notIn?: $Enums.Role[] + not?: Prisma.NestedEnumRoleFilter<$PrismaModel> | $Enums.Role +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedEnumRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.Role | Prisma.EnumRoleFieldRefInput<$PrismaModel> + in?: $Enums.Role[] + notIn?: $Enums.Role[] + not?: Prisma.NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumRoleFilter<$PrismaModel> + _max?: Prisma.NestedEnumRoleFilter<$PrismaModel> +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedEnumEventTypeFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | Prisma.EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] + notIn?: $Enums.EventType[] + not?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> | $Enums.EventType +} + +export type NestedEnumEventStatusFilter<$PrismaModel = never> = { + equals?: $Enums.EventStatus | Prisma.EnumEventStatusFieldRefInput<$PrismaModel> + in?: $Enums.EventStatus[] + notIn?: $Enums.EventStatus[] + not?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> | $Enums.EventStatus +} + +export type NestedEnumEventTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventType | Prisma.EnumEventTypeFieldRefInput<$PrismaModel> + in?: $Enums.EventType[] + notIn?: $Enums.EventType[] + not?: Prisma.NestedEnumEventTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventType + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> + _max?: Prisma.NestedEnumEventTypeFilter<$PrismaModel> +} + +export type NestedEnumEventStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.EventStatus | Prisma.EnumEventStatusFieldRefInput<$PrismaModel> + in?: $Enums.EventStatus[] + notIn?: $Enums.EventStatus[] + not?: Prisma.NestedEnumEventStatusWithAggregatesFilter<$PrismaModel> | $Enums.EventStatus + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> + _max?: Prisma.NestedEnumEventStatusFilter<$PrismaModel> +} + + diff --git a/prisma/generated/prisma/enums.ts b/prisma/generated/prisma/enums.ts new file mode 100644 index 0000000..24a3886 --- /dev/null +++ b/prisma/generated/prisma/enums.ts @@ -0,0 +1,36 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟢 You can import this file directly. +*/ + +export const Role = { + USER: 'USER', + ADMIN: 'ADMIN' +} as const + +export type Role = (typeof Role)[keyof typeof Role] + + +export const EventType = { + SUMMIT: 'SUMMIT', + LAUNCH: 'LAUNCH', + FESTIVAL: 'FESTIVAL', + COMPETITION: 'COMPETITION' +} as const + +export type EventType = (typeof EventType)[keyof typeof EventType] + + +export const EventStatus = { + UPCOMING: 'UPCOMING', + LIVE: 'LIVE', + PAST: 'PAST' +} as const + +export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus] diff --git a/prisma/generated/prisma/internal/class.ts b/prisma/generated/prisma/internal/class.ts new file mode 100644 index 0000000..a65402a --- /dev/null +++ b/prisma/generated/prisma/internal/class.ts @@ -0,0 +1,210 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "./prismaNamespace" + + +const config: runtime.GetPrismaClientConfig = { + "previewFeatures": [], + "clientVersion": "7.1.0", + "engineVersion": "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba", + "activeProvider": "sqlite", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"./generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nenum Role {\n USER\n ADMIN\n}\n\nenum EventType {\n SUMMIT\n LAUNCH\n FESTIVAL\n COMPETITION\n}\n\nenum EventStatus {\n UPCOMING\n LIVE\n PAST\n}\n\nmodel User {\n id String @id @default(cuid())\n email String @unique\n password String\n username String @unique\n role Role @default(USER)\n score Int @default(0)\n level Int @default(1)\n hp Int @default(1000)\n maxHp Int @default(1000)\n xp Int @default(0)\n maxXp Int @default(5000)\n avatar String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n preferences UserPreferences?\n\n @@index([score])\n @@index([email])\n}\n\nmodel UserPreferences {\n id String @id @default(cuid())\n userId String @unique\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n // Background images for each page\n homeBackground String?\n eventsBackground String?\n leaderboardBackground String?\n\n // Other UI preferences can be added here\n theme String? @default(\"default\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Event {\n id String @id @default(cuid())\n date String\n name String\n description String\n type EventType\n status EventStatus\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([status])\n @@index([date])\n}\n", + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + } +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"username\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Role\"},{\"name\":\"score\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"level\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"maxHp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"xp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"maxXp\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avatar\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"preferences\",\"kind\":\"object\",\"type\":\"UserPreferences\",\"relationName\":\"UserToUserPreferences\"}],\"dbName\":null},\"UserPreferences\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"UserToUserPreferences\"},{\"name\":\"homeBackground\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventsBackground\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"leaderboardBackground\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"theme\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Event\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"EventType\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"EventStatus\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") + +async function decodeBase64AsWasm(wasmBase64: string): Promise { + const { Buffer } = await import('node:buffer') + const wasmArray = Buffer.from(wasmBase64, 'base64') + return new WebAssembly.Module(wasmArray) +} + +config.compilerWasm = { + getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.sqlite.mjs"), + + getQueryCompilerWasmModule: async () => { + const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs") + return await decodeBase64AsWasm(wasm) + } +} + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options: Prisma.Subset ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined, + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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 }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `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.userPreferences`: Exposes CRUD operations for the **UserPreferences** model. + * Example usage: + * ```ts + * // Fetch zero or more UserPreferences + * const userPreferences = await prisma.userPreferences.findMany() + * ``` + */ + get userPreferences(): Prisma.UserPreferencesDelegate; + + /** + * `prisma.event`: Exposes CRUD operations for the **Event** model. + * Example usage: + * ```ts + * // Fetch zero or more Events + * const events = await prisma.event.findMany() + * ``` + */ + get event(): Prisma.EventDelegate; +} + +export function getPrismaClientClass(): PrismaClientConstructor { + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/prisma/generated/prisma/internal/prismaNamespace.ts b/prisma/generated/prisma/internal/prismaNamespace.ts new file mode 100644 index 0000000..1b35b01 --- /dev/null +++ b/prisma/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,945 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "../models" +import { type PrismaClient } from "./class" + +export type * from '../models' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 7.1.0 + * Query Engine version: ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba + */ +export const prismaVersion: PrismaVersion = { + client: "7.1.0", + engine: "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba" +} + +/** + * Utility Types + */ + +export type Bytes = runtime.Bytes +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * 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; + +/** + * 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 + */ +export 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] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export 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 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 +export 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>>; + +export type Boolean = True | False + +export type True = 1 + +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 + +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 + +export 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 +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + User: 'User', + UserPreferences: 'UserPreferences', + Event: 'Event' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "user" | "userPreferences" | "event" + txIsolationLevel: TransactionIsolationLevel + } + model: { + User: { + payload: Prisma.$UserPayload + fields: Prisma.UserFieldRefs + operations: { + findUnique: { + args: Prisma.UserFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.UserFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.UserCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.UserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.UserUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.UserUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.UserUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.UserGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.UserCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + UserPreferences: { + payload: Prisma.$UserPreferencesPayload + fields: Prisma.UserPreferencesFieldRefs + operations: { + findUnique: { + args: Prisma.UserPreferencesFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserPreferencesFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserPreferencesFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserPreferencesFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.UserPreferencesFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.UserPreferencesCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.UserPreferencesCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserPreferencesCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserPreferencesDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.UserPreferencesUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserPreferencesDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserPreferencesUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.UserPreferencesUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.UserPreferencesUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserPreferencesAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.UserPreferencesGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.UserPreferencesCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Event: { + payload: Prisma.$EventPayload + fields: Prisma.EventFieldRefs + operations: { + findUnique: { + args: Prisma.EventFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.EventFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.EventFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.EventFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.EventFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.EventCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.EventCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.EventCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.EventDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.EventUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.EventDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.EventUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.EventUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.EventUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.EventAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.EventGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.EventCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const UserScalarFieldEnum = { + id: 'id', + email: 'email', + password: 'password', + username: 'username', + role: 'role', + score: 'score', + level: 'level', + hp: 'hp', + maxHp: 'maxHp', + xp: 'xp', + maxXp: 'maxXp', + avatar: 'avatar', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + + +export const UserPreferencesScalarFieldEnum = { + id: 'id', + userId: 'userId', + homeBackground: 'homeBackground', + eventsBackground: 'eventsBackground', + leaderboardBackground: 'leaderboardBackground', + theme: 'theme', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type UserPreferencesScalarFieldEnum = (typeof UserPreferencesScalarFieldEnum)[keyof typeof UserPreferencesScalarFieldEnum] + + +export const EventScalarFieldEnum = { + id: 'id', + date: 'date', + name: 'name', + description: 'description', + type: 'type', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type EventScalarFieldEnum = (typeof EventScalarFieldEnum)[keyof typeof EventScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +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 'Role' + */ +export type EnumRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Role'> + + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'EventType' + */ +export type EnumEventTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'EventType'> + + + +/** + * Reference to a field of type 'EventStatus' + */ +export type EnumEventStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'EventStatus'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +export type PrismaClientOptions = ({ + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never +} | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never +}) & { + /** + * @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://pris.ly/d/logging). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig + /** + * SQL commenter plugins that add metadata to SQL queries as comments. + * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * comments: [ + * traceContext(), + * queryInsights(), + * ], + * }) + * ``` + */ + comments?: runtime.SqlCommenterPlugin[] +} +export type GlobalOmitConfig = { + user?: Prisma.UserOmit + userPreferences?: Prisma.UserPreferencesOmit + event?: Prisma.EventOmit +} + +/* 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' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/prisma/generated/prisma/internal/prismaNamespaceBrowser.ts b/prisma/generated/prisma/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..62b01ec --- /dev/null +++ b/prisma/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,134 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models' +export type * from './prismaNamespace' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +export const ModelName = { + User: 'User', + UserPreferences: 'UserPreferences', + Event: 'Event' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = { + Serializable: 'Serializable' +} as const + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const UserScalarFieldEnum = { + id: 'id', + email: 'email', + password: 'password', + username: 'username', + role: 'role', + score: 'score', + level: 'level', + hp: 'hp', + maxHp: 'maxHp', + xp: 'xp', + maxXp: 'maxXp', + avatar: 'avatar', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + + +export const UserPreferencesScalarFieldEnum = { + id: 'id', + userId: 'userId', + homeBackground: 'homeBackground', + eventsBackground: 'eventsBackground', + leaderboardBackground: 'leaderboardBackground', + theme: 'theme', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type UserPreferencesScalarFieldEnum = (typeof UserPreferencesScalarFieldEnum)[keyof typeof UserPreferencesScalarFieldEnum] + + +export const EventScalarFieldEnum = { + id: 'id', + date: 'date', + name: 'name', + description: 'description', + type: 'type', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type EventScalarFieldEnum = (typeof EventScalarFieldEnum)[keyof typeof EventScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + diff --git a/prisma/generated/prisma/models.ts b/prisma/generated/prisma/models.ts new file mode 100644 index 0000000..5bc2897 --- /dev/null +++ b/prisma/generated/prisma/models.ts @@ -0,0 +1,14 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟢 You can import this file directly. + */ +export type * from './models/User' +export type * from './models/UserPreferences' +export type * from './models/Event' +export type * from './commonInputTypes' \ No newline at end of file diff --git a/prisma/generated/prisma/models/Event.ts b/prisma/generated/prisma/models/Event.ts new file mode 100644 index 0000000..e4a1923 --- /dev/null +++ b/prisma/generated/prisma/models/Event.ts @@ -0,0 +1,1234 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Event` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Event + * + */ +export type EventModel = runtime.Types.Result.DefaultSelection + +export type AggregateEvent = { + _count: EventCountAggregateOutputType | null + _min: EventMinAggregateOutputType | null + _max: EventMaxAggregateOutputType | null +} + +export type EventMinAggregateOutputType = { + id: string | null + date: string | null + name: string | null + description: string | null + type: $Enums.EventType | null + status: $Enums.EventStatus | null + createdAt: Date | null + updatedAt: Date | null +} + +export type EventMaxAggregateOutputType = { + id: string | null + date: string | null + name: string | null + description: string | null + type: $Enums.EventType | null + status: $Enums.EventStatus | null + createdAt: Date | null + updatedAt: Date | null +} + +export type EventCountAggregateOutputType = { + id: number + date: number + name: number + description: number + type: number + status: number + createdAt: number + updatedAt: number + _all: number +} + + +export type EventMinAggregateInputType = { + id?: true + date?: true + name?: true + description?: true + type?: true + status?: true + createdAt?: true + updatedAt?: true +} + +export type EventMaxAggregateInputType = { + id?: true + date?: true + name?: true + description?: true + type?: true + status?: true + createdAt?: true + updatedAt?: true +} + +export type EventCountAggregateInputType = { + id?: true + date?: true + name?: true + description?: true + type?: true + status?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type EventAggregateArgs = { + /** + * Filter which Event to aggregate. + */ + where?: Prisma.EventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Events to fetch. + */ + orderBy?: Prisma.EventOrderByWithRelationInput | Prisma.EventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.EventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Events 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` Events. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Events + **/ + _count?: true | EventCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: EventMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: EventMaxAggregateInputType +} + +export type GetEventAggregateType = { + [P in keyof T & keyof AggregateEvent]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type EventGroupByArgs = { + where?: Prisma.EventWhereInput + orderBy?: Prisma.EventOrderByWithAggregationInput | Prisma.EventOrderByWithAggregationInput[] + by: Prisma.EventScalarFieldEnum[] | Prisma.EventScalarFieldEnum + having?: Prisma.EventScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: EventCountAggregateInputType | true + _min?: EventMinAggregateInputType + _max?: EventMaxAggregateInputType +} + +export type EventGroupByOutputType = { + id: string + date: string + name: string + description: string + type: $Enums.EventType + status: $Enums.EventStatus + createdAt: Date + updatedAt: Date + _count: EventCountAggregateOutputType | null + _min: EventMinAggregateOutputType | null + _max: EventMaxAggregateOutputType | null +} + +type GetEventGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof EventGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type EventWhereInput = { + AND?: Prisma.EventWhereInput | Prisma.EventWhereInput[] + OR?: Prisma.EventWhereInput[] + NOT?: Prisma.EventWhereInput | Prisma.EventWhereInput[] + id?: Prisma.StringFilter<"Event"> | string + date?: Prisma.StringFilter<"Event"> | string + name?: Prisma.StringFilter<"Event"> | string + description?: Prisma.StringFilter<"Event"> | string + type?: Prisma.EnumEventTypeFilter<"Event"> | $Enums.EventType + status?: Prisma.EnumEventStatusFilter<"Event"> | $Enums.EventStatus + createdAt?: Prisma.DateTimeFilter<"Event"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Event"> | Date | string +} + +export type EventOrderByWithRelationInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + type?: Prisma.SortOrder + status?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EventWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.EventWhereInput | Prisma.EventWhereInput[] + OR?: Prisma.EventWhereInput[] + NOT?: Prisma.EventWhereInput | Prisma.EventWhereInput[] + date?: Prisma.StringFilter<"Event"> | string + name?: Prisma.StringFilter<"Event"> | string + description?: Prisma.StringFilter<"Event"> | string + type?: Prisma.EnumEventTypeFilter<"Event"> | $Enums.EventType + status?: Prisma.EnumEventStatusFilter<"Event"> | $Enums.EventStatus + createdAt?: Prisma.DateTimeFilter<"Event"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Event"> | Date | string +}, "id"> + +export type EventOrderByWithAggregationInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + type?: Prisma.SortOrder + status?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.EventCountOrderByAggregateInput + _max?: Prisma.EventMaxOrderByAggregateInput + _min?: Prisma.EventMinOrderByAggregateInput +} + +export type EventScalarWhereWithAggregatesInput = { + AND?: Prisma.EventScalarWhereWithAggregatesInput | Prisma.EventScalarWhereWithAggregatesInput[] + OR?: Prisma.EventScalarWhereWithAggregatesInput[] + NOT?: Prisma.EventScalarWhereWithAggregatesInput | Prisma.EventScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Event"> | string + date?: Prisma.StringWithAggregatesFilter<"Event"> | string + name?: Prisma.StringWithAggregatesFilter<"Event"> | string + description?: Prisma.StringWithAggregatesFilter<"Event"> | string + type?: Prisma.EnumEventTypeWithAggregatesFilter<"Event"> | $Enums.EventType + status?: Prisma.EnumEventStatusWithAggregatesFilter<"Event"> | $Enums.EventStatus + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Event"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Event"> | Date | string +} + +export type EventCreateInput = { + id?: string + date: string + name: string + description: string + type: $Enums.EventType + status: $Enums.EventStatus + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EventUncheckedCreateInput = { + id?: string + date: string + name: string + description: string + type: $Enums.EventType + status: $Enums.EventStatus + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EventUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + status?: Prisma.EnumEventStatusFieldUpdateOperationsInput | $Enums.EventStatus + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EventUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + status?: Prisma.EnumEventStatusFieldUpdateOperationsInput | $Enums.EventStatus + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EventCreateManyInput = { + id?: string + date: string + name: string + description: string + type: $Enums.EventType + status: $Enums.EventStatus + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EventUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + status?: Prisma.EnumEventStatusFieldUpdateOperationsInput | $Enums.EventStatus + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EventUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.EnumEventTypeFieldUpdateOperationsInput | $Enums.EventType + status?: Prisma.EnumEventStatusFieldUpdateOperationsInput | $Enums.EventStatus + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EventCountOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + type?: Prisma.SortOrder + status?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EventMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + type?: Prisma.SortOrder + status?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EventMinOrderByAggregateInput = { + id?: Prisma.SortOrder + date?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + type?: Prisma.SortOrder + status?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EnumEventTypeFieldUpdateOperationsInput = { + set?: $Enums.EventType +} + +export type EnumEventStatusFieldUpdateOperationsInput = { + set?: $Enums.EventStatus +} + + + +export type EventSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + name?: boolean + description?: boolean + type?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["event"]> + +export type EventSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + name?: boolean + description?: boolean + type?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["event"]> + +export type EventSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + date?: boolean + name?: boolean + description?: boolean + type?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["event"]> + +export type EventSelectScalar = { + id?: boolean + date?: boolean + name?: boolean + description?: boolean + type?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type EventOmit = runtime.Types.Extensions.GetOmit<"id" | "date" | "name" | "description" | "type" | "status" | "createdAt" | "updatedAt", ExtArgs["result"]["event"]> + +export type $EventPayload = { + name: "Event" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + date: string + name: string + description: string + type: $Enums.EventType + status: $Enums.EventStatus + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["event"]> + composites: {} +} + +export type EventGetPayload = runtime.Types.Result.GetResult + +export type EventCountArgs = + Omit & { + select?: EventCountAggregateInputType | true + } + +export interface EventDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Event'], meta: { name: 'Event' } } + /** + * Find zero or one Event that matches the filter. + * @param {EventFindUniqueArgs} args - Arguments to find a Event + * @example + * // Get one Event + * const event = await prisma.event.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Event that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {EventFindUniqueOrThrowArgs} args - Arguments to find a Event + * @example + * // Get one Event + * const event = await prisma.event.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Event 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 {EventFindFirstArgs} args - Arguments to find a Event + * @example + * // Get one Event + * const event = await prisma.event.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Event 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 {EventFindFirstOrThrowArgs} args - Arguments to find a Event + * @example + * // Get one Event + * const event = await prisma.event.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Events 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 {EventFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Events + * const events = await prisma.event.findMany() + * + * // Get first 10 Events + * const events = await prisma.event.findMany({ take: 10 }) + * + * // Only select the `id` + * const eventWithIdOnly = await prisma.event.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Event. + * @param {EventCreateArgs} args - Arguments to create a Event. + * @example + * // Create one Event + * const Event = await prisma.event.create({ + * data: { + * // ... data to create a Event + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Events. + * @param {EventCreateManyArgs} args - Arguments to create many Events. + * @example + * // Create many Events + * const event = await prisma.event.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Events and returns the data saved in the database. + * @param {EventCreateManyAndReturnArgs} args - Arguments to create many Events. + * @example + * // Create many Events + * const event = await prisma.event.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Events and only return the `id` + * const eventWithIdOnly = await prisma.event.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?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Event. + * @param {EventDeleteArgs} args - Arguments to delete one Event. + * @example + * // Delete one Event + * const Event = await prisma.event.delete({ + * where: { + * // ... filter to delete one Event + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Event. + * @param {EventUpdateArgs} args - Arguments to update one Event. + * @example + * // Update one Event + * const event = await prisma.event.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Events. + * @param {EventDeleteManyArgs} args - Arguments to filter Events to delete. + * @example + * // Delete a few Events + * const { count } = await prisma.event.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Events. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EventUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Events + * const event = await prisma.event.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Events and returns the data updated in the database. + * @param {EventUpdateManyAndReturnArgs} args - Arguments to update many Events. + * @example + * // Update many Events + * const event = await prisma.event.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Events and only return the `id` + * const eventWithIdOnly = await prisma.event.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: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Event. + * @param {EventUpsertArgs} args - Arguments to update or create a Event. + * @example + * // Update or create a Event + * const event = await prisma.event.upsert({ + * create: { + * // ... data to create a Event + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Event we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__EventClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Events. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EventCountArgs} args - Arguments to filter Events to count. + * @example + * // Count the number of Events + * const count = await prisma.event.count({ + * where: { + * // ... the filter for the Events we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Event. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EventAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Event. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EventGroupByArgs} 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 EventGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: EventGroupByArgs['orderBy'] } + : { orderBy?: EventGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetEventGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Event model + */ +readonly fields: EventFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Event. + * 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__EventClient 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Event model + */ +export interface EventFieldRefs { + readonly id: Prisma.FieldRef<"Event", 'String'> + readonly date: Prisma.FieldRef<"Event", 'String'> + readonly name: Prisma.FieldRef<"Event", 'String'> + readonly description: Prisma.FieldRef<"Event", 'String'> + readonly type: Prisma.FieldRef<"Event", 'EventType'> + readonly status: Prisma.FieldRef<"Event", 'EventStatus'> + readonly createdAt: Prisma.FieldRef<"Event", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Event", 'DateTime'> +} + + +// Custom InputTypes +/** + * Event findUnique + */ +export type EventFindUniqueArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter, which Event to fetch. + */ + where: Prisma.EventWhereUniqueInput +} + +/** + * Event findUniqueOrThrow + */ +export type EventFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter, which Event to fetch. + */ + where: Prisma.EventWhereUniqueInput +} + +/** + * Event findFirst + */ +export type EventFindFirstArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter, which Event to fetch. + */ + where?: Prisma.EventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Events to fetch. + */ + orderBy?: Prisma.EventOrderByWithRelationInput | Prisma.EventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Events. + */ + cursor?: Prisma.EventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Events 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` Events. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Events. + */ + distinct?: Prisma.EventScalarFieldEnum | Prisma.EventScalarFieldEnum[] +} + +/** + * Event findFirstOrThrow + */ +export type EventFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter, which Event to fetch. + */ + where?: Prisma.EventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Events to fetch. + */ + orderBy?: Prisma.EventOrderByWithRelationInput | Prisma.EventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Events. + */ + cursor?: Prisma.EventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Events 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` Events. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Events. + */ + distinct?: Prisma.EventScalarFieldEnum | Prisma.EventScalarFieldEnum[] +} + +/** + * Event findMany + */ +export type EventFindManyArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter, which Events to fetch. + */ + where?: Prisma.EventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Events to fetch. + */ + orderBy?: Prisma.EventOrderByWithRelationInput | Prisma.EventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Events. + */ + cursor?: Prisma.EventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Events 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` Events. + */ + skip?: number + distinct?: Prisma.EventScalarFieldEnum | Prisma.EventScalarFieldEnum[] +} + +/** + * Event create + */ +export type EventCreateArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * The data needed to create a Event. + */ + data: Prisma.XOR +} + +/** + * Event createMany + */ +export type EventCreateManyArgs = { + /** + * The data used to create many Events. + */ + data: Prisma.EventCreateManyInput | Prisma.EventCreateManyInput[] +} + +/** + * Event createManyAndReturn + */ +export type EventCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * The data used to create many Events. + */ + data: Prisma.EventCreateManyInput | Prisma.EventCreateManyInput[] +} + +/** + * Event update + */ +export type EventUpdateArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * The data needed to update a Event. + */ + data: Prisma.XOR + /** + * Choose, which Event to update. + */ + where: Prisma.EventWhereUniqueInput +} + +/** + * Event updateMany + */ +export type EventUpdateManyArgs = { + /** + * The data used to update Events. + */ + data: Prisma.XOR + /** + * Filter which Events to update + */ + where?: Prisma.EventWhereInput + /** + * Limit how many Events to update. + */ + limit?: number +} + +/** + * Event updateManyAndReturn + */ +export type EventUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * The data used to update Events. + */ + data: Prisma.XOR + /** + * Filter which Events to update + */ + where?: Prisma.EventWhereInput + /** + * Limit how many Events to update. + */ + limit?: number +} + +/** + * Event upsert + */ +export type EventUpsertArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * The filter to search for the Event to update in case it exists. + */ + where: Prisma.EventWhereUniqueInput + /** + * In case the Event found by the `where` argument doesn't exist, create a new Event with this data. + */ + create: Prisma.XOR + /** + * In case the Event was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Event delete + */ +export type EventDeleteArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null + /** + * Filter which Event to delete. + */ + where: Prisma.EventWhereUniqueInput +} + +/** + * Event deleteMany + */ +export type EventDeleteManyArgs = { + /** + * Filter which Events to delete + */ + where?: Prisma.EventWhereInput + /** + * Limit how many Events to delete. + */ + limit?: number +} + +/** + * Event without action + */ +export type EventDefaultArgs = { + /** + * Select specific fields to fetch from the Event + */ + select?: Prisma.EventSelect | null + /** + * Omit specific fields from the Event + */ + omit?: Prisma.EventOmit | null +} diff --git a/prisma/generated/prisma/models/User.ts b/prisma/generated/prisma/models/User.ts new file mode 100644 index 0000000..b9b8eb8 --- /dev/null +++ b/prisma/generated/prisma/models/User.ts @@ -0,0 +1,1670 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `User` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model User + * + */ +export type UserModel = runtime.Types.Result.DefaultSelection + +export type AggregateUser = { + _count: UserCountAggregateOutputType | null + _avg: UserAvgAggregateOutputType | null + _sum: UserSumAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null +} + +export type UserAvgAggregateOutputType = { + score: number | null + level: number | null + hp: number | null + maxHp: number | null + xp: number | null + maxXp: number | null +} + +export type UserSumAggregateOutputType = { + score: number | null + level: number | null + hp: number | null + maxHp: number | null + xp: number | null + maxXp: number | null +} + +export type UserMinAggregateOutputType = { + id: string | null + email: string | null + password: string | null + username: string | null + role: $Enums.Role | null + score: number | null + level: number | null + hp: number | null + maxHp: number | null + xp: number | null + maxXp: number | null + avatar: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type UserMaxAggregateOutputType = { + id: string | null + email: string | null + password: string | null + username: string | null + role: $Enums.Role | null + score: number | null + level: number | null + hp: number | null + maxHp: number | null + xp: number | null + maxXp: number | null + avatar: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type UserCountAggregateOutputType = { + id: number + email: number + password: number + username: number + role: number + score: number + level: number + hp: number + maxHp: number + xp: number + maxXp: number + avatar: number + createdAt: number + updatedAt: number + _all: number +} + + +export type UserAvgAggregateInputType = { + score?: true + level?: true + hp?: true + maxHp?: true + xp?: true + maxXp?: true +} + +export type UserSumAggregateInputType = { + score?: true + level?: true + hp?: true + maxHp?: true + xp?: true + maxXp?: true +} + +export type UserMinAggregateInputType = { + id?: true + email?: true + password?: true + username?: true + role?: true + score?: true + level?: true + hp?: true + maxHp?: true + xp?: true + maxXp?: true + avatar?: true + createdAt?: true + updatedAt?: true +} + +export type UserMaxAggregateInputType = { + id?: true + email?: true + password?: true + username?: true + role?: true + score?: true + level?: true + hp?: true + maxHp?: true + xp?: true + maxXp?: true + avatar?: true + createdAt?: true + updatedAt?: true +} + +export type UserCountAggregateInputType = { + id?: true + email?: true + password?: true + username?: true + role?: true + score?: true + level?: true + hp?: true + maxHp?: true + xp?: true + maxXp?: true + avatar?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type UserAggregateArgs = { + /** + * Filter which User to aggregate. + */ + where?: Prisma.UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.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 average + **/ + _avg?: UserAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: UserSumAggregateInputType + /** + * {@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 + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type UserGroupByArgs = { + where?: Prisma.UserWhereInput + orderBy?: Prisma.UserOrderByWithAggregationInput | Prisma.UserOrderByWithAggregationInput[] + by: Prisma.UserScalarFieldEnum[] | Prisma.UserScalarFieldEnum + having?: Prisma.UserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserCountAggregateInputType | true + _avg?: UserAvgAggregateInputType + _sum?: UserSumAggregateInputType + _min?: UserMinAggregateInputType + _max?: UserMaxAggregateInputType +} + +export type UserGroupByOutputType = { + id: string + email: string + password: string + username: string + role: $Enums.Role + score: number + level: number + hp: number + maxHp: number + xp: number + maxXp: number + avatar: string | null + createdAt: Date + updatedAt: Date + _count: UserCountAggregateOutputType | null + _avg: UserAvgAggregateOutputType | null + _sum: UserSumAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null +} + +type GetUserGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type UserWhereInput = { + AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] + OR?: Prisma.UserWhereInput[] + NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] + id?: Prisma.StringFilter<"User"> | string + email?: Prisma.StringFilter<"User"> | string + password?: Prisma.StringFilter<"User"> | string + username?: Prisma.StringFilter<"User"> | string + role?: Prisma.EnumRoleFilter<"User"> | $Enums.Role + score?: Prisma.IntFilter<"User"> | number + level?: Prisma.IntFilter<"User"> | number + hp?: Prisma.IntFilter<"User"> | number + maxHp?: Prisma.IntFilter<"User"> | number + xp?: Prisma.IntFilter<"User"> | number + maxXp?: Prisma.IntFilter<"User"> | number + avatar?: Prisma.StringNullableFilter<"User"> | string | null + createdAt?: Prisma.DateTimeFilter<"User"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string + preferences?: Prisma.XOR | null +} + +export type UserOrderByWithRelationInput = { + id?: Prisma.SortOrder + email?: Prisma.SortOrder + password?: Prisma.SortOrder + username?: Prisma.SortOrder + role?: Prisma.SortOrder + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder + avatar?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + preferences?: Prisma.UserPreferencesOrderByWithRelationInput +} + +export type UserWhereUniqueInput = Prisma.AtLeast<{ + id?: string + email?: string + username?: string + AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] + OR?: Prisma.UserWhereInput[] + NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] + password?: Prisma.StringFilter<"User"> | string + role?: Prisma.EnumRoleFilter<"User"> | $Enums.Role + score?: Prisma.IntFilter<"User"> | number + level?: Prisma.IntFilter<"User"> | number + hp?: Prisma.IntFilter<"User"> | number + maxHp?: Prisma.IntFilter<"User"> | number + xp?: Prisma.IntFilter<"User"> | number + maxXp?: Prisma.IntFilter<"User"> | number + avatar?: Prisma.StringNullableFilter<"User"> | string | null + createdAt?: Prisma.DateTimeFilter<"User"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string + preferences?: Prisma.XOR | null +}, "id" | "email" | "username"> + +export type UserOrderByWithAggregationInput = { + id?: Prisma.SortOrder + email?: Prisma.SortOrder + password?: Prisma.SortOrder + username?: Prisma.SortOrder + role?: Prisma.SortOrder + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder + avatar?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.UserCountOrderByAggregateInput + _avg?: Prisma.UserAvgOrderByAggregateInput + _max?: Prisma.UserMaxOrderByAggregateInput + _min?: Prisma.UserMinOrderByAggregateInput + _sum?: Prisma.UserSumOrderByAggregateInput +} + +export type UserScalarWhereWithAggregatesInput = { + AND?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] + OR?: Prisma.UserScalarWhereWithAggregatesInput[] + NOT?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"User"> | string + email?: Prisma.StringWithAggregatesFilter<"User"> | string + password?: Prisma.StringWithAggregatesFilter<"User"> | string + username?: Prisma.StringWithAggregatesFilter<"User"> | string + role?: Prisma.EnumRoleWithAggregatesFilter<"User"> | $Enums.Role + score?: Prisma.IntWithAggregatesFilter<"User"> | number + level?: Prisma.IntWithAggregatesFilter<"User"> | number + hp?: Prisma.IntWithAggregatesFilter<"User"> | number + maxHp?: Prisma.IntWithAggregatesFilter<"User"> | number + xp?: Prisma.IntWithAggregatesFilter<"User"> | number + maxXp?: Prisma.IntWithAggregatesFilter<"User"> | number + avatar?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string +} + +export type UserCreateInput = { + id?: string + email: string + password: string + username: string + role?: $Enums.Role + score?: number + level?: number + hp?: number + maxHp?: number + xp?: number + maxXp?: number + avatar?: string | null + createdAt?: Date | string + updatedAt?: Date | string + preferences?: Prisma.UserPreferencesCreateNestedOneWithoutUserInput +} + +export type UserUncheckedCreateInput = { + id?: string + email: string + password: string + username: string + role?: $Enums.Role + score?: number + level?: number + hp?: number + maxHp?: number + xp?: number + maxXp?: number + avatar?: string | null + createdAt?: Date | string + updatedAt?: Date | string + preferences?: Prisma.UserPreferencesUncheckedCreateNestedOneWithoutUserInput +} + +export type UserUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preferences?: Prisma.UserPreferencesUpdateOneWithoutUserNestedInput +} + +export type UserUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preferences?: Prisma.UserPreferencesUncheckedUpdateOneWithoutUserNestedInput +} + +export type UserCreateManyInput = { + id?: string + email: string + password: string + username: string + role?: $Enums.Role + score?: number + level?: number + hp?: number + maxHp?: number + xp?: number + maxXp?: number + avatar?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserCountOrderByAggregateInput = { + id?: Prisma.SortOrder + email?: Prisma.SortOrder + password?: Prisma.SortOrder + username?: Prisma.SortOrder + role?: Prisma.SortOrder + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder + avatar?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserAvgOrderByAggregateInput = { + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder +} + +export type UserMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + email?: Prisma.SortOrder + password?: Prisma.SortOrder + username?: Prisma.SortOrder + role?: Prisma.SortOrder + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder + avatar?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserMinOrderByAggregateInput = { + id?: Prisma.SortOrder + email?: Prisma.SortOrder + password?: Prisma.SortOrder + username?: Prisma.SortOrder + role?: Prisma.SortOrder + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder + avatar?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserSumOrderByAggregateInput = { + score?: Prisma.SortOrder + level?: Prisma.SortOrder + hp?: Prisma.SortOrder + maxHp?: Prisma.SortOrder + xp?: Prisma.SortOrder + maxXp?: Prisma.SortOrder +} + +export type UserScalarRelationFilter = { + is?: Prisma.UserWhereInput + isNot?: Prisma.UserWhereInput +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type EnumRoleFieldUpdateOperationsInput = { + set?: $Enums.Role +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type UserCreateNestedOneWithoutPreferencesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserCreateOrConnectWithoutPreferencesInput + connect?: Prisma.UserWhereUniqueInput +} + +export type UserUpdateOneRequiredWithoutPreferencesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserCreateOrConnectWithoutPreferencesInput + upsert?: Prisma.UserUpsertWithoutPreferencesInput + connect?: Prisma.UserWhereUniqueInput + update?: Prisma.XOR, Prisma.UserUncheckedUpdateWithoutPreferencesInput> +} + +export type UserCreateWithoutPreferencesInput = { + id?: string + email: string + password: string + username: string + role?: $Enums.Role + score?: number + level?: number + hp?: number + maxHp?: number + xp?: number + maxXp?: number + avatar?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserUncheckedCreateWithoutPreferencesInput = { + id?: string + email: string + password: string + username: string + role?: $Enums.Role + score?: number + level?: number + hp?: number + maxHp?: number + xp?: number + maxXp?: number + avatar?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserCreateOrConnectWithoutPreferencesInput = { + where: Prisma.UserWhereUniqueInput + create: Prisma.XOR +} + +export type UserUpsertWithoutPreferencesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.UserWhereInput +} + +export type UserUpdateToOneWithWhereWithoutPreferencesInput = { + where?: Prisma.UserWhereInput + data: Prisma.XOR +} + +export type UserUpdateWithoutPreferencesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserUncheckedUpdateWithoutPreferencesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + password?: Prisma.StringFieldUpdateOperationsInput | string + username?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.EnumRoleFieldUpdateOperationsInput | $Enums.Role + score?: Prisma.IntFieldUpdateOperationsInput | number + level?: Prisma.IntFieldUpdateOperationsInput | number + hp?: Prisma.IntFieldUpdateOperationsInput | number + maxHp?: Prisma.IntFieldUpdateOperationsInput | number + xp?: Prisma.IntFieldUpdateOperationsInput | number + maxXp?: Prisma.IntFieldUpdateOperationsInput | number + avatar?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type UserSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + email?: boolean + password?: boolean + username?: boolean + role?: boolean + score?: boolean + level?: boolean + hp?: boolean + maxHp?: boolean + xp?: boolean + maxXp?: boolean + avatar?: boolean + createdAt?: boolean + updatedAt?: boolean + preferences?: boolean | Prisma.User$preferencesArgs +}, ExtArgs["result"]["user"]> + +export type UserSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + email?: boolean + password?: boolean + username?: boolean + role?: boolean + score?: boolean + level?: boolean + hp?: boolean + maxHp?: boolean + xp?: boolean + maxXp?: boolean + avatar?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["user"]> + +export type UserSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + email?: boolean + password?: boolean + username?: boolean + role?: boolean + score?: boolean + level?: boolean + hp?: boolean + maxHp?: boolean + xp?: boolean + maxXp?: boolean + avatar?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["user"]> + +export type UserSelectScalar = { + id?: boolean + email?: boolean + password?: boolean + username?: boolean + role?: boolean + score?: boolean + level?: boolean + hp?: boolean + maxHp?: boolean + xp?: boolean + maxXp?: boolean + avatar?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type UserOmit = runtime.Types.Extensions.GetOmit<"id" | "email" | "password" | "username" | "role" | "score" | "level" | "hp" | "maxHp" | "xp" | "maxXp" | "avatar" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]> +export type UserInclude = { + preferences?: boolean | Prisma.User$preferencesArgs +} +export type UserIncludeCreateManyAndReturn = {} +export type UserIncludeUpdateManyAndReturn = {} + +export type $UserPayload = { + name: "User" + objects: { + preferences: Prisma.$UserPreferencesPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + email: string + password: string + username: string + role: $Enums.Role + score: number + level: number + hp: number + maxHp: number + xp: number + maxXp: number + avatar: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["user"]> + composites: {} +} + +export type UserGetPayload = runtime.Types.Result.GetResult + +export 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.SelectSubset>): Prisma.PrismaPromise, 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.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?: Prisma.SelectSubset>): Prisma.PrismaPromise, 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.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: Prisma.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: Prisma.SelectSubset>): Prisma.PrismaPromise, 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: Prisma.SelectSubset>): Prisma.Prisma__UserClient, 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?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.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: Prisma.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 Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: UserGroupByArgs['orderBy'] } + : { orderBy?: UserGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.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" + preferences = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserPreferencesClient, 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the User model + */ +export interface UserFieldRefs { + readonly id: Prisma.FieldRef<"User", 'String'> + readonly email: Prisma.FieldRef<"User", 'String'> + readonly password: Prisma.FieldRef<"User", 'String'> + readonly username: Prisma.FieldRef<"User", 'String'> + readonly role: Prisma.FieldRef<"User", 'Role'> + readonly score: Prisma.FieldRef<"User", 'Int'> + readonly level: Prisma.FieldRef<"User", 'Int'> + readonly hp: Prisma.FieldRef<"User", 'Int'> + readonly maxHp: Prisma.FieldRef<"User", 'Int'> + readonly xp: Prisma.FieldRef<"User", 'Int'> + readonly maxXp: Prisma.FieldRef<"User", 'Int'> + readonly avatar: Prisma.FieldRef<"User", 'String'> + readonly createdAt: Prisma.FieldRef<"User", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"User", 'DateTime'> +} + + +// Custom InputTypes +/** + * User findUnique + */ +export type UserFindUniqueArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter, which User to fetch. + */ + where: Prisma.UserWhereUniqueInput +} + +/** + * User findUniqueOrThrow + */ +export type UserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter, which User to fetch. + */ + where: Prisma.UserWhereUniqueInput +} + +/** + * User findFirst + */ +export type UserFindFirstArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: Prisma.UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.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?: Prisma.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?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] +} + +/** + * User findFirstOrThrow + */ +export type UserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: Prisma.UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.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?: Prisma.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?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] +} + +/** + * User findMany + */ +export type UserFindManyArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter, which Users to fetch. + */ + where?: Prisma.UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Users. + */ + cursor?: Prisma.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?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] +} + +/** + * User create + */ +export type UserCreateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * The data needed to create a User. + */ + data: Prisma.XOR +} + +/** + * User createMany + */ +export type UserCreateManyArgs = { + /** + * The data used to create many Users. + */ + data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[] +} + +/** + * User createManyAndReturn + */ +export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelectCreateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * The data used to create many Users. + */ + data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[] +} + +/** + * User update + */ +export type UserUpdateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * The data needed to update a User. + */ + data: Prisma.XOR + /** + * Choose, which User to update. + */ + where: Prisma.UserWhereUniqueInput +} + +/** + * User updateMany + */ +export type UserUpdateManyArgs = { + /** + * The data used to update Users. + */ + data: Prisma.XOR + /** + * Filter which Users to update + */ + where?: Prisma.UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number +} + +/** + * User updateManyAndReturn + */ +export type UserUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * The data used to update Users. + */ + data: Prisma.XOR + /** + * Filter which Users to update + */ + where?: Prisma.UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number +} + +/** + * User upsert + */ +export type UserUpsertArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * The filter to search for the User to update in case it exists. + */ + where: Prisma.UserWhereUniqueInput + /** + * In case the User found by the `where` argument doesn't exist, create a new User with this data. + */ + create: Prisma.XOR + /** + * In case the User was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * User delete + */ +export type UserDeleteArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null + /** + * Filter which User to delete. + */ + where: Prisma.UserWhereUniqueInput +} + +/** + * User deleteMany + */ +export type UserDeleteManyArgs = { + /** + * Filter which Users to delete + */ + where?: Prisma.UserWhereInput + /** + * Limit how many Users to delete. + */ + limit?: number +} + +/** + * User.preferences + */ +export type User$preferencesArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + where?: Prisma.UserPreferencesWhereInput +} + +/** + * User without action + */ +export type UserDefaultArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: Prisma.UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: Prisma.UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserInclude | null +} diff --git a/prisma/generated/prisma/models/UserPreferences.ts b/prisma/generated/prisma/models/UserPreferences.ts new file mode 100644 index 0000000..913787d --- /dev/null +++ b/prisma/generated/prisma/models/UserPreferences.ts @@ -0,0 +1,1384 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `UserPreferences` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model UserPreferences + * + */ +export type UserPreferencesModel = runtime.Types.Result.DefaultSelection + +export type AggregateUserPreferences = { + _count: UserPreferencesCountAggregateOutputType | null + _min: UserPreferencesMinAggregateOutputType | null + _max: UserPreferencesMaxAggregateOutputType | null +} + +export type UserPreferencesMinAggregateOutputType = { + id: string | null + userId: string | null + homeBackground: string | null + eventsBackground: string | null + leaderboardBackground: string | null + theme: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type UserPreferencesMaxAggregateOutputType = { + id: string | null + userId: string | null + homeBackground: string | null + eventsBackground: string | null + leaderboardBackground: string | null + theme: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type UserPreferencesCountAggregateOutputType = { + id: number + userId: number + homeBackground: number + eventsBackground: number + leaderboardBackground: number + theme: number + createdAt: number + updatedAt: number + _all: number +} + + +export type UserPreferencesMinAggregateInputType = { + id?: true + userId?: true + homeBackground?: true + eventsBackground?: true + leaderboardBackground?: true + theme?: true + createdAt?: true + updatedAt?: true +} + +export type UserPreferencesMaxAggregateInputType = { + id?: true + userId?: true + homeBackground?: true + eventsBackground?: true + leaderboardBackground?: true + theme?: true + createdAt?: true + updatedAt?: true +} + +export type UserPreferencesCountAggregateInputType = { + id?: true + userId?: true + homeBackground?: true + eventsBackground?: true + leaderboardBackground?: true + theme?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type UserPreferencesAggregateArgs = { + /** + * Filter which UserPreferences to aggregate. + */ + where?: Prisma.UserPreferencesWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPreferences to fetch. + */ + orderBy?: Prisma.UserPreferencesOrderByWithRelationInput | Prisma.UserPreferencesOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.UserPreferencesWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPreferences 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` UserPreferences. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned UserPreferences + **/ + _count?: true | UserPreferencesCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserPreferencesMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserPreferencesMaxAggregateInputType +} + +export type GetUserPreferencesAggregateType = { + [P in keyof T & keyof AggregateUserPreferences]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type UserPreferencesGroupByArgs = { + where?: Prisma.UserPreferencesWhereInput + orderBy?: Prisma.UserPreferencesOrderByWithAggregationInput | Prisma.UserPreferencesOrderByWithAggregationInput[] + by: Prisma.UserPreferencesScalarFieldEnum[] | Prisma.UserPreferencesScalarFieldEnum + having?: Prisma.UserPreferencesScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserPreferencesCountAggregateInputType | true + _min?: UserPreferencesMinAggregateInputType + _max?: UserPreferencesMaxAggregateInputType +} + +export type UserPreferencesGroupByOutputType = { + id: string + userId: string + homeBackground: string | null + eventsBackground: string | null + leaderboardBackground: string | null + theme: string | null + createdAt: Date + updatedAt: Date + _count: UserPreferencesCountAggregateOutputType | null + _min: UserPreferencesMinAggregateOutputType | null + _max: UserPreferencesMaxAggregateOutputType | null +} + +type GetUserPreferencesGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof UserPreferencesGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type UserPreferencesWhereInput = { + AND?: Prisma.UserPreferencesWhereInput | Prisma.UserPreferencesWhereInput[] + OR?: Prisma.UserPreferencesWhereInput[] + NOT?: Prisma.UserPreferencesWhereInput | Prisma.UserPreferencesWhereInput[] + id?: Prisma.StringFilter<"UserPreferences"> | string + userId?: Prisma.StringFilter<"UserPreferences"> | string + homeBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + eventsBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + leaderboardBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + theme?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + createdAt?: Prisma.DateTimeFilter<"UserPreferences"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"UserPreferences"> | Date | string + user?: Prisma.XOR +} + +export type UserPreferencesOrderByWithRelationInput = { + id?: Prisma.SortOrder + userId?: Prisma.SortOrder + homeBackground?: Prisma.SortOrderInput | Prisma.SortOrder + eventsBackground?: Prisma.SortOrderInput | Prisma.SortOrder + leaderboardBackground?: Prisma.SortOrderInput | Prisma.SortOrder + theme?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + user?: Prisma.UserOrderByWithRelationInput +} + +export type UserPreferencesWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId?: string + AND?: Prisma.UserPreferencesWhereInput | Prisma.UserPreferencesWhereInput[] + OR?: Prisma.UserPreferencesWhereInput[] + NOT?: Prisma.UserPreferencesWhereInput | Prisma.UserPreferencesWhereInput[] + homeBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + eventsBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + leaderboardBackground?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + theme?: Prisma.StringNullableFilter<"UserPreferences"> | string | null + createdAt?: Prisma.DateTimeFilter<"UserPreferences"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"UserPreferences"> | Date | string + user?: Prisma.XOR +}, "id" | "userId"> + +export type UserPreferencesOrderByWithAggregationInput = { + id?: Prisma.SortOrder + userId?: Prisma.SortOrder + homeBackground?: Prisma.SortOrderInput | Prisma.SortOrder + eventsBackground?: Prisma.SortOrderInput | Prisma.SortOrder + leaderboardBackground?: Prisma.SortOrderInput | Prisma.SortOrder + theme?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.UserPreferencesCountOrderByAggregateInput + _max?: Prisma.UserPreferencesMaxOrderByAggregateInput + _min?: Prisma.UserPreferencesMinOrderByAggregateInput +} + +export type UserPreferencesScalarWhereWithAggregatesInput = { + AND?: Prisma.UserPreferencesScalarWhereWithAggregatesInput | Prisma.UserPreferencesScalarWhereWithAggregatesInput[] + OR?: Prisma.UserPreferencesScalarWhereWithAggregatesInput[] + NOT?: Prisma.UserPreferencesScalarWhereWithAggregatesInput | Prisma.UserPreferencesScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"UserPreferences"> | string + userId?: Prisma.StringWithAggregatesFilter<"UserPreferences"> | string + homeBackground?: Prisma.StringNullableWithAggregatesFilter<"UserPreferences"> | string | null + eventsBackground?: Prisma.StringNullableWithAggregatesFilter<"UserPreferences"> | string | null + leaderboardBackground?: Prisma.StringNullableWithAggregatesFilter<"UserPreferences"> | string | null + theme?: Prisma.StringNullableWithAggregatesFilter<"UserPreferences"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"UserPreferences"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"UserPreferences"> | Date | string +} + +export type UserPreferencesCreateInput = { + id?: string + homeBackground?: string | null + eventsBackground?: string | null + leaderboardBackground?: string | null + theme?: string | null + createdAt?: Date | string + updatedAt?: Date | string + user: Prisma.UserCreateNestedOneWithoutPreferencesInput +} + +export type UserPreferencesUncheckedCreateInput = { + id?: string + userId: string + homeBackground?: string | null + eventsBackground?: string | null + leaderboardBackground?: string | null + theme?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserPreferencesUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + user?: Prisma.UserUpdateOneRequiredWithoutPreferencesNestedInput +} + +export type UserPreferencesUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + userId?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserPreferencesCreateManyInput = { + id?: string + userId: string + homeBackground?: string | null + eventsBackground?: string | null + leaderboardBackground?: string | null + theme?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserPreferencesUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserPreferencesUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + userId?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserPreferencesNullableScalarRelationFilter = { + is?: Prisma.UserPreferencesWhereInput | null + isNot?: Prisma.UserPreferencesWhereInput | null +} + +export type UserPreferencesCountOrderByAggregateInput = { + id?: Prisma.SortOrder + userId?: Prisma.SortOrder + homeBackground?: Prisma.SortOrder + eventsBackground?: Prisma.SortOrder + leaderboardBackground?: Prisma.SortOrder + theme?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserPreferencesMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + userId?: Prisma.SortOrder + homeBackground?: Prisma.SortOrder + eventsBackground?: Prisma.SortOrder + leaderboardBackground?: Prisma.SortOrder + theme?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserPreferencesMinOrderByAggregateInput = { + id?: Prisma.SortOrder + userId?: Prisma.SortOrder + homeBackground?: Prisma.SortOrder + eventsBackground?: Prisma.SortOrder + leaderboardBackground?: Prisma.SortOrder + theme?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type UserPreferencesCreateNestedOneWithoutUserInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserPreferencesCreateOrConnectWithoutUserInput + connect?: Prisma.UserPreferencesWhereUniqueInput +} + +export type UserPreferencesUncheckedCreateNestedOneWithoutUserInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserPreferencesCreateOrConnectWithoutUserInput + connect?: Prisma.UserPreferencesWhereUniqueInput +} + +export type UserPreferencesUpdateOneWithoutUserNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserPreferencesCreateOrConnectWithoutUserInput + upsert?: Prisma.UserPreferencesUpsertWithoutUserInput + disconnect?: Prisma.UserPreferencesWhereInput | boolean + delete?: Prisma.UserPreferencesWhereInput | boolean + connect?: Prisma.UserPreferencesWhereUniqueInput + update?: Prisma.XOR, Prisma.UserPreferencesUncheckedUpdateWithoutUserInput> +} + +export type UserPreferencesUncheckedUpdateOneWithoutUserNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.UserPreferencesCreateOrConnectWithoutUserInput + upsert?: Prisma.UserPreferencesUpsertWithoutUserInput + disconnect?: Prisma.UserPreferencesWhereInput | boolean + delete?: Prisma.UserPreferencesWhereInput | boolean + connect?: Prisma.UserPreferencesWhereUniqueInput + update?: Prisma.XOR, Prisma.UserPreferencesUncheckedUpdateWithoutUserInput> +} + +export type UserPreferencesCreateWithoutUserInput = { + id?: string + homeBackground?: string | null + eventsBackground?: string | null + leaderboardBackground?: string | null + theme?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserPreferencesUncheckedCreateWithoutUserInput = { + id?: string + homeBackground?: string | null + eventsBackground?: string | null + leaderboardBackground?: string | null + theme?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type UserPreferencesCreateOrConnectWithoutUserInput = { + where: Prisma.UserPreferencesWhereUniqueInput + create: Prisma.XOR +} + +export type UserPreferencesUpsertWithoutUserInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.UserPreferencesWhereInput +} + +export type UserPreferencesUpdateToOneWithWhereWithoutUserInput = { + where?: Prisma.UserPreferencesWhereInput + data: Prisma.XOR +} + +export type UserPreferencesUpdateWithoutUserInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type UserPreferencesUncheckedUpdateWithoutUserInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + homeBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + theme?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type UserPreferencesSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + userId?: boolean + homeBackground?: boolean + eventsBackground?: boolean + leaderboardBackground?: boolean + theme?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | Prisma.UserDefaultArgs +}, ExtArgs["result"]["userPreferences"]> + +export type UserPreferencesSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + userId?: boolean + homeBackground?: boolean + eventsBackground?: boolean + leaderboardBackground?: boolean + theme?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | Prisma.UserDefaultArgs +}, ExtArgs["result"]["userPreferences"]> + +export type UserPreferencesSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + userId?: boolean + homeBackground?: boolean + eventsBackground?: boolean + leaderboardBackground?: boolean + theme?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | Prisma.UserDefaultArgs +}, ExtArgs["result"]["userPreferences"]> + +export type UserPreferencesSelectScalar = { + id?: boolean + userId?: boolean + homeBackground?: boolean + eventsBackground?: boolean + leaderboardBackground?: boolean + theme?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type UserPreferencesOmit = runtime.Types.Extensions.GetOmit<"id" | "userId" | "homeBackground" | "eventsBackground" | "leaderboardBackground" | "theme" | "createdAt" | "updatedAt", ExtArgs["result"]["userPreferences"]> +export type UserPreferencesInclude = { + user?: boolean | Prisma.UserDefaultArgs +} +export type UserPreferencesIncludeCreateManyAndReturn = { + user?: boolean | Prisma.UserDefaultArgs +} +export type UserPreferencesIncludeUpdateManyAndReturn = { + user?: boolean | Prisma.UserDefaultArgs +} + +export type $UserPreferencesPayload = { + name: "UserPreferences" + objects: { + user: Prisma.$UserPayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + userId: string + homeBackground: string | null + eventsBackground: string | null + leaderboardBackground: string | null + theme: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["userPreferences"]> + composites: {} +} + +export type UserPreferencesGetPayload = runtime.Types.Result.GetResult + +export type UserPreferencesCountArgs = + Omit & { + select?: UserPreferencesCountAggregateInputType | true + } + +export interface UserPreferencesDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['UserPreferences'], meta: { name: 'UserPreferences' } } + /** + * Find zero or one UserPreferences that matches the filter. + * @param {UserPreferencesFindUniqueArgs} args - Arguments to find a UserPreferences + * @example + * // Get one UserPreferences + * const userPreferences = await prisma.userPreferences.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one UserPreferences that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserPreferencesFindUniqueOrThrowArgs} args - Arguments to find a UserPreferences + * @example + * // Get one UserPreferences + * const userPreferences = await prisma.userPreferences.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first UserPreferences 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 {UserPreferencesFindFirstArgs} args - Arguments to find a UserPreferences + * @example + * // Get one UserPreferences + * const userPreferences = await prisma.userPreferences.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first UserPreferences 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 {UserPreferencesFindFirstOrThrowArgs} args - Arguments to find a UserPreferences + * @example + * // Get one UserPreferences + * const userPreferences = await prisma.userPreferences.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more UserPreferences 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 {UserPreferencesFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all UserPreferences + * const userPreferences = await prisma.userPreferences.findMany() + * + * // Get first 10 UserPreferences + * const userPreferences = await prisma.userPreferences.findMany({ take: 10 }) + * + * // Only select the `id` + * const userPreferencesWithIdOnly = await prisma.userPreferences.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a UserPreferences. + * @param {UserPreferencesCreateArgs} args - Arguments to create a UserPreferences. + * @example + * // Create one UserPreferences + * const UserPreferences = await prisma.userPreferences.create({ + * data: { + * // ... data to create a UserPreferences + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many UserPreferences. + * @param {UserPreferencesCreateManyArgs} args - Arguments to create many UserPreferences. + * @example + * // Create many UserPreferences + * const userPreferences = await prisma.userPreferences.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many UserPreferences and returns the data saved in the database. + * @param {UserPreferencesCreateManyAndReturnArgs} args - Arguments to create many UserPreferences. + * @example + * // Create many UserPreferences + * const userPreferences = await prisma.userPreferences.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many UserPreferences and only return the `id` + * const userPreferencesWithIdOnly = await prisma.userPreferences.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?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a UserPreferences. + * @param {UserPreferencesDeleteArgs} args - Arguments to delete one UserPreferences. + * @example + * // Delete one UserPreferences + * const UserPreferences = await prisma.userPreferences.delete({ + * where: { + * // ... filter to delete one UserPreferences + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one UserPreferences. + * @param {UserPreferencesUpdateArgs} args - Arguments to update one UserPreferences. + * @example + * // Update one UserPreferences + * const userPreferences = await prisma.userPreferences.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more UserPreferences. + * @param {UserPreferencesDeleteManyArgs} args - Arguments to filter UserPreferences to delete. + * @example + * // Delete a few UserPreferences + * const { count } = await prisma.userPreferences.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more UserPreferences. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPreferencesUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many UserPreferences + * const userPreferences = await prisma.userPreferences.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more UserPreferences and returns the data updated in the database. + * @param {UserPreferencesUpdateManyAndReturnArgs} args - Arguments to update many UserPreferences. + * @example + * // Update many UserPreferences + * const userPreferences = await prisma.userPreferences.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more UserPreferences and only return the `id` + * const userPreferencesWithIdOnly = await prisma.userPreferences.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: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one UserPreferences. + * @param {UserPreferencesUpsertArgs} args - Arguments to update or create a UserPreferences. + * @example + * // Update or create a UserPreferences + * const userPreferences = await prisma.userPreferences.upsert({ + * create: { + * // ... data to create a UserPreferences + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the UserPreferences we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__UserPreferencesClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of UserPreferences. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPreferencesCountArgs} args - Arguments to filter UserPreferences to count. + * @example + * // Count the number of UserPreferences + * const count = await prisma.userPreferences.count({ + * where: { + * // ... the filter for the UserPreferences we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a UserPreferences. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPreferencesAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by UserPreferences. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPreferencesGroupByArgs} 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 UserPreferencesGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: UserPreferencesGroupByArgs['orderBy'] } + : { orderBy?: UserPreferencesGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserPreferencesGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the UserPreferences model + */ +readonly fields: UserPreferencesFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for UserPreferences. + * 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__UserPreferencesClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the UserPreferences model + */ +export interface UserPreferencesFieldRefs { + readonly id: Prisma.FieldRef<"UserPreferences", 'String'> + readonly userId: Prisma.FieldRef<"UserPreferences", 'String'> + readonly homeBackground: Prisma.FieldRef<"UserPreferences", 'String'> + readonly eventsBackground: Prisma.FieldRef<"UserPreferences", 'String'> + readonly leaderboardBackground: Prisma.FieldRef<"UserPreferences", 'String'> + readonly theme: Prisma.FieldRef<"UserPreferences", 'String'> + readonly createdAt: Prisma.FieldRef<"UserPreferences", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"UserPreferences", 'DateTime'> +} + + +// Custom InputTypes +/** + * UserPreferences findUnique + */ +export type UserPreferencesFindUniqueArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter, which UserPreferences to fetch. + */ + where: Prisma.UserPreferencesWhereUniqueInput +} + +/** + * UserPreferences findUniqueOrThrow + */ +export type UserPreferencesFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter, which UserPreferences to fetch. + */ + where: Prisma.UserPreferencesWhereUniqueInput +} + +/** + * UserPreferences findFirst + */ +export type UserPreferencesFindFirstArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter, which UserPreferences to fetch. + */ + where?: Prisma.UserPreferencesWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPreferences to fetch. + */ + orderBy?: Prisma.UserPreferencesOrderByWithRelationInput | Prisma.UserPreferencesOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserPreferences. + */ + cursor?: Prisma.UserPreferencesWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPreferences 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` UserPreferences. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserPreferences. + */ + distinct?: Prisma.UserPreferencesScalarFieldEnum | Prisma.UserPreferencesScalarFieldEnum[] +} + +/** + * UserPreferences findFirstOrThrow + */ +export type UserPreferencesFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter, which UserPreferences to fetch. + */ + where?: Prisma.UserPreferencesWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPreferences to fetch. + */ + orderBy?: Prisma.UserPreferencesOrderByWithRelationInput | Prisma.UserPreferencesOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserPreferences. + */ + cursor?: Prisma.UserPreferencesWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPreferences 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` UserPreferences. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserPreferences. + */ + distinct?: Prisma.UserPreferencesScalarFieldEnum | Prisma.UserPreferencesScalarFieldEnum[] +} + +/** + * UserPreferences findMany + */ +export type UserPreferencesFindManyArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter, which UserPreferences to fetch. + */ + where?: Prisma.UserPreferencesWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPreferences to fetch. + */ + orderBy?: Prisma.UserPreferencesOrderByWithRelationInput | Prisma.UserPreferencesOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing UserPreferences. + */ + cursor?: Prisma.UserPreferencesWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPreferences 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` UserPreferences. + */ + skip?: number + distinct?: Prisma.UserPreferencesScalarFieldEnum | Prisma.UserPreferencesScalarFieldEnum[] +} + +/** + * UserPreferences create + */ +export type UserPreferencesCreateArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * The data needed to create a UserPreferences. + */ + data: Prisma.XOR +} + +/** + * UserPreferences createMany + */ +export type UserPreferencesCreateManyArgs = { + /** + * The data used to create many UserPreferences. + */ + data: Prisma.UserPreferencesCreateManyInput | Prisma.UserPreferencesCreateManyInput[] +} + +/** + * UserPreferences createManyAndReturn + */ +export type UserPreferencesCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelectCreateManyAndReturn | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * The data used to create many UserPreferences. + */ + data: Prisma.UserPreferencesCreateManyInput | Prisma.UserPreferencesCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesIncludeCreateManyAndReturn | null +} + +/** + * UserPreferences update + */ +export type UserPreferencesUpdateArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * The data needed to update a UserPreferences. + */ + data: Prisma.XOR + /** + * Choose, which UserPreferences to update. + */ + where: Prisma.UserPreferencesWhereUniqueInput +} + +/** + * UserPreferences updateMany + */ +export type UserPreferencesUpdateManyArgs = { + /** + * The data used to update UserPreferences. + */ + data: Prisma.XOR + /** + * Filter which UserPreferences to update + */ + where?: Prisma.UserPreferencesWhereInput + /** + * Limit how many UserPreferences to update. + */ + limit?: number +} + +/** + * UserPreferences updateManyAndReturn + */ +export type UserPreferencesUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * The data used to update UserPreferences. + */ + data: Prisma.XOR + /** + * Filter which UserPreferences to update + */ + where?: Prisma.UserPreferencesWhereInput + /** + * Limit how many UserPreferences to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesIncludeUpdateManyAndReturn | null +} + +/** + * UserPreferences upsert + */ +export type UserPreferencesUpsertArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * The filter to search for the UserPreferences to update in case it exists. + */ + where: Prisma.UserPreferencesWhereUniqueInput + /** + * In case the UserPreferences found by the `where` argument doesn't exist, create a new UserPreferences with this data. + */ + create: Prisma.XOR + /** + * In case the UserPreferences was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * UserPreferences delete + */ +export type UserPreferencesDeleteArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null + /** + * Filter which UserPreferences to delete. + */ + where: Prisma.UserPreferencesWhereUniqueInput +} + +/** + * UserPreferences deleteMany + */ +export type UserPreferencesDeleteManyArgs = { + /** + * Filter which UserPreferences to delete + */ + where?: Prisma.UserPreferencesWhereInput + /** + * Limit how many UserPreferences to delete. + */ + limit?: number +} + +/** + * UserPreferences without action + */ +export type UserPreferencesDefaultArgs = { + /** + * Select specific fields to fetch from the UserPreferences + */ + select?: Prisma.UserPreferencesSelect | null + /** + * Omit specific fields from the UserPreferences + */ + omit?: Prisma.UserPreferencesOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.UserPreferencesInclude | null +} diff --git a/prisma/migrations/20251209055617_init/migration.sql b/prisma/migrations/20251209055617_init/migration.sql new file mode 100644 index 0000000..a634250 --- /dev/null +++ b/prisma/migrations/20251209055617_init/migration.sql @@ -0,0 +1,63 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL PRIMARY KEY, + "email" TEXT NOT NULL, + "password" TEXT NOT NULL, + "username" TEXT NOT NULL, + "role" TEXT NOT NULL DEFAULT 'USER', + "score" INTEGER NOT NULL DEFAULT 0, + "level" INTEGER NOT NULL DEFAULT 1, + "hp" INTEGER NOT NULL DEFAULT 1000, + "maxHp" INTEGER NOT NULL DEFAULT 1000, + "xp" INTEGER NOT NULL DEFAULT 0, + "maxXp" INTEGER NOT NULL DEFAULT 5000, + "avatar" TEXT, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateTable +CREATE TABLE "UserPreferences" ( + "id" TEXT NOT NULL PRIMARY KEY, + "userId" TEXT NOT NULL, + "homeBackground" TEXT, + "eventsBackground" TEXT, + "leaderboardBackground" TEXT, + "theme" TEXT DEFAULT 'default', + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + CONSTRAINT "UserPreferences_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Event" ( + "id" TEXT NOT NULL PRIMARY KEY, + "date" TEXT NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT NOT NULL, + "type" TEXT NOT NULL, + "status" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); + +-- CreateIndex +CREATE INDEX "User_score_idx" ON "User"("score"); + +-- CreateIndex +CREATE INDEX "User_email_idx" ON "User"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "UserPreferences_userId_key" ON "UserPreferences"("userId"); + +-- CreateIndex +CREATE INDEX "Event_status_idx" ON "Event"("status"); + +-- CreateIndex +CREATE INDEX "Event_date_idx" ON "Event"("date"); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..2a5a444 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (e.g., Git) +provider = "sqlite" diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..e63da1e --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,81 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client" + output = "./generated/prisma" +} + +datasource db { + provider = "sqlite" +} + +enum Role { + USER + ADMIN +} + +enum EventType { + SUMMIT + LAUNCH + FESTIVAL + COMPETITION +} + +enum EventStatus { + UPCOMING + LIVE + PAST +} + +model User { + id String @id @default(cuid()) + email String @unique + password String + username String @unique + role Role @default(USER) + score Int @default(0) + level Int @default(1) + hp Int @default(1000) + maxHp Int @default(1000) + xp Int @default(0) + maxXp Int @default(5000) + avatar String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + preferences UserPreferences? + + @@index([score]) + @@index([email]) +} + +model UserPreferences { + id String @id @default(cuid()) + userId String @unique + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + // Background images for each page + homeBackground String? + eventsBackground String? + leaderboardBackground String? + + // Other UI preferences can be added here + theme String? @default("default") + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model Event { + id String @id @default(cuid()) + date String + name String + description String + type EventType + status EventStatus + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([status]) + @@index([date]) +} diff --git a/prisma/seed.ts b/prisma/seed.ts new file mode 100644 index 0000000..aab74c5 --- /dev/null +++ b/prisma/seed.ts @@ -0,0 +1,144 @@ +import { + PrismaClient, + EventType, + EventStatus, +} from "@/prisma/generated/prisma/client"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; +import bcrypt from "bcryptjs"; + +const adapter = new PrismaBetterSqlite3({ + url: process.env.DATABASE_URL || "file:./dev.db", +}); +const prisma = new PrismaClient({ adapter }); + +async function main() { + // Créer un utilisateur admin + const adminPassword = await bcrypt.hash("admin123", 10); + const admin = await prisma.user.upsert({ + where: { email: "admin@got-mc.com" }, + update: {}, + create: { + email: "admin@got-mc.com", + username: "Admin", + password: adminPassword, + role: "ADMIN", + score: 0, + level: 1, + }, + }); + + // Créer quelques utilisateurs de test + const userPassword = await bcrypt.hash("user123", 10); + const users = await Promise.all([ + prisma.user.upsert({ + where: { email: "user1@got-mc.com" }, + update: {}, + create: { + email: "user1@got-mc.com", + username: "DragonSlayer99", + password: userPassword, + score: 125000, + level: 85, + hp: 750, + maxHp: 1000, + xp: 3250, + maxXp: 5000, + }, + }), + prisma.user.upsert({ + where: { email: "user2@got-mc.com" }, + update: {}, + create: { + email: "user2@got-mc.com", + username: "MineMaster", + password: userPassword, + score: 118500, + level: 82, + }, + }), + prisma.user.upsert({ + where: { email: "user3@got-mc.com" }, + update: {}, + create: { + email: "user3@got-mc.com", + username: "CraftKing", + password: userPassword, + score: 112000, + level: 80, + }, + }), + ]); + + // Créer des événements (vérifier s'ils existent déjà) + const eventData = [ + { + date: "18 NOVEMBRE 2023", + name: "Sommet de l'Innovation Tech", + description: + "Rejoignez les leaders de l'industrie et les innovateurs pour une journée de discussions sur les technologies de pointe, les percées de l'IA et des opportunités de networking.", + type: EventType.SUMMIT, + status: EventStatus.PAST, + }, + { + date: "3 DÉCEMBRE 2023", + name: "Lancement de la Révolution IA", + description: + "Assistez au lancement de systèmes d'IA révolutionnaires qui vont remodeler le paysage du gaming. Aperçus exclusifs et opportunités d'accès anticipé.", + type: EventType.LAUNCH, + status: EventStatus.PAST, + }, + { + date: "22 DÉCEMBRE 2023", + name: "Festival du Code d'Hiver", + description: + "Une célébration de l'excellence en programmation avec des hackathons, des défis de codage et des prix. Montrez vos compétences et rivalisez avec les meilleurs développeurs.", + type: EventType.FESTIVAL, + status: EventStatus.PAST, + }, + { + date: "15 JANVIER 2024", + name: "Expo Informatique Quantique", + description: + "Explorez l'avenir de l'informatique quantique dans le gaming. Démonstrations interactives, conférences d'experts et ateliers pratiques pour tous les niveaux.", + type: EventType.SUMMIT, + status: EventStatus.UPCOMING, + }, + { + date: "8 FÉVRIER 2024", + name: "Championnat Cyber Arena", + description: + "L'événement de gaming compétitif ultime. Compétissez pour la gloire, des récompenses exclusives et le titre de Champion Cyber Arena. Inscriptions ouvertes.", + type: EventType.COMPETITION, + status: EventStatus.UPCOMING, + }, + { + date: "12 MARS 2024", + name: "Gala Tech du Printemps", + description: + "Une soirée élégante célébrant les réalisations technologiques. Cérémonie de remise de prix, networking et annonces exclusives des plus grandes entreprises tech.", + type: EventType.FESTIVAL, + status: EventStatus.UPCOMING, + }, + ]; + + const events = await Promise.all( + eventData.map(async (data) => { + const existing = await prisma.event.findFirst({ + where: { name: data.name }, + }); + if (existing) return existing; + return prisma.event.create({ data }); + }) + ); + + console.log("Seed completed:", { admin, users, events }); +} + +main() + .catch((e) => { + console.error(e); + process.exit(1); + }) + .finally(async () => { + await prisma.$disconnect(); + }); diff --git a/types/next-auth.d.ts b/types/next-auth.d.ts new file mode 100644 index 0000000..b6eec3c --- /dev/null +++ b/types/next-auth.d.ts @@ -0,0 +1,27 @@ +import { Role } from "@/prisma/generated/prisma/client"; +import "next-auth"; + +declare module "next-auth" { + interface User { + id: string; + username: string; + role: Role; + } + + interface Session { + user: { + id: string; + email: string; + username: string; + role: Role; + }; + } +} + +declare module "next-auth/jwt" { + interface JWT { + id: string; + username: string; + role: Role; + } +}