Added better auth. Still fixing issues
This commit is contained in:
@@ -3,6 +3,8 @@ SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhY
|
||||
SUPABASE_ANON_KEY=sb_publishable_RgMLVBTCTClhK-1Ks_X02Q_Sq1Z1Pq-
|
||||
CORS_ORIGIN=http://localhost:5173,http://127.0.0.1:5173
|
||||
DATABASE_URL=postgres://super_admin:solotech25@localhost:5432/playzer-dev
|
||||
BETTER_AUTH_SECRET=767a2e0fb8b58a9f4df3155d88d22ecdc4eaea4447565c2ed518c532f6410598
|
||||
BETTER_AUTH_URL=http://localhost:5173
|
||||
APP_BASE_URL=http://localhost:5173
|
||||
ONBOARDING_TTL_MINUTES=60
|
||||
SMTP_HOST=sandbox.smtp.mailtrap.io
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
"prisma:seed:reset:plans": "bun prisma/reset-plans.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@better-auth/prisma-adapter": "^1.6.2",
|
||||
"@hono/zod-validator": "^0.7.6",
|
||||
"@prisma/adapter-pg": "^7.6.0",
|
||||
"@prisma/client": "^7",
|
||||
"@repo/api-contract": "workspace:*",
|
||||
"@supabase/supabase-js": "2.101.1",
|
||||
"@types/bcrypt": "^6.0.0",
|
||||
"bcrypt": "^6.0.0",
|
||||
"better-auth": "^1.6.2",
|
||||
"dotenv": "^17.4.1",
|
||||
"hono": "4.12.10",
|
||||
"nodemailer": "^8.0.5",
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
model Complex {
|
||||
id String @id @db.Uuid
|
||||
complexName String @map("complex_name")
|
||||
physicalAddress String? @map("physical_address") @db.VarChar(200)
|
||||
city String? @map("city") @db.VarChar(100)
|
||||
state String? @map("state") @db.VarChar(100)
|
||||
country String? @map("country") @db.VarChar(100)
|
||||
complexSlug String @unique @map("complex_slug")
|
||||
adminEmail String @map("admin_email")
|
||||
planCode String? @map("plan_code") @db.VarChar(10)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
plan Plan? @relation(fields: [planCode], references: [code])
|
||||
users ComplexUser[]
|
||||
courts Court[]
|
||||
|
||||
@@index([planCode])
|
||||
@@index([complexSlug])
|
||||
@@map("complexes")
|
||||
}
|
||||
|
||||
enum ComplexUserRole {
|
||||
ADMIN
|
||||
}
|
||||
|
||||
model ComplexUser {
|
||||
complexId String @map("complex_id") @db.Uuid
|
||||
userId String @map("user_id") @db.Uuid
|
||||
role ComplexUserRole @default(ADMIN)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
complex Complex @relation(fields: [complexId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([complexId, userId])
|
||||
@@index([userId])
|
||||
@@map("complex_users")
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
enum DayOfWeek {
|
||||
MONDAY
|
||||
TUESDAY
|
||||
WEDNESDAY
|
||||
THURSDAY
|
||||
FRIDAY
|
||||
SATURDAY
|
||||
SUNDAY
|
||||
}
|
||||
|
||||
enum CourtBookingStatus {
|
||||
CONFIRMED
|
||||
CANCELLED
|
||||
COMPLETED
|
||||
}
|
||||
|
||||
model Sport {
|
||||
id String @id @db.Uuid
|
||||
name String @unique
|
||||
slug String @unique
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
courts Court[]
|
||||
|
||||
@@map("sports")
|
||||
}
|
||||
|
||||
model Court {
|
||||
id String @id @db.Uuid
|
||||
complexId String @map("complex_id") @db.Uuid
|
||||
sportId String @map("sport_id") @db.Uuid
|
||||
name String
|
||||
slotDurationMinutes Int @map("slot_duration_minutes")
|
||||
basePrice Decimal @map("base_price") @db.Decimal(19, 2)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
complex Complex @relation(fields: [complexId], references: [id], onDelete: Cascade)
|
||||
sport Sport @relation(fields: [sportId], references: [id])
|
||||
availabilities CourtAvailability[]
|
||||
priceRules CourtPriceRule[]
|
||||
bookings CourtBooking[]
|
||||
|
||||
@@index([complexId])
|
||||
@@index([sportId])
|
||||
@@map("courts")
|
||||
}
|
||||
|
||||
model CourtAvailability {
|
||||
id String @id @db.Uuid
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
dayOfWeek DayOfWeek @map("day_of_week")
|
||||
startTime String @map("start_time") @db.VarChar(5)
|
||||
endTime String @map("end_time") @db.VarChar(5)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([courtId, dayOfWeek])
|
||||
@@map("court_availabilities")
|
||||
}
|
||||
|
||||
model CourtPriceRule {
|
||||
id String @id @db.Uuid
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
dayOfWeek DayOfWeek? @map("day_of_week")
|
||||
startTime String? @map("start_time") @db.VarChar(5)
|
||||
endTime String? @map("end_time") @db.VarChar(5)
|
||||
price Decimal @db.Decimal(19, 2)
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([courtId, isActive])
|
||||
@@map("court_price_rules")
|
||||
}
|
||||
|
||||
model CourtBooking {
|
||||
id String @id @db.Uuid
|
||||
bookingCode String @unique @map("booking_code") @db.VarChar(8)
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
bookingDate DateTime @map("booking_date") @db.Date
|
||||
startTime String @map("start_time") @db.VarChar(5)
|
||||
endTime String @map("end_time") @db.VarChar(5)
|
||||
customerName String @map("customer_name") @db.VarChar(120)
|
||||
customerPhone String @map("customer_phone") @db.VarChar(30)
|
||||
status CourtBookingStatus @default(CONFIRMED)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([courtId, bookingDate, startTime])
|
||||
@@index([courtId, bookingDate])
|
||||
@@index([bookingDate])
|
||||
@@map("court_bookings")
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
model OnboardingRequest {
|
||||
id String @id @db.Uuid
|
||||
fullName String @map("full_name")
|
||||
email String
|
||||
otpHash String @map("otp_hash")
|
||||
otpExpiresAt DateTime @map("otp_expires_at")
|
||||
otpAttempts Int @default(0) @map("otp_attempts")
|
||||
otpLastSentAt DateTime @map("otp_last_sent_at")
|
||||
otpResendCount Int @default(0) @map("otp_resend_count")
|
||||
emailVerifiedAt DateTime? @map("email_verified_at")
|
||||
completedAt DateTime? @map("completed_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([email])
|
||||
@@index([otpExpiresAt])
|
||||
@@map("onboarding_requests")
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
model PasswordResetRequest {
|
||||
id String @id @db.Uuid
|
||||
email String
|
||||
otpHash String @map("otp_hash")
|
||||
otpExpiresAt DateTime @map("otp_expires_at")
|
||||
otpAttempts Int @default(0) @map("otp_attempts")
|
||||
otpLastSentAt DateTime @map("otp_last_sent_at")
|
||||
otpResendCount Int @default(0) @map("otp_resend_count")
|
||||
usedAt DateTime? @map("used_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([email])
|
||||
@@index([otpExpiresAt])
|
||||
@@map("password_reset_requests")
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
model Plan {
|
||||
code String @id @db.VarChar(10)
|
||||
name String @db.VarChar(30)
|
||||
price Decimal @db.Decimal(19, 2)
|
||||
rules Json
|
||||
lastUpdatedAt DateTime @default(now()) @map("last_updated_at")
|
||||
complexes Complex[]
|
||||
|
||||
@@map("plans")
|
||||
}
|
||||
@@ -6,3 +6,253 @@ generator client {
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
}
|
||||
|
||||
// ============== APP MODELS (existing) ==============
|
||||
|
||||
model Plan {
|
||||
code String @id @map("code") @db.VarChar(10)
|
||||
name String @db.VarChar(30)
|
||||
price Decimal @map("price") @db.Decimal(19, 2)
|
||||
rules Json @map("rules")
|
||||
lastUpdatedAt DateTime @default(now()) @map("last_updated_at")
|
||||
complexes Complex[]
|
||||
|
||||
@@map("plans")
|
||||
}
|
||||
|
||||
model Complex {
|
||||
id String @id @db.Uuid
|
||||
complexSlug String @unique @map("complex_slug")
|
||||
complexName String @map("complex_name")
|
||||
physicalAddress String @map("physical_address")
|
||||
city String?
|
||||
state String?
|
||||
country String?
|
||||
adminEmail String @map("admin_email")
|
||||
planCode String @map("plan_code")
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
plan Plan @relation(fields: [planCode], references: [code])
|
||||
users ComplexUser[]
|
||||
courts Court[]
|
||||
|
||||
@@index([adminEmail])
|
||||
@@map("complexes")
|
||||
}
|
||||
|
||||
model ComplexUser {
|
||||
id String @id @default(cuid()) @map("id")
|
||||
complexId String @map("complex_id") @db.Uuid
|
||||
userId String @map("user_id")
|
||||
role ComplexUserRole
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
complex Complex @relation(fields: [complexId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([complexId, userId])
|
||||
@@map("complex_users")
|
||||
}
|
||||
|
||||
enum ComplexUserRole {
|
||||
ADMIN
|
||||
MANAGER
|
||||
USER
|
||||
}
|
||||
|
||||
enum DayOfWeek {
|
||||
MONDAY
|
||||
TUESDAY
|
||||
WEDNESDAY
|
||||
THURSDAY
|
||||
FRIDAY
|
||||
SATURDAY
|
||||
SUNDAY
|
||||
}
|
||||
|
||||
enum CourtBookingStatus {
|
||||
CONFIRMED
|
||||
CANCELLED
|
||||
COMPLETED
|
||||
}
|
||||
|
||||
model Sport {
|
||||
id String @id @db.Uuid
|
||||
name String @unique
|
||||
slug String @unique
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
courts Court[]
|
||||
|
||||
@@map("sports")
|
||||
}
|
||||
|
||||
model Court {
|
||||
id String @id @db.Uuid
|
||||
complexId String @map("complex_id") @db.Uuid
|
||||
sportId String @map("sport_id") @db.Uuid
|
||||
name String
|
||||
slotDurationMinutes Int @map("slot_duration_minutes")
|
||||
basePrice Decimal @map("base_price") @db.Decimal(19, 2)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
complex Complex @relation(fields: [complexId], references: [id], onDelete: Cascade)
|
||||
sport Sport @relation(fields: [sportId], references: [id])
|
||||
availabilities CourtAvailability[]
|
||||
priceRules CourtPriceRule[]
|
||||
bookings CourtBooking[]
|
||||
|
||||
@@index([complexId])
|
||||
@@index([sportId])
|
||||
@@map("courts")
|
||||
}
|
||||
|
||||
model CourtAvailability {
|
||||
id String @id @db.Uuid
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
dayOfWeek DayOfWeek @map("day_of_week")
|
||||
startTime String @map("start_time") @db.VarChar(5)
|
||||
endTime String @map("end_time") @db.VarChar(5)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([courtId, dayOfWeek])
|
||||
@@map("court_availabilities")
|
||||
}
|
||||
|
||||
model CourtPriceRule {
|
||||
id String @id @db.Uuid
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
dayOfWeek DayOfWeek? @map("day_of_week")
|
||||
startTime String? @map("start_time") @db.VarChar(5)
|
||||
endTime String? @map("end_time") @db.VarChar(5)
|
||||
price Decimal @db.Decimal(19, 2)
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([courtId, isActive])
|
||||
@@map("court_price_rules")
|
||||
}
|
||||
|
||||
model CourtBooking {
|
||||
id String @id @db.Uuid
|
||||
bookingCode String @unique @map("booking_code") @db.VarChar(8)
|
||||
courtId String @map("court_id") @db.Uuid
|
||||
bookingDate DateTime @map("booking_date") @db.Date
|
||||
startTime String @map("start_time") @db.VarChar(5)
|
||||
endTime String @map("end_time") @db.VarChar(5)
|
||||
customerName String @map("customer_name") @db.VarChar(120)
|
||||
customerPhone String @map("customer_phone") @db.VarChar(30)
|
||||
status CourtBookingStatus @default(CONFIRMED)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
court Court @relation(fields: [courtId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([courtId, bookingDate, startTime])
|
||||
@@index([courtId, bookingDate])
|
||||
@@index([bookingDate])
|
||||
@@map("court_bookings")
|
||||
}
|
||||
|
||||
model OnboardingRequest {
|
||||
id String @id @db.Uuid
|
||||
fullName String @map("full_name")
|
||||
email String
|
||||
otpHash String @map("otp_hash")
|
||||
otpExpiresAt DateTime @map("otp_expires_at")
|
||||
otpAttempts Int @default(0) @map("otp_attempts")
|
||||
otpLastSentAt DateTime @map("otp_last_sent_at")
|
||||
otpResendCount Int @default(0) @map("otp_resend_count")
|
||||
emailVerifiedAt DateTime? @map("email_verified_at")
|
||||
completedAt DateTime? @map("completed_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([email])
|
||||
@@index([otpExpiresAt])
|
||||
@@map("onboarding_requests")
|
||||
}
|
||||
|
||||
model PasswordResetRequest {
|
||||
id String @id @db.Uuid
|
||||
email String
|
||||
otpHash String @map("otp_hash")
|
||||
otpExpiresAt DateTime @map("otp_expires_at")
|
||||
otpAttempts Int @default(0) @map("otp_attempts")
|
||||
otpLastSentAt DateTime @map("otp_last_sent_at")
|
||||
otpResendCount Int @default(0) @map("otp_resend_count")
|
||||
usedAt DateTime? @map("used_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([email])
|
||||
@@index([otpExpiresAt])
|
||||
@@map("password_reset_requests")
|
||||
}
|
||||
|
||||
// ============== BETTER AUTH MODELS ==============
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid()) @map("id")
|
||||
supabaseUserId String? @unique @map("supabase_user_id") @db.Uuid
|
||||
name String?
|
||||
email String @unique
|
||||
emailVerified Boolean @default(false)
|
||||
image String?
|
||||
fullName String? @map("full_name")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
complexes ComplexUser[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @default(cuid()) @map("id")
|
||||
userId String @map("user_id")
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
token String @unique
|
||||
expiresAt DateTime @map("expires_at")
|
||||
ipAddress String? @map("ip_address")
|
||||
userAgent String? @map("user_agent")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("session")
|
||||
}
|
||||
|
||||
model Account {
|
||||
id String @id @default(cuid()) @map("id")
|
||||
userId String @map("user_id")
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
accountId String @map("account_id")
|
||||
providerId String @map("provider_id")
|
||||
accessToken String? @map("access_token")
|
||||
refreshToken String? @map("refresh_token")
|
||||
accessTokenExpiresAt DateTime? @map("access_token_expires_at")
|
||||
refreshTokenExpiresAt DateTime? @map("refresh_token_expires_at")
|
||||
scope String? @map("scope")
|
||||
idToken String? @map("id_token")
|
||||
password String? @map("password")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("account")
|
||||
}
|
||||
|
||||
model Verification {
|
||||
id String @id @default(cuid()) @map("id")
|
||||
identifier String
|
||||
value String
|
||||
expiresAt DateTime @map("expires_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("verification")
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
model User {
|
||||
id String @id @db.Uuid
|
||||
supabaseUserId String @unique @map("supabase_user_id") @db.Uuid
|
||||
email String @unique
|
||||
fullName String @map("full_name")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
complexes ComplexUser[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export function createApp() {
|
||||
},
|
||||
allowHeaders: ['Authorization', 'Content-Type'],
|
||||
allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
||||
credentials: true,
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
21
apps/backend/src/auth-routes.js
Normal file
21
apps/backend/src/auth-routes.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { auth } from '@/lib/auth';
|
||||
import { cors } from 'hono/cors';
|
||||
export function registerAuthRoutes(app) {
|
||||
const allowedOrigins = (Bun.env.CORS_ORIGIN ?? 'http://localhost:5173,http://127.0.0.1:5173')
|
||||
.split(',')
|
||||
.map((value) => value.trim())
|
||||
.filter(Boolean);
|
||||
app.use('/api/auth/*', cors({
|
||||
origin: (origin) => {
|
||||
if (!origin)
|
||||
return allowedOrigins[0] ?? '';
|
||||
return allowedOrigins.includes(origin) ? origin : '';
|
||||
},
|
||||
allowHeaders: ['Content-Type', 'Authorization'],
|
||||
allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
||||
credentials: true,
|
||||
}));
|
||||
app.on(['POST', 'GET'], '/api/auth/*', (c) => {
|
||||
return auth.handler(c.req.raw);
|
||||
});
|
||||
}
|
||||
28
apps/backend/src/auth-routes.ts
Normal file
28
apps/backend/src/auth-routes.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { auth } from '@/lib/auth';
|
||||
import type { AppEnv } from '@/types/hono';
|
||||
import type { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
|
||||
export function registerAuthRoutes(app: Hono<AppEnv>) {
|
||||
const allowedOrigins = (Bun.env.CORS_ORIGIN ?? 'http://localhost:5173,http://127.0.0.1:5173')
|
||||
.split(',')
|
||||
.map((value) => value.trim())
|
||||
.filter(Boolean);
|
||||
|
||||
app.use(
|
||||
'/api/auth/*',
|
||||
cors({
|
||||
origin: (origin) => {
|
||||
if (!origin) return allowedOrigins[0] ?? '';
|
||||
return allowedOrigins.includes(origin) ? origin : '';
|
||||
},
|
||||
allowHeaders: ['Content-Type', 'Authorization'],
|
||||
allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
||||
credentials: true,
|
||||
})
|
||||
);
|
||||
|
||||
app.on(['POST', 'GET'], '/api/auth/*', (c) => {
|
||||
return auth.handler(c.req.raw);
|
||||
});
|
||||
}
|
||||
@@ -17,6 +17,11 @@ import * as Prisma from './internal/prismaNamespaceBrowser'
|
||||
export { Prisma }
|
||||
export * as $Enums from './enums'
|
||||
export * from './enums';
|
||||
/**
|
||||
* Model Plan
|
||||
*
|
||||
*/
|
||||
export type Plan = Prisma.PlanModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
@@ -62,13 +67,23 @@ export type OnboardingRequest = Prisma.OnboardingRequestModel
|
||||
*
|
||||
*/
|
||||
export type PasswordResetRequest = Prisma.PasswordResetRequestModel
|
||||
/**
|
||||
* Model Plan
|
||||
*
|
||||
*/
|
||||
export type Plan = Prisma.PlanModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Session
|
||||
*
|
||||
*/
|
||||
export type Session = Prisma.SessionModel
|
||||
/**
|
||||
* Model Account
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model Verification
|
||||
*
|
||||
*/
|
||||
export type Verification = Prisma.VerificationModel
|
||||
|
||||
@@ -31,8 +31,8 @@ export * from "./enums"
|
||||
* const prisma = new PrismaClient({
|
||||
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
||||
* })
|
||||
* // Fetch zero or more Complexes
|
||||
* const complexes = await prisma.complex.findMany()
|
||||
* // Fetch zero or more Plans
|
||||
* const plans = await prisma.plan.findMany()
|
||||
* ```
|
||||
*
|
||||
* Read more in our [docs](https://pris.ly/d/client).
|
||||
@@ -41,6 +41,11 @@ export const PrismaClient = $Class.getPrismaClientClass()
|
||||
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
||||
export { Prisma }
|
||||
|
||||
/**
|
||||
* Model Plan
|
||||
*
|
||||
*/
|
||||
export type Plan = Prisma.PlanModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
@@ -86,13 +91,23 @@ export type OnboardingRequest = Prisma.OnboardingRequestModel
|
||||
*
|
||||
*/
|
||||
export type PasswordResetRequest = Prisma.PasswordResetRequestModel
|
||||
/**
|
||||
* Model Plan
|
||||
*
|
||||
*/
|
||||
export type Plan = Prisma.PlanModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Session
|
||||
*
|
||||
*/
|
||||
export type Session = Prisma.SessionModel
|
||||
/**
|
||||
* Model Account
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model Verification
|
||||
*
|
||||
*/
|
||||
export type Verification = Prisma.VerificationModel
|
||||
|
||||
@@ -14,18 +14,6 @@ import * as $Enums from "./enums"
|
||||
import type * as Prisma from "./internal/prismaNamespace"
|
||||
|
||||
|
||||
export type UuidFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedUuidFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type StringFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
@@ -41,6 +29,139 @@ export type StringFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type DecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type JsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type DateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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 StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
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>
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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 UuidFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedUuidFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type StringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
@@ -56,15 +177,9 @@ export type StringNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type DateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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 BoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type SortOrderInput = {
|
||||
@@ -87,24 +202,6 @@ export type UuidWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
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>
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
@@ -123,18 +220,12 @@ export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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
|
||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumComplexUserRoleFilter<$PrismaModel = never> = {
|
||||
@@ -154,19 +245,6 @@ export type EnumComplexUserRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumComplexUserRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type BoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||
@@ -178,17 +256,6 @@ export type IntFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type DecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||
@@ -205,22 +272,6 @@ export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumDayOfWeekFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.DayOfWeek | Prisma.EnumDayOfWeekFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.DayOfWeek[] | Prisma.ListEnumDayOfWeekFieldRefInput<$PrismaModel>
|
||||
@@ -297,66 +348,31 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedUuidFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
export type UuidNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidFilter<$PrismaModel> | string
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedUuidNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type UuidNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
mode?: Prisma.QueryMode
|
||||
not?: Prisma.NestedUuidNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedStringFilter<$PrismaModel = never> = {
|
||||
@@ -373,18 +389,15 @@ export type NestedStringFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | 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 NestedDecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||
@@ -398,7 +411,7 @@ export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||
}
|
||||
|
||||
export type NestedUuidWithAggregatesFilter<$PrismaModel = never> = {
|
||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
@@ -406,7 +419,10 @@ export type NestedUuidWithAggregatesFilter<$PrismaModel = never> = {
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidWithAggregatesFilter<$PrismaModel> | string
|
||||
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>
|
||||
@@ -423,7 +439,61 @@ export type NestedIntFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<NestedJsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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 NestedUuidFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
@@ -431,10 +501,37 @@ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | 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.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type NestedUuidWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
@@ -468,18 +565,12 @@ export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
||||
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
|
||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumComplexUserRoleFilter<$PrismaModel = never> = {
|
||||
@@ -499,30 +590,6 @@ export type NestedEnumComplexUserRoleWithAggregatesFilter<$PrismaModel = never>
|
||||
_max?: Prisma.NestedEnumComplexUserRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||
@@ -550,22 +617,6 @@ export type NestedFloatFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumDayOfWeekFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.DayOfWeek | Prisma.EnumDayOfWeekFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.DayOfWeek[] | Prisma.ListEnumDayOfWeekFieldRefInput<$PrismaModel>
|
||||
@@ -642,28 +693,29 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<NestedJsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
export type NestedUuidNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string[]
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel>
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
export type NestedUuidNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedUuidNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
|
||||
export const ComplexUserRole = {
|
||||
ADMIN: 'ADMIN'
|
||||
ADMIN: 'ADMIN',
|
||||
MANAGER: 'MANAGER',
|
||||
USER: 'USER'
|
||||
} as const
|
||||
|
||||
export type ComplexUserRole = (typeof ComplexUserRole)[keyof typeof ComplexUserRole]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -384,6 +384,7 @@ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRe
|
||||
|
||||
|
||||
export const ModelName = {
|
||||
Plan: 'Plan',
|
||||
Complex: 'Complex',
|
||||
ComplexUser: 'ComplexUser',
|
||||
Sport: 'Sport',
|
||||
@@ -393,8 +394,10 @@ export const ModelName = {
|
||||
CourtBooking: 'CourtBooking',
|
||||
OnboardingRequest: 'OnboardingRequest',
|
||||
PasswordResetRequest: 'PasswordResetRequest',
|
||||
Plan: 'Plan',
|
||||
User: 'User'
|
||||
User: 'User',
|
||||
Session: 'Session',
|
||||
Account: 'Account',
|
||||
Verification: 'Verification'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -410,10 +413,84 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "complex" | "complexUser" | "sport" | "court" | "courtAvailability" | "courtPriceRule" | "courtBooking" | "onboardingRequest" | "passwordResetRequest" | "plan" | "user"
|
||||
modelProps: "plan" | "complex" | "complexUser" | "sport" | "court" | "courtAvailability" | "courtPriceRule" | "courtBooking" | "onboardingRequest" | "passwordResetRequest" | "user" | "session" | "account" | "verification"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
Plan: {
|
||||
payload: Prisma.$PlanPayload<ExtArgs>
|
||||
fields: Prisma.PlanFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.PlanFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.PlanFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.PlanFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.PlanFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.PlanFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.PlanCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.PlanCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.PlanCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.PlanDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.PlanUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.PlanDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.PlanUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.PlanUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.PlanUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.PlanAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregatePlan>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.PlanGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.PlanGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.PlanCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.PlanCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Complex: {
|
||||
payload: Prisma.$ComplexPayload<ExtArgs>
|
||||
fields: Prisma.ComplexFieldRefs
|
||||
@@ -1080,80 +1157,6 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Plan: {
|
||||
payload: Prisma.$PlanPayload<ExtArgs>
|
||||
fields: Prisma.PlanFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.PlanFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.PlanFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.PlanFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.PlanFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.PlanFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.PlanCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.PlanCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.PlanCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.PlanDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.PlanUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.PlanDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.PlanUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.PlanUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.PlanUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$PlanPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.PlanAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregatePlan>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.PlanGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.PlanGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.PlanCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.PlanCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
User: {
|
||||
payload: Prisma.$UserPayload<ExtArgs>
|
||||
fields: Prisma.UserFieldRefs
|
||||
@@ -1228,6 +1231,228 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Session: {
|
||||
payload: Prisma.$SessionPayload<ExtArgs>
|
||||
fields: Prisma.SessionFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.SessionFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.SessionFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.SessionFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.SessionFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.SessionFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.SessionCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.SessionCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.SessionCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.SessionDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.SessionUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.SessionDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.SessionUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.SessionUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.SessionUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.SessionAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateSession>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.SessionGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SessionGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.SessionCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SessionCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Account: {
|
||||
payload: Prisma.$AccountPayload<ExtArgs>
|
||||
fields: Prisma.AccountFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.AccountFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.AccountFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.AccountFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.AccountFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.AccountFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.AccountCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.AccountCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.AccountCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.AccountDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.AccountUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.AccountDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.AccountUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.AccountUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.AccountUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.AccountAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateAccount>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.AccountGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AccountGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.AccountCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AccountCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Verification: {
|
||||
payload: Prisma.$VerificationPayload<ExtArgs>
|
||||
fields: Prisma.VerificationFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.VerificationFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.VerificationFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.VerificationFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.VerificationFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.VerificationFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.VerificationCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.VerificationCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.VerificationCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.VerificationDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.VerificationUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.VerificationDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.VerificationUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.VerificationUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.VerificationUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.VerificationAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateVerification>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.VerificationGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.VerificationGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.VerificationCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.VerificationCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} & {
|
||||
other: {
|
||||
@@ -1267,16 +1492,28 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({
|
||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||
|
||||
|
||||
export const PlanScalarFieldEnum = {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
price: 'price',
|
||||
rules: 'rules',
|
||||
lastUpdatedAt: 'lastUpdatedAt'
|
||||
} as const
|
||||
|
||||
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
||||
|
||||
|
||||
export const ComplexScalarFieldEnum = {
|
||||
id: 'id',
|
||||
complexSlug: 'complexSlug',
|
||||
complexName: 'complexName',
|
||||
physicalAddress: 'physicalAddress',
|
||||
city: 'city',
|
||||
state: 'state',
|
||||
country: 'country',
|
||||
complexSlug: 'complexSlug',
|
||||
adminEmail: 'adminEmail',
|
||||
planCode: 'planCode',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
@@ -1285,10 +1522,12 @@ export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeo
|
||||
|
||||
|
||||
export const ComplexUserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
complexId: 'complexId',
|
||||
userId: 'userId',
|
||||
role: 'role',
|
||||
createdAt: 'createdAt'
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type ComplexUserScalarFieldEnum = (typeof ComplexUserScalarFieldEnum)[keyof typeof ComplexUserScalarFieldEnum]
|
||||
@@ -1398,21 +1637,13 @@ export const PasswordResetRequestScalarFieldEnum = {
|
||||
export type PasswordResetRequestScalarFieldEnum = (typeof PasswordResetRequestScalarFieldEnum)[keyof typeof PasswordResetRequestScalarFieldEnum]
|
||||
|
||||
|
||||
export const PlanScalarFieldEnum = {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
price: 'price',
|
||||
rules: 'rules',
|
||||
lastUpdatedAt: 'lastUpdatedAt'
|
||||
} as const
|
||||
|
||||
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
supabaseUserId: 'supabaseUserId',
|
||||
name: 'name',
|
||||
email: 'email',
|
||||
emailVerified: 'emailVerified',
|
||||
image: 'image',
|
||||
fullName: 'fullName',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
@@ -1421,6 +1652,51 @@ export const UserScalarFieldEnum = {
|
||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||
|
||||
|
||||
export const SessionScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
token: 'token',
|
||||
expiresAt: 'expiresAt',
|
||||
ipAddress: 'ipAddress',
|
||||
userAgent: 'userAgent',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
|
||||
|
||||
|
||||
export const AccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
accountId: 'accountId',
|
||||
providerId: 'providerId',
|
||||
accessToken: 'accessToken',
|
||||
refreshToken: 'refreshToken',
|
||||
accessTokenExpiresAt: 'accessTokenExpiresAt',
|
||||
refreshTokenExpiresAt: 'refreshTokenExpiresAt',
|
||||
scope: 'scope',
|
||||
idToken: 'idToken',
|
||||
password: 'password',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const VerificationScalarFieldEnum = {
|
||||
id: 'id',
|
||||
identifier: 'identifier',
|
||||
value: 'value',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type VerificationScalarFieldEnum = (typeof VerificationScalarFieldEnum)[keyof typeof VerificationScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -1444,14 +1720,6 @@ export const QueryMode = {
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: DbNull,
|
||||
JsonNull: JsonNull,
|
||||
@@ -1461,6 +1729,14 @@ export const JsonNullValueFilter = {
|
||||
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Field references
|
||||
@@ -1481,6 +1757,34 @@ export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaMod
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Decimal'
|
||||
*/
|
||||
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Decimal[]'
|
||||
*/
|
||||
export type ListDecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Json'
|
||||
*/
|
||||
export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'QueryMode'
|
||||
*/
|
||||
export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'DateTime'
|
||||
*/
|
||||
@@ -1495,6 +1799,13 @@ export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaM
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Boolean'
|
||||
*/
|
||||
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'ComplexUserRole'
|
||||
*/
|
||||
@@ -1509,13 +1820,6 @@ export type ListEnumComplexUserRoleFieldRefInput<$PrismaModel> = FieldRefInputTy
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Boolean'
|
||||
*/
|
||||
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Int'
|
||||
*/
|
||||
@@ -1530,20 +1834,6 @@ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Decimal'
|
||||
*/
|
||||
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Decimal[]'
|
||||
*/
|
||||
export type ListDecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'DayOfWeek'
|
||||
*/
|
||||
@@ -1572,20 +1862,6 @@ export type ListEnumCourtBookingStatusFieldRefInput<$PrismaModel> = FieldRefInpu
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Json'
|
||||
*/
|
||||
export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'QueryMode'
|
||||
*/
|
||||
export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Float'
|
||||
*/
|
||||
@@ -1694,6 +1970,7 @@ export type PrismaClientOptions = ({
|
||||
comments?: runtime.SqlCommenterPlugin[]
|
||||
}
|
||||
export type GlobalOmitConfig = {
|
||||
plan?: Prisma.PlanOmit
|
||||
complex?: Prisma.ComplexOmit
|
||||
complexUser?: Prisma.ComplexUserOmit
|
||||
sport?: Prisma.SportOmit
|
||||
@@ -1703,8 +1980,10 @@ export type GlobalOmitConfig = {
|
||||
courtBooking?: Prisma.CourtBookingOmit
|
||||
onboardingRequest?: Prisma.OnboardingRequestOmit
|
||||
passwordResetRequest?: Prisma.PasswordResetRequestOmit
|
||||
plan?: Prisma.PlanOmit
|
||||
user?: Prisma.UserOmit
|
||||
session?: Prisma.SessionOmit
|
||||
account?: Prisma.AccountOmit
|
||||
verification?: Prisma.VerificationOmit
|
||||
}
|
||||
|
||||
/* Types for Logging */
|
||||
|
||||
@@ -51,6 +51,7 @@ export const AnyNull = runtime.AnyNull
|
||||
|
||||
|
||||
export const ModelName = {
|
||||
Plan: 'Plan',
|
||||
Complex: 'Complex',
|
||||
ComplexUser: 'ComplexUser',
|
||||
Sport: 'Sport',
|
||||
@@ -60,8 +61,10 @@ export const ModelName = {
|
||||
CourtBooking: 'CourtBooking',
|
||||
OnboardingRequest: 'OnboardingRequest',
|
||||
PasswordResetRequest: 'PasswordResetRequest',
|
||||
Plan: 'Plan',
|
||||
User: 'User'
|
||||
User: 'User',
|
||||
Session: 'Session',
|
||||
Account: 'Account',
|
||||
Verification: 'Verification'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -80,16 +83,28 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({
|
||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||
|
||||
|
||||
export const PlanScalarFieldEnum = {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
price: 'price',
|
||||
rules: 'rules',
|
||||
lastUpdatedAt: 'lastUpdatedAt'
|
||||
} as const
|
||||
|
||||
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
||||
|
||||
|
||||
export const ComplexScalarFieldEnum = {
|
||||
id: 'id',
|
||||
complexSlug: 'complexSlug',
|
||||
complexName: 'complexName',
|
||||
physicalAddress: 'physicalAddress',
|
||||
city: 'city',
|
||||
state: 'state',
|
||||
country: 'country',
|
||||
complexSlug: 'complexSlug',
|
||||
adminEmail: 'adminEmail',
|
||||
planCode: 'planCode',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
@@ -98,10 +113,12 @@ export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeo
|
||||
|
||||
|
||||
export const ComplexUserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
complexId: 'complexId',
|
||||
userId: 'userId',
|
||||
role: 'role',
|
||||
createdAt: 'createdAt'
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type ComplexUserScalarFieldEnum = (typeof ComplexUserScalarFieldEnum)[keyof typeof ComplexUserScalarFieldEnum]
|
||||
@@ -211,21 +228,13 @@ export const PasswordResetRequestScalarFieldEnum = {
|
||||
export type PasswordResetRequestScalarFieldEnum = (typeof PasswordResetRequestScalarFieldEnum)[keyof typeof PasswordResetRequestScalarFieldEnum]
|
||||
|
||||
|
||||
export const PlanScalarFieldEnum = {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
price: 'price',
|
||||
rules: 'rules',
|
||||
lastUpdatedAt: 'lastUpdatedAt'
|
||||
} as const
|
||||
|
||||
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
supabaseUserId: 'supabaseUserId',
|
||||
name: 'name',
|
||||
email: 'email',
|
||||
emailVerified: 'emailVerified',
|
||||
image: 'image',
|
||||
fullName: 'fullName',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
@@ -234,6 +243,51 @@ export const UserScalarFieldEnum = {
|
||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||
|
||||
|
||||
export const SessionScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
token: 'token',
|
||||
expiresAt: 'expiresAt',
|
||||
ipAddress: 'ipAddress',
|
||||
userAgent: 'userAgent',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
|
||||
|
||||
|
||||
export const AccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
accountId: 'accountId',
|
||||
providerId: 'providerId',
|
||||
accessToken: 'accessToken',
|
||||
refreshToken: 'refreshToken',
|
||||
accessTokenExpiresAt: 'accessTokenExpiresAt',
|
||||
refreshTokenExpiresAt: 'refreshTokenExpiresAt',
|
||||
scope: 'scope',
|
||||
idToken: 'idToken',
|
||||
password: 'password',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const VerificationScalarFieldEnum = {
|
||||
id: 'id',
|
||||
identifier: 'identifier',
|
||||
value: 'value',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type VerificationScalarFieldEnum = (typeof VerificationScalarFieldEnum)[keyof typeof VerificationScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -257,14 +311,6 @@ export const QueryMode = {
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: DbNull,
|
||||
JsonNull: JsonNull,
|
||||
@@ -273,3 +319,11 @@ export const JsonNullValueFilter = {
|
||||
|
||||
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
export type * from './models/Plan'
|
||||
export type * from './models/Complex'
|
||||
export type * from './models/ComplexUser'
|
||||
export type * from './models/Sport'
|
||||
@@ -17,6 +18,8 @@ export type * from './models/CourtPriceRule'
|
||||
export type * from './models/CourtBooking'
|
||||
export type * from './models/OnboardingRequest'
|
||||
export type * from './models/PasswordResetRequest'
|
||||
export type * from './models/Plan'
|
||||
export type * from './models/User'
|
||||
export type * from './models/Session'
|
||||
export type * from './models/Account'
|
||||
export type * from './models/Verification'
|
||||
export type * from './commonInputTypes'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,47 +25,59 @@ export type AggregateComplexUser = {
|
||||
}
|
||||
|
||||
export type ComplexUserMinAggregateOutputType = {
|
||||
id: string | null
|
||||
complexId: string | null
|
||||
userId: string | null
|
||||
role: $Enums.ComplexUserRole | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
}
|
||||
|
||||
export type ComplexUserMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
complexId: string | null
|
||||
userId: string | null
|
||||
role: $Enums.ComplexUserRole | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
}
|
||||
|
||||
export type ComplexUserCountAggregateOutputType = {
|
||||
id: number
|
||||
complexId: number
|
||||
userId: number
|
||||
role: number
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
|
||||
export type ComplexUserMinAggregateInputType = {
|
||||
id?: true
|
||||
complexId?: true
|
||||
userId?: true
|
||||
role?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
}
|
||||
|
||||
export type ComplexUserMaxAggregateInputType = {
|
||||
id?: true
|
||||
complexId?: true
|
||||
userId?: true
|
||||
role?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
}
|
||||
|
||||
export type ComplexUserCountAggregateInputType = {
|
||||
id?: true
|
||||
complexId?: true
|
||||
userId?: true
|
||||
role?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -142,10 +154,12 @@ export type ComplexUserGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
}
|
||||
|
||||
export type ComplexUserGroupByOutputType = {
|
||||
id: string
|
||||
complexId: string
|
||||
userId: string
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
_count: ComplexUserCountAggregateOutputType | null
|
||||
_min: ComplexUserMinAggregateOutputType | null
|
||||
_max: ComplexUserMaxAggregateOutputType | null
|
||||
@@ -170,41 +184,49 @@ export type ComplexUserWhereInput = {
|
||||
AND?: Prisma.ComplexUserWhereInput | Prisma.ComplexUserWhereInput[]
|
||||
OR?: Prisma.ComplexUserWhereInput[]
|
||||
NOT?: Prisma.ComplexUserWhereInput | Prisma.ComplexUserWhereInput[]
|
||||
id?: Prisma.StringFilter<"ComplexUser"> | string
|
||||
complexId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.StringFilter<"ComplexUser"> | string
|
||||
role?: Prisma.EnumComplexUserRoleFilter<"ComplexUser"> | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
}
|
||||
|
||||
export type ComplexUserOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
complexId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
user?: Prisma.UserOrderByWithRelationInput
|
||||
}
|
||||
|
||||
export type ComplexUserWhereUniqueInput = Prisma.AtLeast<{
|
||||
id?: string
|
||||
complexId_userId?: Prisma.ComplexUserComplexIdUserIdCompoundUniqueInput
|
||||
AND?: Prisma.ComplexUserWhereInput | Prisma.ComplexUserWhereInput[]
|
||||
OR?: Prisma.ComplexUserWhereInput[]
|
||||
NOT?: Prisma.ComplexUserWhereInput | Prisma.ComplexUserWhereInput[]
|
||||
complexId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.StringFilter<"ComplexUser"> | string
|
||||
role?: Prisma.EnumComplexUserRoleFilter<"ComplexUser"> | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
}, "complexId_userId">
|
||||
}, "id" | "complexId_userId">
|
||||
|
||||
export type ComplexUserOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
complexId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
_count?: Prisma.ComplexUserCountOrderByAggregateInput
|
||||
_max?: Prisma.ComplexUserMaxOrderByAggregateInput
|
||||
_min?: Prisma.ComplexUserMinOrderByAggregateInput
|
||||
@@ -214,57 +236,73 @@ export type ComplexUserScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.ComplexUserScalarWhereWithAggregatesInput | Prisma.ComplexUserScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.ComplexUserScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.ComplexUserScalarWhereWithAggregatesInput | Prisma.ComplexUserScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.StringWithAggregatesFilter<"ComplexUser"> | string
|
||||
complexId?: Prisma.UuidWithAggregatesFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.UuidWithAggregatesFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.StringWithAggregatesFilter<"ComplexUser"> | string
|
||||
role?: Prisma.EnumComplexUserRoleWithAggregatesFilter<"ComplexUser"> | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"ComplexUser"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ComplexUser"> | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateInput = {
|
||||
role?: $Enums.ComplexUserRole
|
||||
id?: string
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutUsersInput
|
||||
user: Prisma.UserCreateNestedOneWithoutComplexesInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedCreateInput = {
|
||||
id?: string
|
||||
complexId: string
|
||||
userId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutUsersNestedInput
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutComplexesNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complexId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateManyInput = {
|
||||
id?: string
|
||||
complexId: string
|
||||
userId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complexId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserListRelationFilter = {
|
||||
@@ -283,24 +321,30 @@ export type ComplexUserComplexIdUserIdCompoundUniqueInput = {
|
||||
}
|
||||
|
||||
export type ComplexUserCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
complexId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ComplexUserMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
complexId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ComplexUserMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
complexId?: Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ComplexUserCreateNestedManyWithoutComplexInput = {
|
||||
@@ -392,15 +436,19 @@ export type ComplexUserUncheckedUpdateManyWithoutUserNestedInput = {
|
||||
}
|
||||
|
||||
export type ComplexUserCreateWithoutComplexInput = {
|
||||
role?: $Enums.ComplexUserRole
|
||||
id?: string
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
user: Prisma.UserCreateNestedOneWithoutComplexesInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedCreateWithoutComplexInput = {
|
||||
id?: string
|
||||
userId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateOrConnectWithoutComplexInput = {
|
||||
@@ -433,22 +481,28 @@ export type ComplexUserScalarWhereInput = {
|
||||
AND?: Prisma.ComplexUserScalarWhereInput | Prisma.ComplexUserScalarWhereInput[]
|
||||
OR?: Prisma.ComplexUserScalarWhereInput[]
|
||||
NOT?: Prisma.ComplexUserScalarWhereInput | Prisma.ComplexUserScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"ComplexUser"> | string
|
||||
complexId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.UuidFilter<"ComplexUser"> | string
|
||||
userId?: Prisma.StringFilter<"ComplexUser"> | string
|
||||
role?: Prisma.EnumComplexUserRoleFilter<"ComplexUser"> | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"ComplexUser"> | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateWithoutUserInput = {
|
||||
role?: $Enums.ComplexUserRole
|
||||
id?: string
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutUsersInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedCreateWithoutUserInput = {
|
||||
id?: string
|
||||
complexId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateOrConnectWithoutUserInput = {
|
||||
@@ -478,90 +532,114 @@ export type ComplexUserUpdateManyWithWhereWithoutUserInput = {
|
||||
}
|
||||
|
||||
export type ComplexUserCreateManyComplexInput = {
|
||||
id?: string
|
||||
userId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUpdateWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutComplexesNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateManyWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserCreateManyUserInput = {
|
||||
id?: string
|
||||
complexId: string
|
||||
role?: $Enums.ComplexUserRole
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUpdateWithoutUserInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutUsersNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateWithoutUserInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complexId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type ComplexUserUncheckedUpdateManyWithoutUserInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complexId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumComplexUserRoleFieldUpdateOperationsInput | $Enums.ComplexUserRole
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
|
||||
|
||||
export type ComplexUserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
complexId?: boolean
|
||||
userId?: boolean
|
||||
role?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complexUser"]>
|
||||
|
||||
export type ComplexUserSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
complexId?: boolean
|
||||
userId?: boolean
|
||||
role?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complexUser"]>
|
||||
|
||||
export type ComplexUserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
complexId?: boolean
|
||||
userId?: boolean
|
||||
role?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complexUser"]>
|
||||
|
||||
export type ComplexUserSelectScalar = {
|
||||
id?: boolean
|
||||
complexId?: boolean
|
||||
userId?: boolean
|
||||
role?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
}
|
||||
|
||||
export type ComplexUserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"complexId" | "userId" | "role" | "createdAt", ExtArgs["result"]["complexUser"]>
|
||||
export type ComplexUserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "complexId" | "userId" | "role" | "createdAt" | "updatedAt", ExtArgs["result"]["complexUser"]>
|
||||
export type ComplexUserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
@@ -582,10 +660,12 @@ export type $ComplexUserPayload<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
user: Prisma.$UserPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
complexId: string
|
||||
userId: string
|
||||
role: $Enums.ComplexUserRole
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}, ExtArgs["result"]["complexUser"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -669,8 +749,8 @@ export interface ComplexUserDelegate<ExtArgs extends runtime.Types.Extensions.In
|
||||
* // Get first 10 ComplexUsers
|
||||
* const complexUsers = await prisma.complexUser.findMany({ take: 10 })
|
||||
*
|
||||
* // Only select the `complexId`
|
||||
* const complexUserWithComplexIdOnly = await prisma.complexUser.findMany({ select: { complexId: true } })
|
||||
* // Only select the `id`
|
||||
* const complexUserWithIdOnly = await prisma.complexUser.findMany({ select: { id: true } })
|
||||
*
|
||||
*/
|
||||
findMany<T extends ComplexUserFindManyArgs>(args?: Prisma.SelectSubset<T, ComplexUserFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ComplexUserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
||||
@@ -714,9 +794,9 @@ export interface ComplexUserDelegate<ExtArgs extends runtime.Types.Extensions.In
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Create many ComplexUsers and only return the `complexId`
|
||||
* const complexUserWithComplexIdOnly = await prisma.complexUser.createManyAndReturn({
|
||||
* select: { complexId: true },
|
||||
* // Create many ComplexUsers and only return the `id`
|
||||
* const complexUserWithIdOnly = await prisma.complexUser.createManyAndReturn({
|
||||
* select: { id: true },
|
||||
* data: [
|
||||
* // ... provide data here
|
||||
* ]
|
||||
@@ -805,9 +885,9 @@ export interface ComplexUserDelegate<ExtArgs extends runtime.Types.Extensions.In
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Update zero or more ComplexUsers and only return the `complexId`
|
||||
* const complexUserWithComplexIdOnly = await prisma.complexUser.updateManyAndReturn({
|
||||
* select: { complexId: true },
|
||||
* // Update zero or more ComplexUsers and only return the `id`
|
||||
* const complexUserWithIdOnly = await prisma.complexUser.updateManyAndReturn({
|
||||
* select: { id: true },
|
||||
* where: {
|
||||
* // ... provide filter here
|
||||
* },
|
||||
@@ -1011,10 +1091,12 @@ export interface Prisma__ComplexUserClient<T, Null = never, ExtArgs extends runt
|
||||
* Fields of the ComplexUser model
|
||||
*/
|
||||
export interface ComplexUserFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"ComplexUser", 'String'>
|
||||
readonly complexId: Prisma.FieldRef<"ComplexUser", 'String'>
|
||||
readonly userId: Prisma.FieldRef<"ComplexUser", 'String'>
|
||||
readonly role: Prisma.FieldRef<"ComplexUser", 'ComplexUserRole'>
|
||||
readonly createdAt: Prisma.FieldRef<"ComplexUser", 'DateTime'>
|
||||
readonly updatedAt: Prisma.FieldRef<"ComplexUser", 'DateTime'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -553,14 +553,6 @@ export type IntFieldUpdateOperationsInput = {
|
||||
divide?: number
|
||||
}
|
||||
|
||||
export type DecimalFieldUpdateOperationsInput = {
|
||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type CourtCreateNestedOneWithoutAvailabilitiesInput = {
|
||||
create?: Prisma.XOR<Prisma.CourtCreateWithoutAvailabilitiesInput, Prisma.CourtUncheckedCreateWithoutAvailabilitiesInput>
|
||||
connectOrCreate?: Prisma.CourtCreateOrConnectWithoutAvailabilitiesInput
|
||||
|
||||
@@ -320,11 +320,6 @@ export type PlanUncheckedUpdateManyInput = {
|
||||
lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type PlanNullableScalarRelationFilter = {
|
||||
is?: Prisma.PlanWhereInput | null
|
||||
isNot?: Prisma.PlanWhereInput | null
|
||||
}
|
||||
|
||||
export type PlanCountOrderByAggregateInput = {
|
||||
code?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
@@ -355,18 +350,37 @@ export type PlanSumOrderByAggregateInput = {
|
||||
price?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type PlanScalarRelationFilter = {
|
||||
is?: Prisma.PlanWhereInput
|
||||
isNot?: Prisma.PlanWhereInput
|
||||
}
|
||||
|
||||
export type StringFieldUpdateOperationsInput = {
|
||||
set?: string
|
||||
}
|
||||
|
||||
export type DecimalFieldUpdateOperationsInput = {
|
||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type DateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string
|
||||
}
|
||||
|
||||
export type PlanCreateNestedOneWithoutComplexesInput = {
|
||||
create?: Prisma.XOR<Prisma.PlanCreateWithoutComplexesInput, Prisma.PlanUncheckedCreateWithoutComplexesInput>
|
||||
connectOrCreate?: Prisma.PlanCreateOrConnectWithoutComplexesInput
|
||||
connect?: Prisma.PlanWhereUniqueInput
|
||||
}
|
||||
|
||||
export type PlanUpdateOneWithoutComplexesNestedInput = {
|
||||
export type PlanUpdateOneRequiredWithoutComplexesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.PlanCreateWithoutComplexesInput, Prisma.PlanUncheckedCreateWithoutComplexesInput>
|
||||
connectOrCreate?: Prisma.PlanCreateOrConnectWithoutComplexesInput
|
||||
upsert?: Prisma.PlanUpsertWithoutComplexesInput
|
||||
disconnect?: Prisma.PlanWhereInput | boolean
|
||||
delete?: Prisma.PlanWhereInput | boolean
|
||||
connect?: Prisma.PlanWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.PlanUpdateToOneWithWhereWithoutComplexesInput, Prisma.PlanUpdateWithoutComplexesInput>, Prisma.PlanUncheckedUpdateWithoutComplexesInput>
|
||||
}
|
||||
|
||||
@@ -339,10 +339,6 @@ export type SportScalarRelationFilter = {
|
||||
isNot?: Prisma.SportWhereInput
|
||||
}
|
||||
|
||||
export type BoolFieldUpdateOperationsInput = {
|
||||
set?: boolean
|
||||
}
|
||||
|
||||
export type SportCreateNestedOneWithoutCourtsInput = {
|
||||
create?: Prisma.XOR<Prisma.SportCreateWithoutCourtsInput, Prisma.SportUncheckedCreateWithoutCourtsInput>
|
||||
connectOrCreate?: Prisma.SportCreateOrConnectWithoutCourtsInput
|
||||
|
||||
@@ -27,7 +27,10 @@ export type AggregateUser = {
|
||||
export type UserMinAggregateOutputType = {
|
||||
id: string | null
|
||||
supabaseUserId: string | null
|
||||
name: string | null
|
||||
email: string | null
|
||||
emailVerified: boolean | null
|
||||
image: string | null
|
||||
fullName: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
@@ -36,7 +39,10 @@ export type UserMinAggregateOutputType = {
|
||||
export type UserMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
supabaseUserId: string | null
|
||||
name: string | null
|
||||
email: string | null
|
||||
emailVerified: boolean | null
|
||||
image: string | null
|
||||
fullName: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
@@ -45,7 +51,10 @@ export type UserMaxAggregateOutputType = {
|
||||
export type UserCountAggregateOutputType = {
|
||||
id: number
|
||||
supabaseUserId: number
|
||||
name: number
|
||||
email: number
|
||||
emailVerified: number
|
||||
image: number
|
||||
fullName: number
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
@@ -56,7 +65,10 @@ export type UserCountAggregateOutputType = {
|
||||
export type UserMinAggregateInputType = {
|
||||
id?: true
|
||||
supabaseUserId?: true
|
||||
name?: true
|
||||
email?: true
|
||||
emailVerified?: true
|
||||
image?: true
|
||||
fullName?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
@@ -65,7 +77,10 @@ export type UserMinAggregateInputType = {
|
||||
export type UserMaxAggregateInputType = {
|
||||
id?: true
|
||||
supabaseUserId?: true
|
||||
name?: true
|
||||
email?: true
|
||||
emailVerified?: true
|
||||
image?: true
|
||||
fullName?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
@@ -74,7 +89,10 @@ export type UserMaxAggregateInputType = {
|
||||
export type UserCountAggregateInputType = {
|
||||
id?: true
|
||||
supabaseUserId?: true
|
||||
name?: true
|
||||
email?: true
|
||||
emailVerified?: true
|
||||
image?: true
|
||||
fullName?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
@@ -155,9 +173,12 @@ export type UserGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
|
||||
export type UserGroupByOutputType = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
supabaseUserId: string | null
|
||||
name: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified: boolean
|
||||
image: string | null
|
||||
fullName: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
_count: UserCountAggregateOutputType | null
|
||||
@@ -184,22 +205,32 @@ export type UserWhereInput = {
|
||||
AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
|
||||
OR?: Prisma.UserWhereInput[]
|
||||
NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
|
||||
id?: Prisma.UuidFilter<"User"> | string
|
||||
supabaseUserId?: Prisma.UuidFilter<"User"> | string
|
||||
id?: Prisma.StringFilter<"User"> | string
|
||||
supabaseUserId?: Prisma.UuidNullableFilter<"User"> | string | null
|
||||
name?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
email?: Prisma.StringFilter<"User"> | string
|
||||
fullName?: Prisma.StringFilter<"User"> | string
|
||||
emailVerified?: Prisma.BoolFilter<"User"> | boolean
|
||||
image?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
fullName?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
sessions?: Prisma.SessionListRelationFilter
|
||||
complexes?: Prisma.ComplexUserListRelationFilter
|
||||
}
|
||||
|
||||
export type UserOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
email?: Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrder
|
||||
emailVerified?: Prisma.SortOrder
|
||||
image?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
accounts?: Prisma.AccountOrderByRelationAggregateInput
|
||||
sessions?: Prisma.SessionOrderByRelationAggregateInput
|
||||
complexes?: Prisma.ComplexUserOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
@@ -210,17 +241,25 @@ export type UserWhereUniqueInput = Prisma.AtLeast<{
|
||||
AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
|
||||
OR?: Prisma.UserWhereInput[]
|
||||
NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
|
||||
fullName?: Prisma.StringFilter<"User"> | string
|
||||
name?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
emailVerified?: Prisma.BoolFilter<"User"> | boolean
|
||||
image?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
fullName?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
sessions?: Prisma.SessionListRelationFilter
|
||||
complexes?: Prisma.ComplexUserListRelationFilter
|
||||
}, "id" | "supabaseUserId" | "email">
|
||||
|
||||
export type UserOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
email?: Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrder
|
||||
emailVerified?: Prisma.SortOrder
|
||||
image?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
_count?: Prisma.UserCountOrderByAggregateInput
|
||||
@@ -232,77 +271,109 @@ export type UserScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.UserScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.UuidWithAggregatesFilter<"User"> | string
|
||||
supabaseUserId?: Prisma.UuidWithAggregatesFilter<"User"> | string
|
||||
id?: Prisma.StringWithAggregatesFilter<"User"> | string
|
||||
supabaseUserId?: Prisma.UuidNullableWithAggregatesFilter<"User"> | string | null
|
||||
name?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
|
||||
email?: Prisma.StringWithAggregatesFilter<"User"> | string
|
||||
fullName?: Prisma.StringWithAggregatesFilter<"User"> | string
|
||||
emailVerified?: Prisma.BoolWithAggregatesFilter<"User"> | boolean
|
||||
image?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
|
||||
fullName?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
|
||||
}
|
||||
|
||||
export type UserCreateInput = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateInput = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateManyInput = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type UserUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
@@ -315,7 +386,10 @@ export type UserScalarRelationFilter = {
|
||||
export type UserCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
email?: Prisma.SortOrder
|
||||
emailVerified?: Prisma.SortOrder
|
||||
image?: Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
@@ -324,7 +398,10 @@ export type UserCountOrderByAggregateInput = {
|
||||
export type UserMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
email?: Prisma.SortOrder
|
||||
emailVerified?: Prisma.SortOrder
|
||||
image?: Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
@@ -333,7 +410,10 @@ export type UserMaxOrderByAggregateInput = {
|
||||
export type UserMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
supabaseUserId?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
email?: Prisma.SortOrder
|
||||
emailVerified?: Prisma.SortOrder
|
||||
image?: Prisma.SortOrder
|
||||
fullName?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
@@ -353,22 +433,60 @@ export type UserUpdateOneRequiredWithoutComplexesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutComplexesInput, Prisma.UserUpdateWithoutComplexesInput>, Prisma.UserUncheckedUpdateWithoutComplexesInput>
|
||||
}
|
||||
|
||||
export type UserCreateNestedOneWithoutSessionsInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutSessionsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
}
|
||||
|
||||
export type UserUpdateOneRequiredWithoutSessionsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutSessionsInput
|
||||
upsert?: Prisma.UserUpsertWithoutSessionsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutSessionsInput, Prisma.UserUpdateWithoutSessionsInput>, Prisma.UserUncheckedUpdateWithoutSessionsInput>
|
||||
}
|
||||
|
||||
export type UserCreateNestedOneWithoutAccountsInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
}
|
||||
|
||||
export type UserUpdateOneRequiredWithoutAccountsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput
|
||||
upsert?: Prisma.UserUpsertWithoutAccountsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutAccountsInput, Prisma.UserUpdateWithoutAccountsInput>, Prisma.UserUncheckedUpdateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type UserCreateWithoutComplexesInput = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutComplexesInput = {
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutComplexesInput = {
|
||||
@@ -389,20 +507,174 @@ export type UserUpdateToOneWithWhereWithoutComplexesInput = {
|
||||
|
||||
export type UserUpdateWithoutComplexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutComplexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
fullName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutSessionsInput = {
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutSessionsInput = {
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutSessionsInput = {
|
||||
where: Prisma.UserWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
|
||||
}
|
||||
|
||||
export type UserUpsertWithoutSessionsInput = {
|
||||
update: Prisma.XOR<Prisma.UserUpdateWithoutSessionsInput, Prisma.UserUncheckedUpdateWithoutSessionsInput>
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
|
||||
where?: Prisma.UserWhereInput
|
||||
}
|
||||
|
||||
export type UserUpdateToOneWithWhereWithoutSessionsInput = {
|
||||
where?: Prisma.UserWhereInput
|
||||
data: Prisma.XOR<Prisma.UserUpdateWithoutSessionsInput, Prisma.UserUncheckedUpdateWithoutSessionsInput>
|
||||
}
|
||||
|
||||
export type UserUpdateWithoutSessionsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutSessionsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutAccountsInput = {
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutAccountsInput = {
|
||||
id?: string
|
||||
supabaseUserId?: string | null
|
||||
name?: string | null
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
fullName?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutAccountsInput = {
|
||||
where: Prisma.UserWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type UserUpsertWithoutAccountsInput = {
|
||||
update: Prisma.XOR<Prisma.UserUpdateWithoutAccountsInput, Prisma.UserUncheckedUpdateWithoutAccountsInput>
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
|
||||
where?: Prisma.UserWhereInput
|
||||
}
|
||||
|
||||
export type UserUpdateToOneWithWhereWithoutAccountsInput = {
|
||||
where?: Prisma.UserWhereInput
|
||||
data: Prisma.XOR<Prisma.UserUpdateWithoutAccountsInput, Prisma.UserUncheckedUpdateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type UserUpdateWithoutAccountsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutAccountsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
supabaseUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fullName?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -411,10 +683,14 @@ export type UserUncheckedUpdateWithoutComplexesInput = {
|
||||
*/
|
||||
|
||||
export type UserCountOutputType = {
|
||||
accounts: number
|
||||
sessions: number
|
||||
complexes: number
|
||||
}
|
||||
|
||||
export type UserCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
accounts?: boolean | UserCountOutputTypeCountAccountsArgs
|
||||
sessions?: boolean | UserCountOutputTypeCountSessionsArgs
|
||||
complexes?: boolean | UserCountOutputTypeCountComplexesArgs
|
||||
}
|
||||
|
||||
@@ -428,6 +704,20 @@ export type UserCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensi
|
||||
select?: Prisma.UserCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* UserCountOutputType without action
|
||||
*/
|
||||
export type UserCountOutputTypeCountAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.AccountWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* UserCountOutputType without action
|
||||
*/
|
||||
export type UserCountOutputTypeCountSessionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.SessionWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* UserCountOutputType without action
|
||||
*/
|
||||
@@ -439,10 +729,15 @@ export type UserCountOutputTypeCountComplexesArgs<ExtArgs extends runtime.Types.
|
||||
export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
supabaseUserId?: boolean
|
||||
name?: boolean
|
||||
email?: boolean
|
||||
emailVerified?: boolean
|
||||
image?: boolean
|
||||
fullName?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
|
||||
complexes?: boolean | Prisma.User$complexesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["user"]>
|
||||
@@ -450,7 +745,10 @@ export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
export type UserSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
supabaseUserId?: boolean
|
||||
name?: boolean
|
||||
email?: boolean
|
||||
emailVerified?: boolean
|
||||
image?: boolean
|
||||
fullName?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
@@ -459,7 +757,10 @@ export type UserSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
||||
export type UserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
supabaseUserId?: boolean
|
||||
name?: boolean
|
||||
email?: boolean
|
||||
emailVerified?: boolean
|
||||
image?: boolean
|
||||
fullName?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
@@ -468,14 +769,19 @@ export type UserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
||||
export type UserSelectScalar = {
|
||||
id?: boolean
|
||||
supabaseUserId?: boolean
|
||||
name?: boolean
|
||||
email?: boolean
|
||||
emailVerified?: boolean
|
||||
image?: boolean
|
||||
fullName?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
}
|
||||
|
||||
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "supabaseUserId" | "email" | "fullName" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]>
|
||||
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "supabaseUserId" | "name" | "email" | "emailVerified" | "image" | "fullName" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]>
|
||||
export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
|
||||
complexes?: boolean | Prisma.User$complexesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -485,13 +791,18 @@ export type UserIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensi
|
||||
export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "User"
|
||||
objects: {
|
||||
accounts: Prisma.$AccountPayload<ExtArgs>[]
|
||||
sessions: Prisma.$SessionPayload<ExtArgs>[]
|
||||
complexes: Prisma.$ComplexUserPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
supabaseUserId: string
|
||||
supabaseUserId: string | null
|
||||
name: string | null
|
||||
email: string
|
||||
fullName: string
|
||||
emailVerified: boolean
|
||||
image: string | null
|
||||
fullName: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}, ExtArgs["result"]["user"]>
|
||||
@@ -888,6 +1199,8 @@ readonly fields: UserFieldRefs;
|
||||
*/
|
||||
export interface Prisma__UserClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
accounts<T extends Prisma.User$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
sessions<T extends Prisma.User$sessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$sessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
complexes<T extends Prisma.User$complexesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$complexesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ComplexUserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
@@ -920,7 +1233,10 @@ export interface Prisma__UserClient<T, Null = never, ExtArgs extends runtime.Typ
|
||||
export interface UserFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"User", 'String'>
|
||||
readonly supabaseUserId: Prisma.FieldRef<"User", 'String'>
|
||||
readonly name: Prisma.FieldRef<"User", 'String'>
|
||||
readonly email: Prisma.FieldRef<"User", 'String'>
|
||||
readonly emailVerified: Prisma.FieldRef<"User", 'Boolean'>
|
||||
readonly image: Prisma.FieldRef<"User", 'String'>
|
||||
readonly fullName: Prisma.FieldRef<"User", 'String'>
|
||||
readonly createdAt: Prisma.FieldRef<"User", 'DateTime'>
|
||||
readonly updatedAt: Prisma.FieldRef<"User", 'DateTime'>
|
||||
@@ -1316,6 +1632,54 @@ export type UserDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* User.accounts
|
||||
*/
|
||||
export type User$accountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Account
|
||||
*/
|
||||
select?: Prisma.AccountSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Account
|
||||
*/
|
||||
omit?: Prisma.AccountOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.AccountInclude<ExtArgs> | null
|
||||
where?: Prisma.AccountWhereInput
|
||||
orderBy?: Prisma.AccountOrderByWithRelationInput | Prisma.AccountOrderByWithRelationInput[]
|
||||
cursor?: Prisma.AccountWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.AccountScalarFieldEnum | Prisma.AccountScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* User.sessions
|
||||
*/
|
||||
export type User$sessionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Session
|
||||
*/
|
||||
select?: Prisma.SessionSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Session
|
||||
*/
|
||||
omit?: Prisma.SessionOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.SessionInclude<ExtArgs> | null
|
||||
where?: Prisma.SessionWhereInput
|
||||
orderBy?: Prisma.SessionOrderByWithRelationInput | Prisma.SessionOrderByWithRelationInput[]
|
||||
cursor?: Prisma.SessionWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.SessionScalarFieldEnum | Prisma.SessionScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* User.complexes
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { createApp } from '@/app';
|
||||
import { registerAuthRoutes } from '@/auth-routes';
|
||||
import { registerRoutes } from '@/register-routes';
|
||||
|
||||
const app = createApp();
|
||||
registerAuthRoutes(app);
|
||||
registerRoutes(app);
|
||||
|
||||
export type AppType = typeof app;
|
||||
|
||||
56
apps/backend/src/lib/auth.ts
Normal file
56
apps/backend/src/lib/auth.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import { sendMail } from '@/lib/mailer';
|
||||
import { db } from '@/lib/prisma';
|
||||
import bcrypt from 'bcrypt';
|
||||
import { betterAuth } from 'better-auth';
|
||||
import { prismaAdapter } from 'better-auth/adapters/prisma';
|
||||
import { emailOTP } from 'better-auth/plugins';
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: prismaAdapter(db, {
|
||||
provider: 'postgresql',
|
||||
}),
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
password: {
|
||||
hash: async (password) => {
|
||||
return bcrypt.hash(password, 10);
|
||||
},
|
||||
verify: async (password, hash) => {
|
||||
return bcrypt.compare(password, hash);
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
emailOTP({
|
||||
async sendVerificationOTP({ email, otp, type }) {
|
||||
let subject = 'Tu código de verificación';
|
||||
let text = `Tu código OTP es ${otp}.`;
|
||||
let html = `<p>Tu código OTP es <strong>${otp}</strong>.</p>`;
|
||||
|
||||
if (type === 'sign-in') {
|
||||
subject = 'Código de inicio de sesión';
|
||||
text = `Tu código para iniciar sesión es ${otp}.`;
|
||||
html = `<p>Tu código para iniciar sesión es <strong>${otp}</strong>.</p>`;
|
||||
} else if (type === 'forget-password') {
|
||||
subject = 'Código para restablecer contraseña';
|
||||
text = `Tu código para restablecer tu contraseña es ${otp}.`;
|
||||
html = `<p>Tu código para restablecer tu contraseña es <strong>${otp}</strong>.</p>`;
|
||||
} else if (type === 'email-verification') {
|
||||
subject = 'Verifica tu correo electrónico';
|
||||
text = `Tu código de verificación es ${otp}.`;
|
||||
html = `<p>Tu código de verificación es <strong>${otp}</strong>.</p>`;
|
||||
}
|
||||
|
||||
await sendMail({
|
||||
to: email,
|
||||
subject,
|
||||
text,
|
||||
html,
|
||||
});
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
export type Session = typeof auth.$Infer.Session.session;
|
||||
export type User = typeof auth.$Infer.Session.user;
|
||||
@@ -1,26 +0,0 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
let cachedClient: ReturnType<typeof createClient> | null = null;
|
||||
|
||||
export function getSupabaseAdminClient() {
|
||||
if (cachedClient) return cachedClient;
|
||||
|
||||
const supabaseUrl = Bun.env.SUPABASE_URL ?? Bun.env.VITE_SUPABASE_URL;
|
||||
const supabaseServiceRoleKey = Bun.env.SUPABASE_SERVICE_ROLE_KEY;
|
||||
|
||||
if (!supabaseUrl || !supabaseServiceRoleKey) {
|
||||
throw new Error(
|
||||
'Missing Supabase admin env vars. Set SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY in backend environment.'
|
||||
);
|
||||
}
|
||||
|
||||
cachedClient = createClient(supabaseUrl, supabaseServiceRoleKey, {
|
||||
auth: {
|
||||
autoRefreshToken: false,
|
||||
persistSession: false,
|
||||
detectSessionInUrl: false,
|
||||
},
|
||||
});
|
||||
|
||||
return cachedClient;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
const supabaseUrl = Bun.env.SUPABASE_URL ?? Bun.env.VITE_SUPABASE_URL;
|
||||
const supabaseAnonKey = Bun.env.SUPABASE_ANON_KEY ?? Bun.env.VITE_SUPABASE_ANON_KEY;
|
||||
|
||||
if (!supabaseUrl || !supabaseAnonKey) {
|
||||
throw new Error(
|
||||
'Missing Supabase env vars. Set SUPABASE_URL/SUPABASE_ANON_KEY (or VITE_SUPABASE_URL/VITE_SUPABASE_ANON_KEY) in backend environment.'
|
||||
);
|
||||
}
|
||||
|
||||
export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
|
||||
auth: {
|
||||
autoRefreshToken: false,
|
||||
persistSession: false,
|
||||
detectSessionInUrl: false,
|
||||
},
|
||||
});
|
||||
@@ -1,70 +1,25 @@
|
||||
import { auth } from '@/lib/auth';
|
||||
import { db } from '@/lib/prisma';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import type { AppEnv } from '@/types/hono';
|
||||
import type { MiddlewareHandler } from 'hono';
|
||||
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
||||
|
||||
const JWKS_CACHE_TTL_MS = 5 * 60 * 1000;
|
||||
|
||||
let jwks: ReturnType<typeof createRemoteJWKSet> | null = null;
|
||||
let jwksCacheTime = 0;
|
||||
|
||||
async function getJWKS() {
|
||||
const now = Date.now();
|
||||
if (!jwks || now - jwksCacheTime > JWKS_CACHE_TTL_MS) {
|
||||
const supabaseUrl = process.env.SUPABASE_URL ?? process.env.VITE_SUPABASE_URL;
|
||||
if (!supabaseUrl) {
|
||||
throw new Error('SUPABASE_URL not configured');
|
||||
}
|
||||
const jwksUrl = new URL('/auth/v1/.well-known/jwks.json', supabaseUrl).toString();
|
||||
jwks = createRemoteJWKSet(new URL(jwksUrl));
|
||||
jwksCacheTime = now;
|
||||
}
|
||||
return jwks;
|
||||
}
|
||||
|
||||
function getBearerToken(value: string | undefined): string | null {
|
||||
if (!value) return null;
|
||||
const [scheme, token] = value.split(' ');
|
||||
if (scheme?.toLowerCase() !== 'bearer' || !token) return null;
|
||||
return token;
|
||||
}
|
||||
|
||||
export const requireAuth: MiddlewareHandler<AppEnv> = async (c, next) => {
|
||||
const token = getBearerToken(c.req.header('authorization'));
|
||||
const bearerToken = c.req.header('authorization')?.replace('Bearer ', '');
|
||||
|
||||
if (!token) {
|
||||
if (!bearerToken) {
|
||||
return c.json({ message: 'Missing bearer token.' }, 403);
|
||||
}
|
||||
|
||||
let supabaseUserId: string;
|
||||
let email: string | undefined;
|
||||
const { user, session } = await auth.api.getSession({
|
||||
headers: { authorization: `Bearer ${bearerToken}` },
|
||||
});
|
||||
|
||||
try {
|
||||
const jwksSet = await getJWKS();
|
||||
const { payload } = await jwtVerify(token, jwksSet, {
|
||||
algorithms: ['ES256'],
|
||||
});
|
||||
|
||||
supabaseUserId = payload.sub as string;
|
||||
email = payload.email as string | undefined;
|
||||
} catch {
|
||||
const { data, error } = await supabase.auth.getUser(token);
|
||||
|
||||
if (error || !data.user) {
|
||||
return c.json({ message: 'Invalid or expired token.' }, 403);
|
||||
}
|
||||
|
||||
supabaseUserId = data.user.id;
|
||||
email = data.user.email?.toLowerCase();
|
||||
}
|
||||
|
||||
if (!email) {
|
||||
return c.json({ message: 'Auth user does not contain email.' }, 403);
|
||||
if (!user || !session) {
|
||||
return c.json({ message: 'Invalid or expired token.' }, 403);
|
||||
}
|
||||
|
||||
const appUser = await db.user.findUnique({
|
||||
where: { supabaseUserId },
|
||||
where: { email: user.email },
|
||||
select: { id: true },
|
||||
});
|
||||
|
||||
@@ -73,6 +28,7 @@ export const requireAuth: MiddlewareHandler<AppEnv> = async (c, next) => {
|
||||
}
|
||||
|
||||
c.set('appUserId', appUser.id);
|
||||
c.set('session', session);
|
||||
|
||||
await next();
|
||||
};
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { createHash, randomInt } from 'node:crypto';
|
||||
import { auth } from '@/lib/auth';
|
||||
import { sendMail } from '@/lib/mailer';
|
||||
import { db } from '@/lib/prisma';
|
||||
import { getSupabaseAdminClient } from '@/lib/supabase-admin';
|
||||
import type {
|
||||
OnboardingCompleteInput,
|
||||
OnboardingResendOtpInput,
|
||||
OnboardingStartInput,
|
||||
OnboardingVerifyOtpInput,
|
||||
} from '@repo/api-contract';
|
||||
import type { User as SupabaseAuthUser } from '@supabase/supabase-js';
|
||||
import { v7 as uuidv7 } from 'uuid';
|
||||
|
||||
const OTP_LENGTH = 6;
|
||||
@@ -125,77 +124,6 @@ async function sendOtpEmail(email: string, otpCode: string) {
|
||||
});
|
||||
}
|
||||
|
||||
async function findSupabaseUserByEmail(email: string): Promise<SupabaseAuthUser | null> {
|
||||
let page = 1;
|
||||
const perPage = 100;
|
||||
|
||||
while (page <= 10) {
|
||||
const { data, error } = await getSupabaseAdminClient().auth.admin.listUsers({
|
||||
page,
|
||||
perPage,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw new Error(`No se pudo consultar usuarios en Supabase: ${error.message}`);
|
||||
}
|
||||
|
||||
const found = data.users.find((user) => user.email?.toLowerCase() === email.toLowerCase());
|
||||
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
|
||||
if (data.users.length < perPage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
page += 1;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function ensureSupabaseUser(params: {
|
||||
email: string;
|
||||
fullName: string;
|
||||
password: string;
|
||||
}): Promise<string> {
|
||||
const existingUser = await findSupabaseUserByEmail(params.email);
|
||||
|
||||
if (existingUser) {
|
||||
const { error } = await getSupabaseAdminClient().auth.admin.updateUserById(existingUser.id, {
|
||||
password: params.password,
|
||||
email_confirm: true,
|
||||
user_metadata: {
|
||||
full_name: params.fullName,
|
||||
name: params.fullName,
|
||||
},
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw new Error(`No se pudo actualizar usuario existente en Supabase: ${error.message}`);
|
||||
}
|
||||
|
||||
return existingUser.id;
|
||||
}
|
||||
|
||||
const { data, error } = await getSupabaseAdminClient().auth.admin.createUser({
|
||||
email: params.email,
|
||||
password: params.password,
|
||||
email_confirm: true,
|
||||
user_metadata: {
|
||||
full_name: params.fullName,
|
||||
name: params.fullName,
|
||||
},
|
||||
});
|
||||
|
||||
if (error || !data.user) {
|
||||
throw new Error(`No se pudo crear usuario en Supabase: ${error?.message ?? 'unknown error'}`);
|
||||
}
|
||||
|
||||
return data.user.id;
|
||||
}
|
||||
|
||||
export async function startOnboarding(input: OnboardingStartInput): Promise<StartOnboardingResult> {
|
||||
const email = normalizeEmail(input.email);
|
||||
const otpCode = createOtpCode();
|
||||
@@ -428,26 +356,42 @@ export async function completeOnboarding(input: OnboardingCompleteInput) {
|
||||
throw new OnboardingError('El plan seleccionado no existe.', 400);
|
||||
}
|
||||
|
||||
const supabaseUserId = await ensureSupabaseUser({
|
||||
email: onboardingRequest.email,
|
||||
fullName: onboardingRequest.fullName,
|
||||
password: input.password,
|
||||
});
|
||||
|
||||
const complexSlug = await buildUniqueComplexSlug(input.complexName);
|
||||
|
||||
const result = await db.$transaction(async (tx) => {
|
||||
const existingUser = await tx.user.findUnique({
|
||||
where: { email: onboardingRequest.email },
|
||||
});
|
||||
|
||||
let userId: string;
|
||||
|
||||
if (existingUser) {
|
||||
userId = existingUser.id;
|
||||
} else {
|
||||
const newUser = await auth.api.signUpEmail({
|
||||
body: {
|
||||
email: onboardingRequest.email,
|
||||
password: input.password,
|
||||
name: onboardingRequest.fullName,
|
||||
},
|
||||
});
|
||||
|
||||
if (!newUser.user) {
|
||||
throw new OnboardingError('No se pudo crear el usuario en Better Auth.', 400);
|
||||
}
|
||||
|
||||
userId = newUser.user.id;
|
||||
}
|
||||
|
||||
const user = await tx.user.upsert({
|
||||
where: { email: onboardingRequest.email },
|
||||
update: {
|
||||
fullName: onboardingRequest.fullName,
|
||||
supabaseUserId,
|
||||
},
|
||||
create: {
|
||||
id: uuidv7(),
|
||||
id: userId,
|
||||
fullName: onboardingRequest.fullName,
|
||||
email: onboardingRequest.email,
|
||||
supabaseUserId,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -467,6 +411,7 @@ export async function completeOnboarding(input: OnboardingCompleteInput) {
|
||||
|
||||
await tx.complexUser.create({
|
||||
data: {
|
||||
id: uuidv7(),
|
||||
complexId: complex.id,
|
||||
userId: user.id,
|
||||
role: 'ADMIN',
|
||||
@@ -487,8 +432,5 @@ export async function completeOnboarding(input: OnboardingCompleteInput) {
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
...result,
|
||||
supabaseUserId,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createHash, randomInt } from 'node:crypto';
|
||||
import { auth } from '@/lib/auth';
|
||||
import { sendMail } from '@/lib/mailer';
|
||||
import { db } from '@/lib/prisma';
|
||||
import { getSupabaseAdminClient } from '@/lib/supabase-admin';
|
||||
import type {
|
||||
PasswordResetResendInput,
|
||||
PasswordResetStartInput,
|
||||
@@ -189,42 +189,15 @@ async function sendPasswordChangedEmail(
|
||||
});
|
||||
}
|
||||
|
||||
async function findSupabaseUserByEmail(email: string): Promise<{ id: string } | null> {
|
||||
let page = 1;
|
||||
const perPage = 100;
|
||||
|
||||
while (page <= 10) {
|
||||
const { data, error } = await getSupabaseAdminClient().auth.admin.listUsers({
|
||||
page,
|
||||
perPage,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw new Error(`No se pudo consultar usuarios en Supabase: ${error.message}`);
|
||||
}
|
||||
|
||||
const found = data.users.find((user) => user.email?.toLowerCase() === email.toLowerCase());
|
||||
|
||||
if (found) {
|
||||
return { id: found.id };
|
||||
}
|
||||
|
||||
if (data.users.length < perPage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
page += 1;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export async function startPasswordReset(
|
||||
input: PasswordResetStartInput
|
||||
): Promise<PasswordResetStartResult> {
|
||||
const email = normalizeEmail(input.email);
|
||||
|
||||
const existingUser = await findSupabaseUserByEmail(email);
|
||||
const existingUser = await db.user.findUnique({
|
||||
where: { email },
|
||||
});
|
||||
|
||||
if (!existingUser) {
|
||||
return {
|
||||
message: 'Si el email existe, recibirás un código de verificación.',
|
||||
@@ -369,12 +342,16 @@ export async function verifyOtpAndResetPassword(
|
||||
throw new PasswordResetError('Código incorrecto.', 400);
|
||||
}
|
||||
|
||||
const existingUser = await findSupabaseUserByEmail(request.email);
|
||||
const existingUser = await db.user.findUnique({
|
||||
where: { email: request.email },
|
||||
});
|
||||
|
||||
if (!existingUser) {
|
||||
throw new PasswordResetError('Usuario no encontrado.', 404);
|
||||
}
|
||||
|
||||
await getSupabaseAdminClient().auth.admin.updateUserById(existingUser.id, {
|
||||
await auth.api.changePassword({
|
||||
userId: existingUser.id,
|
||||
password: newPassword,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
import type { AuthUser } from '@/types/auth-user';
|
||||
import { db } from '@/lib/prisma';
|
||||
import type { UserProfile } from '@repo/api-contract';
|
||||
|
||||
export function getUserProfile(user: AuthUser): UserProfile {
|
||||
const fullName =
|
||||
(typeof user.user_metadata?.full_name === 'string' && user.user_metadata.full_name) ||
|
||||
(typeof user.user_metadata?.name === 'string' && user.user_metadata.name) ||
|
||||
(user.email ?? 'Usuario');
|
||||
export async function getUserProfile(appUserId: string): Promise<UserProfile | null> {
|
||||
const user = await db.user.findUnique({
|
||||
where: { id: appUserId },
|
||||
select: {
|
||||
id: true,
|
||||
email: true,
|
||||
fullName: true,
|
||||
image: true,
|
||||
createdAt: true,
|
||||
},
|
||||
});
|
||||
|
||||
const role = (typeof user.app_metadata?.role === 'string' && user.app_metadata.role) || 'member';
|
||||
|
||||
const avatarUrl =
|
||||
(typeof user.user_metadata?.avatar_url === 'string' && user.user_metadata.avatar_url) || null;
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
id: user.id,
|
||||
fullName,
|
||||
email: user.email ?? null,
|
||||
role,
|
||||
avatarUrl,
|
||||
createdAt: user.created_at,
|
||||
fullName: user.fullName,
|
||||
email: user.email,
|
||||
role: 'member',
|
||||
avatarUrl: user.image,
|
||||
createdAt: user.createdAt,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { User } from '@supabase/supabase-js';
|
||||
import type { Session, User } from 'better-auth/types';
|
||||
|
||||
export type AuthUser = User;
|
||||
export type AuthSession = Session;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"@tanstack/react-router": "^1.168.10",
|
||||
"@tanstack/router-devtools": "^1.166.11",
|
||||
"axios": "^1.14.0",
|
||||
"better-auth": "^1.6.2",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^4.1.0",
|
||||
|
||||
@@ -62,13 +62,48 @@ export function OnboardingCompleteStep({
|
||||
<Input
|
||||
id="physical-address"
|
||||
type="text"
|
||||
placeholder="Ej: Av. San Martin 1234, Salta"
|
||||
placeholder="Ej: Av. San Martin 1234"
|
||||
aria-invalid={Boolean(form.formState.errors.physicalAddress)}
|
||||
{...form.register('physicalAddress')}
|
||||
/>
|
||||
<FieldError errors={[form.formState.errors.physicalAddress]} />
|
||||
</Field>
|
||||
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<Field data-invalid={Boolean(form.formState.errors.city)}>
|
||||
<FieldLabel htmlFor="city">Ciudad</FieldLabel>
|
||||
<Input
|
||||
id="city"
|
||||
type="text"
|
||||
placeholder="Salta"
|
||||
aria-invalid={Boolean(form.formState.errors.city)}
|
||||
{...form.register('city')}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field data-invalid={Boolean(form.formState.errors.state)}>
|
||||
<FieldLabel htmlFor="state">Provincia</FieldLabel>
|
||||
<Input
|
||||
id="state"
|
||||
type="text"
|
||||
placeholder="Salta"
|
||||
aria-invalid={Boolean(form.formState.errors.state)}
|
||||
{...form.register('state')}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field data-invalid={Boolean(form.formState.errors.country)}>
|
||||
<FieldLabel htmlFor="country">Pais</FieldLabel>
|
||||
<Input
|
||||
id="country"
|
||||
type="text"
|
||||
placeholder="Argentina"
|
||||
aria-invalid={Boolean(form.formState.errors.country)}
|
||||
{...form.register('country')}
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
<Field data-invalid={Boolean(form.formState.errors.planCode)}>
|
||||
<FieldLabel htmlFor="plan-code">Plan</FieldLabel>
|
||||
<Controller
|
||||
|
||||
@@ -24,6 +24,45 @@ import { useForm } from 'react-hook-form';
|
||||
const OTP_MAX_ATTEMPTS = 5;
|
||||
type OnboardStep = 'start' | 'verify-otp' | 'complete';
|
||||
|
||||
const ONBOARDING_STORAGE_KEY = 'playzer_onboarding_state';
|
||||
|
||||
type OnboardingStorageState = {
|
||||
step: OnboardStep;
|
||||
requestId: string | null;
|
||||
onboardingEmail: string | null;
|
||||
verifiedEmail: string | null;
|
||||
startFormValues?: { fullName: string; email: string };
|
||||
completeFormValues?: Partial<{
|
||||
password: string;
|
||||
complexName: string;
|
||||
physicalAddress: string;
|
||||
city: string;
|
||||
state: string;
|
||||
country: string;
|
||||
planCode: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
function loadOnboardingState(): OnboardingStorageState | null {
|
||||
if (typeof window === 'undefined') return null;
|
||||
try {
|
||||
const stored = localStorage.getItem(ONBOARDING_STORAGE_KEY);
|
||||
return stored ? JSON.parse(stored) : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function saveOnboardingState(state: OnboardingStorageState) {
|
||||
if (typeof window === 'undefined') return;
|
||||
localStorage.setItem(ONBOARDING_STORAGE_KEY, JSON.stringify(state));
|
||||
}
|
||||
|
||||
function clearOnboardingState() {
|
||||
if (typeof window === 'undefined') return;
|
||||
localStorage.removeItem(ONBOARDING_STORAGE_KEY);
|
||||
}
|
||||
|
||||
export function OnboardPage() {
|
||||
const navigate = useNavigate();
|
||||
const { signInWithPassword } = useAuth();
|
||||
@@ -39,6 +78,71 @@ export function OnboardPage() {
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
const [infoMessage, setInfoMessage] = useState<string | null>(null);
|
||||
|
||||
// Load persisted state on mount
|
||||
useEffect(() => {
|
||||
const saved = loadOnboardingState();
|
||||
if (saved && saved.step !== 'start' && saved.requestId) {
|
||||
setStep(saved.step);
|
||||
setRequestId(saved.requestId);
|
||||
setOnboardingEmail(saved.onboardingEmail);
|
||||
setVerifiedEmail(saved.verifiedEmail);
|
||||
|
||||
if (saved.startFormValues) {
|
||||
startForm.reset(saved.startFormValues);
|
||||
}
|
||||
if (saved.completeFormValues) {
|
||||
completeForm.reset(saved.completeFormValues);
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Save state to localStorage when it changes
|
||||
useEffect(() => {
|
||||
const state: OnboardingStorageState = {
|
||||
step,
|
||||
requestId,
|
||||
onboardingEmail,
|
||||
verifiedEmail,
|
||||
startFormValues: startForm.getValues(),
|
||||
completeFormValues: step === 'complete' ? completeForm.getValues() : undefined,
|
||||
};
|
||||
|
||||
if (step !== 'start' && requestId) {
|
||||
saveOnboardingState(state);
|
||||
}
|
||||
}, [step, requestId, onboardingEmail, verifiedEmail]);
|
||||
|
||||
// Also save form values when they change
|
||||
useEffect(() => {
|
||||
if (step !== 'start' && requestId) {
|
||||
const state = loadOnboardingState();
|
||||
if (state) {
|
||||
saveOnboardingState({
|
||||
...state,
|
||||
startFormValues: startForm.getValues(),
|
||||
completeFormValues: step === 'complete' ? completeForm.getValues() : undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [step, requestId]);
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
if (step !== 'start' && requestId) {
|
||||
const state = loadOnboardingState();
|
||||
if (state) {
|
||||
saveOnboardingState({
|
||||
...state,
|
||||
startFormValues: startForm.getValues(),
|
||||
completeFormValues: step === 'complete' ? completeForm.getValues() : undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, [step, requestId]);
|
||||
|
||||
const startForm = useForm<StartValues>({
|
||||
resolver: zodResolver(onboardingStartSchema),
|
||||
mode: 'onChange',
|
||||
@@ -55,6 +159,9 @@ export function OnboardPage() {
|
||||
password: '',
|
||||
complexName: '',
|
||||
physicalAddress: '',
|
||||
city: '',
|
||||
state: '',
|
||||
country: '',
|
||||
planCode: '',
|
||||
},
|
||||
});
|
||||
@@ -180,13 +287,27 @@ export function OnboardPage() {
|
||||
password: values.password,
|
||||
complexName: values.complexName,
|
||||
physicalAddress: values.physicalAddress,
|
||||
city: values.city,
|
||||
state: values.state,
|
||||
country: values.country,
|
||||
planCode: values.planCode,
|
||||
});
|
||||
setCurrentComplexSlug(result.complexSlug);
|
||||
clearOnboardingState();
|
||||
|
||||
const emailForSignIn = verifiedEmail ?? onboardingEmail;
|
||||
if (emailForSignIn) {
|
||||
await signInWithPassword({ email: emailForSignIn, password: values.password });
|
||||
try {
|
||||
await signInWithPassword({ email: emailForSignIn, password: values.password });
|
||||
} catch {
|
||||
await navigate({
|
||||
to: '/login',
|
||||
search: {
|
||||
redirect: `/complex/${result.complexSlug}/edit`,
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await navigate({ to: '/complex/$slug/edit', params: { slug: result.complexSlug } });
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { setApiAccessToken } from '@/lib/api-client';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import type { Session, User } from '@supabase/supabase-js';
|
||||
import {
|
||||
type PropsWithChildren,
|
||||
createContext,
|
||||
useContext,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { createAuthClient } from 'better-auth/react';
|
||||
import { emailOTPClient } from 'better-auth/client/plugins';
|
||||
import type { User, Session } from 'better-auth/types';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
const authClient = createAuthClient({
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000',
|
||||
plugins: [emailOTPClient()],
|
||||
});
|
||||
|
||||
type SignInParams = {
|
||||
email: string;
|
||||
@@ -18,7 +18,7 @@ type SignInParams = {
|
||||
type SignUpParams = {
|
||||
email: string;
|
||||
password: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
type UpdateProfileParams = {
|
||||
@@ -29,16 +29,19 @@ type UpdatePasswordParams = {
|
||||
password: string;
|
||||
};
|
||||
|
||||
type AuthUser = User | null;
|
||||
type AuthSession = Session | null;
|
||||
|
||||
export type AuthContextValue = {
|
||||
user: User | null;
|
||||
session: Session | null;
|
||||
user: AuthUser;
|
||||
session: AuthSession;
|
||||
loading: boolean;
|
||||
isAuthenticated: boolean;
|
||||
displayName: string;
|
||||
initials: string;
|
||||
avatarUrl: string | null;
|
||||
signInWithPassword: (params: SignInParams) => Promise<void>;
|
||||
signUp: (params: SignUpParams) => Promise<{ requiresEmailConfirmation: boolean }>;
|
||||
signUp: (params: SignUpParams) => Promise<void>;
|
||||
updateProfile: (params: UpdateProfileParams) => Promise<void>;
|
||||
updatePassword: (params: UpdatePasswordParams) => Promise<void>;
|
||||
signOut: () => Promise<void>;
|
||||
@@ -46,17 +49,11 @@ export type AuthContextValue = {
|
||||
|
||||
const AuthContext = createContext<AuthContextValue | null>(null);
|
||||
|
||||
function getDisplayName(user: User | null): string {
|
||||
function getDisplayName(user: AuthUser): string {
|
||||
if (!user) return 'Usuario';
|
||||
|
||||
const fromMetadata =
|
||||
user.user_metadata?.name ?? user.user_metadata?.full_name ?? user.user_metadata?.user_name;
|
||||
|
||||
if (typeof fromMetadata === 'string' && fromMetadata.trim().length > 0) {
|
||||
return fromMetadata.trim();
|
||||
}
|
||||
|
||||
return user.email ?? 'Usuario';
|
||||
const name = user.name ?? user.email ?? 'Usuario';
|
||||
return name;
|
||||
}
|
||||
|
||||
function getInitials(name: string): string {
|
||||
@@ -65,48 +62,30 @@ function getInitials(name: string): string {
|
||||
return initials || 'U';
|
||||
}
|
||||
|
||||
function getAvatarUrl(user: User | null): string | null {
|
||||
function getAvatarUrl(user: AuthUser): string | null {
|
||||
if (!user) return null;
|
||||
|
||||
const value = user.user_metadata?.avatar_url ?? user.user_metadata?.picture;
|
||||
return typeof value === 'string' && value.length > 0 ? value : null;
|
||||
return user.image ?? null;
|
||||
}
|
||||
|
||||
export function AuthProvider({ children }: PropsWithChildren) {
|
||||
const [session, setSession] = useState<Session | null>(null);
|
||||
const [user, setUser] = useState<User | null>(null);
|
||||
const sessionStore = authClient.useSession();
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
setLoading(sessionStore.isPending);
|
||||
}, [sessionStore.isPending]);
|
||||
|
||||
const init = async () => {
|
||||
const { data } = await supabase.auth.getSession();
|
||||
const user = sessionStore.data?.user ?? null;
|
||||
const session = sessionStore.data?.session ?? null;
|
||||
const isAuthenticated = !!session;
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
setSession(data.session);
|
||||
setUser(data.session?.user ?? null);
|
||||
setApiAccessToken(data.session?.access_token ?? null);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
void init();
|
||||
|
||||
const {
|
||||
data: { subscription },
|
||||
} = supabase.auth.onAuthStateChange((_event, nextSession) => {
|
||||
setSession(nextSession);
|
||||
setUser(nextSession?.user ?? null);
|
||||
setApiAccessToken(nextSession?.access_token ?? null);
|
||||
setLoading(false);
|
||||
});
|
||||
|
||||
return () => {
|
||||
mounted = false;
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
if (sessionStore.data?.session?.token) {
|
||||
setApiAccessToken(sessionStore.data.session.token);
|
||||
} else {
|
||||
setApiAccessToken(null);
|
||||
}
|
||||
}, [sessionStore.data?.session?.token]);
|
||||
|
||||
const value = useMemo<AuthContextValue>(() => {
|
||||
const displayName = getDisplayName(user);
|
||||
@@ -117,69 +96,58 @@ export function AuthProvider({ children }: PropsWithChildren) {
|
||||
user,
|
||||
session,
|
||||
loading,
|
||||
isAuthenticated: Boolean(user),
|
||||
isAuthenticated,
|
||||
displayName,
|
||||
initials,
|
||||
avatarUrl,
|
||||
signInWithPassword: async ({ email, password }) => {
|
||||
const { error } = await supabase.auth.signInWithPassword({
|
||||
const result = await authClient.signIn.email({
|
||||
email,
|
||||
password,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
if (result.error) {
|
||||
throw new Error(result.error.message);
|
||||
}
|
||||
},
|
||||
signUp: async ({ email, password, fullName }) => {
|
||||
const { data, error } = await supabase.auth.signUp({
|
||||
signUp: async ({ email, password, name }) => {
|
||||
const result = await authClient.signUp.email({
|
||||
email,
|
||||
password,
|
||||
options: {
|
||||
data: {
|
||||
full_name: fullName,
|
||||
name: fullName,
|
||||
},
|
||||
},
|
||||
name,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
if (result.error) {
|
||||
throw new Error(result.error.message);
|
||||
}
|
||||
|
||||
return {
|
||||
requiresEmailConfirmation: !data.session,
|
||||
};
|
||||
},
|
||||
updateProfile: async ({ fullName }) => {
|
||||
const { error } = await supabase.auth.updateUser({
|
||||
data: {
|
||||
full_name: fullName,
|
||||
name: fullName,
|
||||
},
|
||||
const result = await (authClient as any).user.update({
|
||||
name: fullName,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
if (result?.error) {
|
||||
throw new Error(result.error.message);
|
||||
}
|
||||
},
|
||||
updatePassword: async ({ password }) => {
|
||||
const { error } = await supabase.auth.updateUser({
|
||||
const result = await (authClient as any).user.update({
|
||||
password,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
if (result?.error) {
|
||||
throw new Error(result.error.message);
|
||||
}
|
||||
},
|
||||
signOut: async () => {
|
||||
const { error } = await supabase.auth.signOut();
|
||||
if (error) {
|
||||
throw error;
|
||||
const result = await authClient.signOut();
|
||||
|
||||
if (result.error) {
|
||||
throw new Error(result.error.message);
|
||||
}
|
||||
},
|
||||
};
|
||||
}, [loading, session, user]);
|
||||
}, [loading, session, user, isAuthenticated, sessionStore]);
|
||||
|
||||
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
||||
}
|
||||
@@ -193,3 +161,5 @@ export function useAuth() {
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
export { authClient };
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
|
||||
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
||||
|
||||
if (!supabaseUrl || !supabaseAnonKey) {
|
||||
throw new Error(
|
||||
'Missing Supabase environment variables. Define VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.'
|
||||
);
|
||||
}
|
||||
|
||||
export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
|
||||
auth: {
|
||||
autoRefreshToken: true,
|
||||
persistSession: true,
|
||||
detectSessionInUrl: true,
|
||||
},
|
||||
});
|
||||
@@ -3,4 +3,4 @@ import { createFileRoute } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/onboard')({
|
||||
component: OnboardPage,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user